Page 1 of 1 1
Topic Options
#55943 - 2001-05-18 12:31 AM Checking if SMS is installed through login script
dbortunk Offline
Fresh Scripter

Registered: 2001-05-18
Posts: 36
Loc: USA
We are migrating from Novell to NT and I am using kix as the login script. On the novell server we had a script that would check is SMS_LOCAL_DIR was set as a environment variable and if it was it would not launch the executable. How could i do the same thing with kix? i have tried everything but i cannot get it to work.

Novel script

;CHECK FOR SMS 2.0 Client, Skip if Found
IF "%<SMS_LOCAL_DIR>" <> "" THEN
GOTO NOSMS

Top
#55944 - 2001-05-18 02:48 AM Re: Checking if SMS is installed through login script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
dbortuk,
You may want to have the SMS installation
code run everytime. It will only run for
about 5 -15 seconds (in the background process).
even if the system has SMS installed. It
will verify files and installation are correct
and that know one has deleted or disabled
SMS manually at the desktop. However, this
code should do the trick for you.

code:
IF %SMS_LOCAL_DIR% = "%WINDIR%"  ; if found it will quit this section of code
; to verify code on screen you can put in the line below
? "SMS is installed" ; remove once satisfied it works
ELSE
; to verify code on screen you can put in line below
? "SMS is not installed " ; remove once satisfied it works
; call your SMS installation code or batch file here...
ENDIF


Top
#55945 - 2001-05-18 11:05 AM Re: Checking if SMS is installed through login script
Anonymous
Unregistered


Try this:
code:

if exist("SMS_LOCAL_DIR")
goto NoSMS
endif
; Do the SMS stuff here

:NoSMS



Top
#55946 - 2001-05-18 04:48 PM Re: Checking if SMS is installed through login script
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Isn't WMI a part of this?

You could look for the following as well:

EXIST("%windir%\system32\wbem\.")

Oh well..

- Kent

------------------
Moderator/Admin
Get/Post Scripts
http://www.win-scripts.com

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#55947 - 2001-11-09 02:26 PM Re: Checking if SMS is installed through login script
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Here is what I use to install SMS on machines. It has helped out greatly with our sms installs.

code:

:Installsms ; INSTALL SMS RMOTE CONTROL PACKAGE
IF exist ("%windir%\MS\SMS\Core\Bin\00000409\SMSMan.exe") = 1
$SMSInstalled = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\SMS\Client\Client Components\SMS Client Base Components\Installation Properties","SMS Client Installation State")
if $SMSInstalled <> "Installed"
SHELL "%windir%\MS\SMS\Core\Bin\00000409\SMSMan.exe /Q"
ENDIF
Else
IF @inwin = 1 ; 1=NT 2=95
shell "%comspec% /e:1024 /c \\rvbisdcdor01\netlogon\smsls.bat"
ELSE
shell "%windir%" + "\command\command.exe /e:1024 /C \\rvbisdcdor01\netlogon\smsls.bat"
ENDIF

:Endinstallsms


_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

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 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.05 seconds in which 0.024 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