Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using script to launch/kill Win32 programs

Status
Not open for further replies.
Dec 29, 1998
1
US
I am absolutely NEWBIE to Tcl and am initially looking to solve a single problem:<br>
<br>
I have a remote NT box with a remote control host program running on it for tech support purposes. The remote control program intermittently loses it's ability to accept dialups. Having the non-computer literate users at the remote end exit and restart the remote control host software fixes the problem. I want to have the NT at command scheduler launch a script periodically to execute, stop and restart the host program. I can get Tcl to launch an executable using the exec function, but when I do, the script halts until I exit the executable I launched, then continues. Can I do what I want to do with a Tcl script? If so, what do I need to do to have the script execute then kill the Win32 host program?<br>
<br>
TIA<br>
<br>
John<br>

 
I dont know the first thing about Tcl, but I do know Win32, and when I hear speak of killing (ie terminating) Win32 processes or threads I always get on my soap box about it. This isnt Unix, and Im afraid theres almost nothing in Win32 you can kill without side effects under one service pack/internet explorer/video setting or whatever. Comms stuff is particularly sensetive. If you try to treat the symptoms here instead of the cause, believe me, you'll never hear the last of it. <br>
<br>
It sounds as if youve got some threads locking against each other. Did you throw a critical section around everything in sight like MS tell you to? Maybe you made life difficult for yourself by implementing it as a service. <br>
<br>
If you really dont have the patience to clean up the multithreading, do it with a single thread and polling, it'll be almost as good and a hell of a lot easier to look after. <br>
<br>
If Ive been guessing right so far about what youve been doing, let me know and Ill tell you how to debug the multithreading.<br>
<br>
Adrian.<br>
<br>

 
is your remote host running as a service ?<br>
maybe u can just rite a 'start.bat' that<br>
u schedule to run...<br>
<br>
your batch file will just use the NET START command.<br>
eg. net start apache<br>
<br>
in my example apache is webserver service.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top