#111919 - 2004-01-16 06:55 PM
Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
I have been tinkering with our new logon script at work and have noticed that sometimes the kix script (or rather kix32.exe - or wkix32.exe) just plain hangs after it has finished effectuating my new script - the minimized console window never disappears. The only special thing I do in my script is calling up the Trend Micro Office Scan installation file AutoPCC.exe.
Anyone have any idea?
|
|
Top
|
|
|
|
#111921 - 2004-01-16 08:20 PM
Re: Non-terminating script
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have seen this when running SMSLS.bat and some other programs via the RUN command as well. The logon scipt window remains open until all programs called be SMSLS.BAT terminate. If the program is suppose to run after the logon script terminate this sometimes causes a problem.
Are you using RUN or SHELL to invoke your code? IF you are using SHELL try RUN. IF you are using RUN then utilize the RUNONCE key to launch your program.
|
|
Top
|
|
|
|
#111924 - 2004-01-17 12:16 AM
Re: Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
I use RUN, actually. Utilizing RUNONCE is something to try. I'll change my script and retest on Monday. Thanks!
The setup (or actually, setup/update application) does indeed run after the rest of the shell terminates. I can see that is the case because the output of the autopcc process appends to the last line of my output.
|
|
Top
|
|
|
|
#111925 - 2004-01-17 12:19 AM
Re: Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
Yeah - I agree. It gives a proper ending to the script. I'll implement that one too! Thanks!
|
|
Top
|
|
|
|
#111926 - 2004-01-17 12:21 AM
Re: Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
Ummm... Why? I need some of the output for various purposes if I run the script from the command line.
|
|
Top
|
|
|
|
#111927 - 2004-01-17 12:23 AM
Re: Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
Close, but no cigar. I used the RUN command....
|
|
Top
|
|
|
|
#111928 - 2004-01-18 09:14 PM
Re: Non-terminating script
|
knutt
Fresh Scripter
Registered: 2004-01-16
Posts: 10
|
One more question... How would you create a script that utilizes the RUNONCE key? If I'm not mistaken, this would be active on the NEXT boot. If you disagree, please provide a tiny example.
|
|
Top
|
|
|
|
#111931 - 2004-01-19 09:29 PM
Re: Non-terminating script
|
jpeachman
Fresh Scripter
Registered: 2002-11-18
Posts: 39
|
Quote:
If I'm not mistaken, this would be active on the NEXT boot.
See the info at STARTUP ORDER FOR WINDOWS NT4/2000/XP and, for a better explanation of Win9x behavior (there's a list on the above-referenced page but it doesn't show where login processing occurs under Win9x), ScriptLogic's article How the various Run, RunOnce, RunServices, and RunServicesOnce registry keys are sequenced.
Under all flavors of Windows, both the HKLM\RunOnce and the HKCU\RunOnce keys are executed AFTER the login script is processed. I've used this myself in a Win9x environment, and it works fine. Haven't tried it under NT/2K/XP, but Les makes a good point: you might need to be sure you are running logon scripts synchronously under NT/2K/XP for this to always work, which you can control by policy or by modifying the registry (see Run Logon Scripts Synchronously).
So, the short answer is, it happens on the current login, not the NEXT boot.
Joe
Edited by jpeachman (2004-01-19 09:33 PM)
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1471 anonymous users online.
|
|
|