Hi Frnds,
I m having replication agent for mssql on windows.
To start the Replication Agent i execute the .bat file, this opens up a command prompt.
Replication Agent up till the time this cmd prompt is alive.
I want to put these in windows services (services.msc)
Basically i want something like nohup command used on UNIX.
Rgds,
Jitu
Note sure.
Can you check this please.It has information on how to create user defined service.
http://support.microsoft.com/kb/137890
Also an example below.
Add A Bat File As A Service ! (22-08-2001)Make for example Time.bat which includes:
Code:
:time
net time \servername /set /y
sleep 3600
goto time
Install Windows 2000 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\CurrentControlSet\Services\Nettime
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