I would like
to exclude machines with the letters RDG in the computer name from being
detected as a slow link and not having the SMS client installed. I want it
for these machines only, all others, when detected as slow link, should not
have the client installed. I believe I need to edit the 'smsls.bat'
file, but I am not sure how to do this.
The reason I want to run it over a slow link is that I have to have it
installed in 120 of our stores, no matter what the connection. I don't want
to mess with the speed of connection setting. We have most of our stores on
T1 lines, so I'm not sure why this would detect it as slow. Plus, I don't
want the SMS client installed on any laptops in the field.
Contributed By: Dave Halperin
on
the
SMS Forum
To solve my problem
I added
the following lines
(minus the **'s)
to
the beginning of the 'smsls.bat'.
*************************************************
echo %COMPUTERNAME%
| findstr /B /L /I "RDG" >NUL
if %errorlevel% ==
0 goto SERVER
***************************************************
REM Exit script if OS is unknown or if Windows Terminal Server
if %SMS_UNSUPPORTED_OS%.
== TRUE. goto END
if not %WINSTATIONNAME%.
== . goto END
if not .%OS%. == .Windows_NT.
goto OK_TO_PROCEED
REM the OS is
Windows NT, check for Processor Architecture
if .%PROCESSOR_ARCHITECTURE%.
== .x86. goto CHECK_REMOTE_SESSION
if .%PROCESSOR_ARCHITECTURE%.
== .ALPHA. goto CHECK_REMOTE_SESSION
REM Unsupported
processor e.g. IA64, AMD64, MIPS, PPC
goto END
:CHECK_REMOTE_SESSION
if .%SESSIONNAME%.
== .. goto OK_TO_PROCEED
if /i .%SESSIONNAME%.
== .Console. goto OK_TO_PROCEED
REM System is NT,
and session name indicates this is a remote session
goto END
:OK_TO_PROCEED
if %SMS_LOCAL_DIR%.
== . goto SLOWNETUSER
if not exist %SMS_LOCAL_DIR%\MS\SMS\CORE\BIN\SLOWNET.EXE
goto SLOWNETUSER
%SMS_LOCAL_DIR%\MS\SMS\CORE\BIN\SLOWNET.EXE
%0
if errorlevel 1
goto END
if not exist %SMS_LOCAL_DIR%\MS\SMS\CORE\BIN\SMSBOOT1.EXE
goto USER
%SMS_LOCAL_DIR%\MS\SMS\CORE\BIN\SMSBOOT1.EXE
-S %0 -N -WINDIR=%WINDIR%
goto END
:SLOWNETUSER
if %SMS_LOCAL_DIR_USER%.
== . goto SLOWNETTEMP
if not exist %SMS_LOCAL_DIR_USER%\MS\SMS\CORE\BIN\SLOWNET.EXE
goto SLOWNETTEMP
%SMS_LOCAL_DIR_USER%\MS\SMS\CORE\BIN\SLOWNET.EXE
%0
if errorlevel 1
goto END
:USER
if %SMS_LOCAL_DIR_USER%.
== . goto SERVER
if not exist %SMS_LOCAL_DIR_USER%\MS\SMS\CORE\BIN\SMSBOOT1.EXE
goto SERVER
%SMS_LOCAL_DIR_USER%\MS\SMS\CORE\BIN\SMSBOOT1.EXE
-S %0 -N -WINDIR=%WINDIR%
goto END
:SLOWNETTEMP
if not exist
%TEMP%\SLOWNET.EXE goto SLOWNETSERVER
%TEMP%\SLOWNET.EXE
%0
if errorlevel 1
goto END
:SERVER
%0\..\SMSBOOT1.EXE
-S %0 -N -WINDIR=%WINDIR%
goto END
:SLOWNETSERVER
%0\..\SNBOOT.EXE
if errorlevel 1
goto END
%0\..\SMSBOOT1.EXE
-S %0 -N -WINDIR=%WINDIR%
:END
|