Example
Add A Bat File As A Service ! (22-08-2001)Make for example Time.bat which includes:
:time
net time \servername /set /y
sleep 3600
goto time
Install Windows Resource Kit...
Run the following from a Dos prompt:
instsrv Nettime "c:\program Files\Resource Kit\srvany.exe"
Now go to services and find Nettime
choose Properties
In the Description type "Time sync..."
Choose logon mode, and set an account to it for example "Administrator"
Click Ok
Click on Start and type Regedt32 > Ok > Find
HKEY_LOCAL_MACHINE\SYSTEM\
Click Edit > Add Key and type Parameters, click OK
Double click on Parameters > Edit and choose Add Value
Add Value = Application
Data Type = REG_SZ
click Ok
String = c:\time.bat
click Ok
Double click on Parameters > Edit and choose Add Value
Add Value = AppDirectory
Data Type = REG_SZ
click Ok
String = c: > click Ok
Go to services again and Start the service Nettime
Main Topics
Browse All Topics





by: netcmhPosted on 2009-11-05 at 11:36:05ID: 25753048
1. START "My Script" /Min yourbat.bat
om/kb/1378 90
alternatively:
Right click on the cmd file, create shortcut.
Now, right click on this shortcut, click on Properties.
Under the Shortcut tab, you will see a drop-down menu with Run written before it.
Choose "Minimized" from the drop down menu.
When you run the cmd file through this shortcut, the command window will not show up on desktop.
2. You have to run it as a service
Look here: http://support.microsoft.c
use the above instructions to run "cmd.exe /c path\batchfile.bat" as a service