Page 1 of 1 1
Topic Options
#71655 - 2002-11-20 12:29 AM Trying to run smsls.bat
JasLC Offline
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
#71656 - 2002-11-20 12:36 AM Re: Trying to run smsls.bat
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Jason,

is "kix32 sms.kix" the only line in logon.bat? If not please post the .bat too.

Also try replacing @LANROOT\CMD with %COMSPEC%

Does the smsls.bat run at all? (place an "echo In smsbatch" and a "pause" statement at the beginning of smsls.bat)

Can you also give us more info about the clients and which KiX version is used??
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#71657 - 2002-11-20 12:51 AM Re: Trying to run smsls.bat
JasLC Offline
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
#71658 - 2002-11-20 12:57 AM Re: Trying to run smsls.bat
JasLC Offline
Fresh Scripter

Registered: 2002-05-29
Posts: 39
Loc: Fort Worth
Okay, just found a KB article...
SMS 2.0 Clients Do Not Complete Installation Due to a Space in the TEMP Environment Variable

I'm going to test the KB article and see what happens. [Smile]

-Jason

Top
#71659 - 2002-11-20 12:59 AM Re: Trying to run smsls.bat
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I put a call to smsls.bat as the last line before exit in my logon.bat rather than trying to run it from KiX>
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71660 - 2002-11-20 01:03 AM Re: Trying to run smsls.bat
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Did that too for win2k.

You could try to modify the smsls.bat by putting the " a round every path...

Let us know!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#71661 - 2002-11-20 02:17 AM Re: Trying to run smsls.bat
JasLC Offline
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 [Smile]

Top
#71662 - 2002-11-20 04:25 AM Re: Trying to run smsls.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
there is still no need to use that bat anymore as you can directly call the exe.
the bat is just supporting stuff which can be passed.
_________________________
!

download KiXnet

Top
#71663 - 2002-11-20 03:02 PM Re: Trying to run smsls.bat
JasLC Offline
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
#71664 - 2002-11-20 03:07 PM Re: Trying to run smsls.bat
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I know, it's better to do as they say, so you can't be blaimed.
my own recommendation was that it worked just fine in 5000+ user environment.
_________________________
!

download KiXnet

Top
#71665 - 2002-11-20 04:15 PM Re: Trying to run smsls.bat
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See also Proper use of quotes
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.061 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

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