Home > OS >  Urgent for help: bat file use sc create to create a Windows service sc startservice failure after 10
Urgent for help: bat file use sc create to create a Windows service sc startservice failure after 10

Time:09-20

Urgent for help: bat file use sc create to create a Windows service sc startservice failure after 1053
Bat file can be performed locally,
 
@ echo off
If "% 1"=="h" goto the begin
Mshta vbscript: createobject (" wscript. Shell "). The run (" % ~ nx0 h, 0) (window. Close) & amp; & The exit
: the begin
SETLOCAL enabledelayedexpansion
@ setlocal
CD "C: \ Program Files \ ossec (x86) - agent"
Agent - auth. Exe - m host - I - G default & gt; Nul
The SET/A COUNT=0
For/f "delims=" % % I in (client. Keys) do (
For in (I) % % % % x do (
The SET/A COUNT +=1
IF! The COUNT!==3 (
The SET ST=! ST! Any
)
IF NOT! The COUNT!==3 (
The SET ST=! ST! % % x
)
)
The echo! ST!> Client. The keys
)
ENDLOCAL
: start
Ping 127.0.0.1 -n 6 & gt; Nul
Goto start

CodePudding user response:

In addition to the packer, bat file can be registered for the service start?

CodePudding user response:

Bat as a service program? Impossible, Windows 7 as if even the ordinary exe washed-up, xp as is possible, although there is an error in log procedure is carried out, Microsoft itself is not a srvany. Exe program, and instsrv. Exe for the installation, you can through the srvany. Exe to run any program specific usage in srvany. Exe for keyword search is,
  • Related