#71655 - 2002-11-20 12:29 AM
Trying to run smsls.bat
|
JasLC
Fresh Scripter
Registered: 2002-05-29
Posts: 39
Loc: Fort Worth
|
I am trying to run smsls.bat through kix32, but keep getting an error when kixtart login script is run. The error says...
'and' is not recognized as an internal or external command, operable program or batch file. 'C:\Documents' is not recognized as an internal or external command, operable program, or batch file.
The user's profile within Active Directory is set to run logon.bat from the NETLOGON SHARE.
The logon.bat file runs the command "kix32.exe sms.kix"
The sms.kix file runs the following code:
code:
IF INGROUP("ITDEPT") IF @INWIN=1 SHELL "@LANROOT\CMD /E:1024 /C @LSERVER\NETLOGON\SMSLS.BAT" ELSE SHELL "@LSERVER\NETLOGON\SMSLS.BAT" ENDIF ENDIF
Can anyone help?
Thanks, Jason
|
|
Top
|
|
|
|
#71657 - 2002-11-20 12:51 AM
Re: Trying to run smsls.bat
|
JasLC
Fresh Scripter
Registered: 2002-05-29
Posts: 39
Loc: Fort Worth
|
Okay, I think I have found the problem. I modified smsls.bat by changing "@echo off" to "@echo on". I also put a "pause" at the beginning. After these modifications the smsls.bat is running upon logon. The errors occur during the following lines of the smsls.bat:
code:
:SLOWNETTEMP if not exist %TEMP%\SLOWNET.EXE goto SLOWNETSERVER %TEMP%\SLOWNET.EXE %0 if errorlevel 1 goto END
The above code generates the following error text during logon:
"if not exist C:\Documents and Settings\brentc\Local Settings\Temp\SLOWNET.EXE goto SLOWNETSERVER 'and' is not recognized as an internal or external command, operable program or batch file.
C:\Documents and Settings\brentc\Local Settings\Temp\SLOWNET.EXE \\SERV001\NETLOGON\SMSLS.BAT 'C:\Documents' is not recognized as an internal or external command, operable program or batch file."
So, because there are not quotes around the "C:\Documents and Settings etc..." part, then it is generating the error.
This error is only happening on a Windows 2000 client. I wouldn't think that I'm the first to have this error unless the %temp% variable is set incorrectly somehow.
What should I do?
Thanks, Jason
|
|
Top
|
|
|
|
#71661 - 2002-11-20 02:17 AM
Re: Trying to run smsls.bat
|
JasLC
Fresh Scripter
Registered: 2002-05-29
Posts: 39
Loc: Fort Worth
|
Instead of putting a " around every path within the smsls.bat file, I followed Microsoft's recommendations within the KB article, SMS 2.0 Clients Do Not Complete Installation Due to a Space in the TEMP Environment Variable.
I am kicking off the smsls.bat file from a kix32 login script and it's working well for both Win9x and W2K clients.
Thanks, Jason
|
|
Top
|
|
|
|
#71663 - 2002-11-20 03:02 PM
Re: Trying to run smsls.bat
|
JasLC
Fresh Scripter
Registered: 2002-05-29
Posts: 39
Loc: Fort Worth
|
I haven't see that running an .exe instead of the smsls.bat file is a Microsoft Best Practice. If you have a link to the Microsoft documentation recommendations to support that, I'll consider implementing it.
Thanks, Jason
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 837 anonymous users online.
|
|
|