<br />
<b>Warning</b>:  Undefined variable $archive_page_slug in <b>/home/xs372180/pnpk.net/public_html/wp-content/plugins/kgarchives/kgarchives.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  Undefined variable $archive_page_slug in <b>/home/xs372180/pnpk.net/public_html/wp-content/plugins/kgarchives/kgarchives.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  Undefined variable $archive_page_slug in <b>/home/xs372180/pnpk.net/public_html/wp-content/plugins/kgarchives/kgarchives.php</b> on line <b>17</b><br />
{"id":435,"date":"2008-06-25T20:15:37","date_gmt":"2008-06-25T11:15:37","guid":{"rendered":"https:\/\/pnpk.net\/archives\/435"},"modified":"2009-03-10T02:22:45","modified_gmt":"2009-03-09T17:22:45","slug":"yuyoyuaeaeeaeuaeoisseaeeyyyeyyevbs","status":"publish","type":"post","link":"https:\/\/pnpk.net\/?p=435","title":{"rendered":"\u30b5\u30fc\u30d3\u30b9\u304c\u8d77\u52d5\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u8d77\u52d5\u3092\u8a66\u307f\u308b\u76e3\u8996\u7528\u306eVB\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>Windows Server 2003\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u983b\u7e41\u306b\u843d\u3061\u3066\u3044\u308b\u30e2\u30ce\u304c\u3042\u3063\u305f\u306e\u3067\u96c6\u4e2d\u7684\u306b\u76e3\u8996\u53ef\u80fd\u306a\u3001\u30b5\u30fc\u30d3\u30b9\u304c\u8d77\u52d5\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u8d77\u52d5\u3092\u8a66\u307f\u308b\u76e3\u8996\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u3082\u3057\u304b\u3059\u308b\u3068\u4f7f\u3044\u9053\u3042\u307e\u308a\u306a\u3044\u304b\u3082\u77e5\u308c\u307e\u305b\u3093\u304c\u3001\u4f7f\u3044\u9053\u3042\u3063\u305f\u3089\u3069\u3046\u305e\u3002<\/p>\n<p><!--more--><\/p>\n<h2 id=\"i-0\">\u4f7f\u3044\u65b9<\/h2>\n<p>\u9069\u5f53\u306aBAT\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3001\u305d\u3053\u304b\u3089\u5f15\u6570\u306bPC\u540d \u30b5\u30fc\u30d3\u30b9\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002<br \/>\n\u81ea\u52d5\u5fa9\u65e7\u51fa\u6765\u306a\u3044\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u3068\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\u91cd\u8981\u5ea6\u306b\u5fdc\u3058\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u51fa\u6765\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306b\u306f\u9069\u5f53\u306b\u66f8\u304d\u63db\u3048\u3066\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3068\u3044\u3046\u5024\u3067\u30b5\u30fc\u30d3\u30b9\u306e\u6700\u5927\u5fdc\u7b54\u6642\u9593\u3092\u6c7a\u3081\u3089\u308c\u307e\u3059\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u4e2d\u306b\u306f5\uff085\u79d2\uff09\u3068\u3042\u308a\u307e\u3059\u304c\u3001\u30b5\u30fc\u30d3\u30b9\u306b\u5fdc\u3058\u3066\u6642\u9593\u3082\u8abf\u6574\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u2018\u30b5\u30fc\u30d3\u30b9\u3092\u76e3\u8996\u3057\u3001\u8d77\u52d5\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u8d77\u52d5\u3057\u3066\u307f\u308b\u76e3\u8996\u30b9\u30af\u30ea\u30d7\u30c8<br \/>\n\u2018\u4f7f\u7528\u4f8b<br \/>\n\u2018  \u201cCscript C:\\Scripts\\Win32\u30b5\u30fc\u30d3\u30b9\u7a3c\u50cd\u78ba\u8a8d.vbs\u201d \u201cPC\u540d\u201d \u201c\u30b5\u30fc\u30d3\u30b9\u540d\u201d<\/p>\n<p>Option Explicit<\/p>\n<p>Dim objArgs,objWMIService,objItem,colItems<br \/>\nDim strComputer,strService<br \/>\nDim intTIMEOUT,i<br \/>\nDim strSERVICE_LOG<\/p>\n<p>Set objArgs = wscript.Arguments<br \/>\nstrComputer = objArgs.item(0)<br \/>\nstrService = objArgs.item(1)<\/p>\n<p>\u2018\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br \/>\n\u2018\u30b5\u30fc\u30d3\u30b9\u304c\u958b\u59cb\u3055\u308c\u308b\u307e\u3067\u306e\u6700\u5927\u5f85\u3061\u6642\u9593<br \/>\nintTIMEOUT = 5<br \/>\n\u2018\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n<p>\u2018\u30ab\u30a6\u30f3\u30bf\u30fc\u521d\u671f\u5316<br \/>\ni = 0<\/p>\n<p>Call QUERY_SERVICE()<\/p>\n<p>Sub QUERY_SERVICE()<br \/>\n\tSet objWMIService = GetObject(\u201cwinmgmts:\\\\\u201d &amp; strComputer &amp; \u201c\\root\\cimv2\u201d)<br \/>\n\tSet colItems = objWMIService.ExecQuery(\u201cSelect * from Win32_Service\u201d,,48)<\/p>\n<p>\tFor Each objItem in colItems<br \/>\n\t\tIf objItem.DisplayName = strService Then<br \/>\n\t\t\t\u2018\u30c7\u30d0\u30c3\u30af\u7528<br \/>\n\t\t\t\u2018Wscript.Echo objItem.DisplayName &amp; \u201d is \u201d &amp; objItem.State<\/p>\n<p>\t\t\t\u2018objItem.State\u304cRunning\u4ee5\u5916\u3060\u3063\u305f\u3089\u30b5\u30fc\u30d3\u30b9\u3092\u5b9f\u884c\u3057\u3001\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u3092\u5f85\u3064\u3002<br \/>\n\t\t\tIf objItem.State &gt; \u201cRunning\u201d Then<br \/>\n\t\t\t\ti = i + 1<br \/>\n\t\t\t\t\u2018\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u3092\u8a66\u307f\u308b\u3002<br \/>\n\t\t\t\tIf i  intTIMEOUT Then<br \/>\n\t\t\t\t\t&#8216;\u30b5\u30fc\u30d3\u30b9\u8d77\u52d5<br \/>\n\t\t\t\t\tobjItem.StartService(objItem.DisplayName)<br \/>\n\t\t\t\t\t&#8216;1\u79d2\u5f85\u6a5f<br \/>\n\t\t\t\t\tWscript.Sleep 1000<br \/>\n\t\t\t\t\t&#8216;QUERY_SERVICE\u3092\u547c\u3073\u51fa\u3057<br \/>\n\t\t\t\t\tCall QUERY_SERVICE()<br \/>\n\t\t\t\tElse<br \/>\n\t\t\t\t\tstrSERVICE_LOG = &#8220;PC\u540d:&#8221; &amp; strComputer &amp; vbCrLf &amp;_<br \/>\n\t\t\t\t\t\tstrService &amp; &#8220;\u304c\u505c\u6b62\u3057\u3066\u3044\u305f\u306e\u3067\u81ea\u52d5\u5fa9\u65e7\u3092\u8a66\u307f\u307e\u3057\u305f\u304c&#8221; &amp;_<br \/>\n\t\t\t\t\t\tintTIMEOUT &amp; &#8220;\u79d2\u4ee5\u5185\u306b\u8d77\u52d5\u78ba\u8a8d\u51fa\u6765\u307e\u305b\u3093\u3067\u3057\u305f\u3002&#8221; &amp;_<br \/>\n\t\t\t\t\t\t&#8220;\u30b5\u30fc\u30d3\u30b9\u304c\u505c\u6b62\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002&#8221;<br \/>\n\t\t\t\t\tWscript.Echo strSERVICE_LOG<br \/>\n\t\t\t\t\t&#8216;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u66f8\u304d\u8fbc\u307f<br \/>\n\t\t\t\t\tCALL WriteEvent(1,strSERVICE_LOG)<br \/>\n\t\t\t\tEnd If<br \/>\n\t\t\tEnd If<br \/>\n\t\tEnd If<br \/>\n\tNext<br \/>\nEnd Sub<\/p>\n<p>&#8216;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u306b\u66f8\u304d\u8fbc\u307f\uff08WriteEvent(\u756a\u53f7,\u30ed\u30b0\u672c\u6587)\uff09<br \/>\nSub WriteEvent(int,strLOG)<br \/>\n\tDim objShell<br \/>\n\tSet objShell = Wscript.CreateObject(&#8220;Wscript.Shell&#8221;)<br \/>\n\tobjShell.LogEvent int,strLOG<br \/>\n\tSet objShell = Nothing<br \/>\nEnd Sub[\/source]\n","protected":false},"excerpt":{"rendered":"<p>Windows Server 2003\u306e\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u983b\u7e41\u306b\u843d\u3061\u3066\u3044\u308b\u30e2\u30ce\u304c\u3042\u3063\u305f\u306e\u3067\u96c6\u4e2d\u7684\u306b\u76e3\u8996\u53ef\u80fd\u306a\u3001\u30b5\u30fc\u30d3\u30b9\u304c\u8d77\u52d5\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u8d77\u52d5\u3092\u8a66\u307f\u308b\u76e3\u8996\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u3082\u3057\u304b\u3059\u308b\u3068\u4f7f\u3044\u9053\u3042\u307e\u308a\u306a\u3044\u304b\u3082\u77e5\u308c\u307e\u305b &#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[20],"tags":[106,42,87],"class_list":{"0":"post-435","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-windows-server-2003","7":"tag-windows-server","8":"tag-wmi","9":"tag-87","10":"entry","11":"nothumb"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/posts\/435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pnpk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":5,"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions"}],"predecessor-version":[{"id":1867,"href":"https:\/\/pnpk.net\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions\/1867"}],"wp:attachment":[{"href":"https:\/\/pnpk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pnpk.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pnpk.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}