Trying to shut down and start a Windows process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Trying to shut down and start a Windows process
# 1  
Old 06-05-2006
Question 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
# 2  
Old 06-06-2006
Question is this wierd scenario

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.
# 3  
Old 06-06-2006
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.
Code:
REM Windows Box Batch File
@ECHO OFF
NET STOP "Siebel"

2. You can alternatively use a SSH Daemon for Windows if security is an issue and do the same thing.

3. 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
Code:
@ECHO OFF
IF EXIST "C:\SCRIPTS\SIEBEL.TXT" (NET STOP "Siebel") ELSE GOTO END
DEL "C:\SCRIPTS\SIEBEL.TXT" /Q
:END


Last edited by Jerrad; 06-06-2006 at 07:12 PM..
# 4  
Old 07-03-2006
thanks a lot gerrad ..idea is cool let me try it out.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Process Scheduling where to start

Hello, i'm absolutely new to the whole Operating Systems thing. I am pretty much level 0. My assignment is to "simulate the execution of a stream of processes by a computer system, one CPU, many terminals 12 disk drives, 30 public mailboxes. The professor runs a series of inputs which is a... (1 Reply)
Discussion started by: JaneSkylar
1 Replies

2. UNIX for Dummies Questions & Answers

Script to start background process and then kill process

What I need to learn is how to use a script that launches background processes, and then kills those processes as needed. The script successfully launches the script. But how do I check to see if the job exists before I kill it? I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies

3. UNIX and Linux Applications

The ps command - process showing up even after application is shut down

Hi all, I'm very new to unix, I'm developing an application in Java, part of which requires me to check if a certain application is still running. In windows, I just use tasklist - if the application has been shut down it won't appear in the task list. I've been trying to use the ps command to... (0 Replies)
Discussion started by: ekatmcg
0 Replies

4. Solaris

To Shut down the server. Do the Maintainance and Start Up the server

Hello All I just want to know how to Shut Down the Solaris Machines( Servers ) for Maintainance and then Start Up the Machines ( Servers ) . I think I will have to Log In as root to do that . Also how do i Check if all the services running on that server before shut down are running... (6 Replies)
Discussion started by: supercops
6 Replies

5. UNIX for Dummies Questions & Answers

cant start httpd process

httpd status is stopped.cant start it again by : /etc/init.d/httpd restart or /etc/init.d/httpd/start help needed (2 Replies)
Discussion started by: raksha.s
2 Replies

6. Shell Programming and Scripting

Script - How to automatically start another process when the previous process ends?

Hi all, I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this: 1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently. 2) So I loaded datafile A... (10 Replies)
Discussion started by: luna_soleil
10 Replies

7. Shell Programming and Scripting

How to start a process.. from a different host ...

Hi ! I want to start and stop a process... on different machines(HOSTS) example : I have machine1..machine2..machine3 And I have a NFS file system. (Wlsuite/myfile/) I'm writing a script that will start processes in machine1.... machine2.... Preferably.. I dont want to log... (1 Reply)
Discussion started by: dashok.83
1 Replies

8. Shell Programming and Scripting

how to start a process and make it sleep for 5 mins and then kill that process

how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies

9. Programming

get process start time

Hi all, I like to know how can I get currenlty running process start time and date , I know only porcess id in solaris and hp-ux and what is command to get same using ps with switch. Thanks Naeem (1 Reply)
Discussion started by: naeem ahmad
1 Replies

10. UNIX for Dummies Questions & Answers

Start Up and Shut down

I've never been on a Unix machine so please be easy on me!!! I need to create a step by step process for the Unix start up and shut down process. Thanks for any help in advance. (3 Replies)
Discussion started by: chaughney
3 Replies
Login or Register to Ask a Question