Discussion Locked

SMS called from a bach file

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

can anyone tell me why the SMSLS batch file is called for as follows
call %0\..\smsls.bat
why the use of %0\..

3 replies

by ann777

http://www.experts-exchange.com/Operating_Systems/WinNT/Q_11401298.html

One way to control the installation of the SMS client is to use only logon scripts to start the installation. If your logon script is called for example myscript.bat, make sure this is refered to as just myscript (without the .bat) in all users properties. This prevents SMS from modifying the script. Create a copy of the script (e.g. myscriptsms.bat) and add the following line at the end...

call %0\..\smsls.bat

Now you can migrate users in a controlled manner by changing their logon script to myscriptsms.

This of course assumes that users are associated with specific machines and not roaming. If your users are roaming you may have to use other criteria to determine whether or not to run smsls.bat (again from the logon script). You could for example create a file containing a list of machines which require the client to be installed called machines.txt

In your logon script you could include the following code:

find /I "%computername%" machines.txt
if "%errorlevel%" == 1 goto nosms
call %0\..\smsls.bat
:nosms

by ann777

I believe the %0\ refers to a default path... but I cannot find any proof of that. The line itself seems to be always in that specific format.

Hopefully this helps?

This discussion is closed to new replies.