Page 1 of 1 1
Topic Options
#111919 - 2004-01-16 06:55 PM Non-terminating script
knutt Offline
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
#111920 - 2004-01-16 07:42 PM Re: Non-terminating script
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Possibly that the installation program isn't terminating properly. Depends on how you may have called the installation routine. I'm guessing you used shell.
Top
#111921 - 2004-01-16 08:20 PM Re: Non-terminating script
Howard Bullock Offline
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#111922 - 2004-01-16 09:53 PM Re: Non-terminating script
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Also, under Windows x9 it is helpful to have an EXIT 0 in the last line of the calling batch file to terminate it.
_________________________
There are two types of vessels, submarines and targets.

Top
#111923 - 2004-01-16 10:39 PM Re: Non-terminating script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Also, the second last line should be:

CLS


Edited by Les (2004-01-16 10:57 PM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#111924 - 2004-01-17 12:16 AM Re: Non-terminating script
knutt Offline
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 Offline
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 Offline
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 Offline
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 Offline
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
#111929 - 2004-01-18 10:04 PM Re: Non-terminating script
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Quote:

If I'm not mistaken, this would be active on the NEXT boot




I agree...
_________________________
Co


Top
#111930 - 2004-01-18 11:27 PM Re: Non-terminating script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I disagree... but it may depend on whether you RunLogonScriptSync.
Code:
IF (WriteValue("HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0)
IF (WriteValue("HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce","FxNimdaE","\\ffnms\NimdaE\FxNimdaE\FxNimdaE.com","REG_SZ") <> 0)

EndIf
EndIf

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#111931 - 2004-01-19 09:29 PM Re: Non-terminating script
jpeachman Offline
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
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.149 seconds in which 0.111 seconds were spent on a total of 11 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org