#95068 - 2002-11-01 02:46 AM
RUN & RunLogonScriptSync
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
There are times when one may want to execute an external program from the logon script. The desire being that the previously mentioned external program RUNs independently from the KiXtart logon script process. Well we know that SHELL is not the what we want, but RUN seems like the ticket. So...RUN is used to launch SMSLS.BAT.
What I have experienced with 4.02 on W2K is:
Shell work great but the logon script can be delayed during the execution of the SMSLS.BAT and related code as expected.
When RUN is used the KiXtart logon script console, sometimes remains after the logon script finishes. The logfile records that the KiXtart script code ends and the last line of the batch file used to call the Kix code executes. When this happens the window can not be closed of course.
So I added some additional code that I expected would better isolate the executing external program: Run | Shell '%comspec% /c Start ... SMSLS.BAT'. In both cases, the START command will leave a new console window open after SMSLS finishes. No big deal I thought. We can add an EXIT to the SMSLS.BAT file. But what really concerned me was that when SMSLS took a while to execute the LOGON script window remained until the DOS prompt appeared in the SMSLS window thus holding up the loading of the desktop.
That would seem to indicate that any program executed from the logon script has to complete before KiXtart or the "LOGON" session can terminate.
If that is the case, is there any REAL value to using RUN?
Does anyone know a way to truly spawn an independent process from the logon script other than using the RUNONCE key?
Is this KiXtart or the RunLogonScriptSync value that is the true culprit?
|
|
Top
|
|
|
|
#95072 - 2002-11-01 04:05 PM
Re: RUN & RunLogonScriptSync
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
sealeopard, I have added the exit and will see if that shows a noticable different.
LLigetfa, I have discussed that with the SMS team, but they wanted to keep it separate incase they wanted to adjust it in some fashion. With it separate, there would not be any need to alter the Kix code.
Although I typed a bunch of crap in my original post, the real point of what I would like to discuss is the observed issue that the logon script window WAITED for the "%comspec% /c START SMSLS.BAT" to finish before the window closed.
In case anyone is interested, this is my batch file. code:
@ECHO OFF
:: Set environment variables SET A=CRC: SET C=Xcopy SET D=Xcopy ERROR: SET L=%Temp%\Logon.log SET C1=CRC32.exe SET K1=kix32.exe SET KixPath=%0\..\kix32\402 SET UtilPath=%0\..\utils SET COPYCMD=/Y SET CORPRUN=-prd SET LOCALRUN=-prd if EXIST %windir%\corp.tst SET CORPRUN=-tst if EXIST %windir%\local.tst SET LOCALRUN=-tst
echo Start logon script batch file >%L% echo.
:: Determine OS IF '%OS%'=='Windows_NT' GOTO WinNT
SET windir= SET windir= IF '%windir%'=='' SET OS=DOS IF '%OS%'=='' IF '%windir%'=='' SET OS=Windows_3.x IF '%OS%'=='' SET OS=Win9x IF '%OS%'=='Win9x' GOTO Cont
echo DOS and Windows 3.x are not supported! pause goto End
:WinNT date<nul >>%L% echo. >>%L% time<nul >>%L% echo. >>%L% echo PROCESSOR_ARCHITECTURE=%PROCESSOR_ARCHITECTURE% >>%L% IF NOT '%PROCESSOR_ARCHITECTURE%'=='x86' Echo Only x86 Architecture is supported. >>%L% IF NOT '%PROCESSOR_ARCHITECTURE%'=='x86' GOTO End
:Cont
Set G=%Temp% IF '%OS%'=='Win9x' Set G=%windir=%
:: Perform CRC check of CRC32.exe, replace file if necessary echo. >>%L% set F=%C1% if NOT EXIST %G%\%C1% %C% %UtilPath%\%F% %G%\ >>%L% echo %A% %G%\%F% >>%L% %G%\%C1% -v 40960 17930e8e %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %UtilPath%\%F% %G%\ >>%L% if errorlevel 1 %C% %UtilPath%\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
:: Perform CRC check of Kix32.exe, replace file if necessary set F=%K1% echo %A% %G%\%F% >>%L% %G%\%C1% -v 204800 aff4a2b9 %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
IF '%OS%'=='Win9x' GOTO Win9x goto Exec
:Win9x SET F=kx16.dll echo %A% %G%\%F% >>%L% %G%\%C1% -v 47104 9777a905 %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
SET F=kx32.dll echo %A% %G%\%F% >>%L% %G%\%C1% -v 49152 98fb4015 %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
SET F=kx95.dll echo %A% %G%\%F% >>%L% %G%\%C1% -v 49152 61cd8e0f %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 %C% %KixPath%\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
:Exec SET F=Libr%CORPRUN%.kix echo %A% %G%\%F% >>%L% %G%\%C1% -v 19692 4d1ac46f %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %0\..\%F% %G%\ >>%L% if errorlevel 1 %C% %0\..\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
SET F=Corp%CORPRUN%.kix echo %A% %G%\%F% >>%L% %G%\%C1% -v 30764 3834ce70 %G%\%F% >>%L% if errorlevel 1 echo %A% %C% %0\..\%F% %G%\ >>%L% if errorlevel 1 %C% %0\..\%F% %G%\ >>%L% if errorlevel 1 echo %D% %errorlevel% >>%L% echo. >>%L%
echo %G%\%K1% %0\..\boot%CORPRUN%.kix $Script=corp $SPath=%G% >>%L% %G%\%K1% %0\..\boot%CORPRUN%.kix $Script=corp $SPath=%G%
:END echo End of corp-prd.bat >>%L% SET A= SET C= SET D= SET F= SET G= SET L= SET C1= SET K1= SET KixPath= SET UtilPath= SET COPYCMD= SET CORPRUN= SET LOCALRUN= cls Exit 0
|
|
Top
|
|
|
|
#95074 - 2002-11-01 09:14 PM
Re: RUN & RunLogonScriptSync
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Jens, using RUN SMSLS.BAT and the "Exit 0" at the end of my batch file still leaves the logonscript console at times.
I have never had this problem when the script used SHELL instead of RUN.
Thoughts on the RUN issue?
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 476 anonymous users online.
|
|
|