Trying to shut down and start a Windows process

Hi ,
Good day people. I want to know if i can shut down a particular service that runs in windows from solaris through a script .

Scenario : we have a distributed environment where we want to shut down a service that runs under windows through a shell script in solaris , is this kinda action possible.

Regards

Hi guys,
Is the scenario what im facing is too wierd ? is it do able ??pls advice.

Scenario is :
We have a siebel envrionment where we have got two siebel application servers , one server (main ) runs in solaris 9 environment and the other one runs on windows environment , I have written a ksh script which will stop the server in solaris (at the background this will do a soft kill ) and after this server dies down i have to go kill the server in windows that runs as a NETSVC , right now im doing a manually service stop on windows after my script shutdown the server that runs in solaris , but i want to automate this , henceforth my question to you guys.

What version and flavour of Windows are you using?

2000 Server/Advanced?
2003 Server/Advanced?

A few things come to mind on how you can accomplish this, without some sort of a native Unix to Windows Port of sysinternals Psexec command line tool are.

  1. Configure the Telnet server on the Windows Box and have the Unix Box connect and run a batch file on the Windows box.
REM Windows Box Batch File
@ECHO OFF
NET STOP "Siebel"
  1. You can alternatively use a SSH Daemon for Windows if security is an issue and do the same thing.

  2. A bit more delayed, but you could have the ksh script FTP a text file to the Windows Box into a pre-defined folder and then have a scheduled task in Windows that runs every x amount of minutes check for the presence of the file and if it exists does the same as the above batch file.

The Windows batch might look something like

@ECHO OFF
IF EXIST "C:\SCRIPTS\SIEBEL.TXT" (NET STOP "Siebel") ELSE GOTO END
DEL "C:\SCRIPTS\SIEBEL.TXT" /Q
:END

thanks a lot gerrad ..idea is cool let me try it out.