#73434 - 2003-02-25 04:07 PM
Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
I have my login script checking OS using @PRODUCTTYPE for informational purposes only. Would i would like to do is if the OS is windows 95 or any flavour of server then the command won't run. Otherwise it will run the script, here is the following piece off script. Can any recomend.
Thanks James
If @PRODUCTTYPE = "windows 95" endif else InGroup ("MIS") shell "\\dc01\netlogon\vplogon.bat >c:\vplogonerrors.txt" endif
|
|
Top
|
|
|
|
#73436 - 2003-02-25 04:13 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
The OS's are windows 95/98/2000/XP and 2000 server. Thanks
|
|
Top
|
|
|
|
#73438 - 2003-02-25 04:17 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
Unfortunalty yes, it is a upgrade to norton antivirus corporate edition, windows 95 is no longer support so if a 95 machine runs the script then the user gets a error message box coming up stating that the OS is not supported.
Thanks
|
|
Top
|
|
|
|
#73440 - 2003-02-25 04:34 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
Can i not use the @producttype as this outputs the OS eg win95, win98 etc
Thanks
|
|
Top
|
|
|
|
#73443 - 2003-02-25 05:17 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
The answer by maciep looks like it might work although i get
Error: ELSE without IF!
Any idea's
Thanks
|
|
Top
|
|
|
|
#73445 - 2003-02-25 05:30 PM
Re: Checking os before installing
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Don't forget DC's though...
code:
If InStr(@ProductType,"Server") or InStr(@ProductType,"Domain Controler") or InStr(@ProductType,"Windows 95") ? "Sorry you cannot install Norton." Else ? "Installing Norton..." EndIf
|
|
Top
|
|
|
|
#73446 - 2003-02-25 05:38 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
Thanks to everyone who posted help, the problem is now resolved.
|
|
Top
|
|
|
|
#73448 - 2003-02-25 06:02 PM
Re: Checking os before installing
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
You could for example use the OSID() - Identifies operating system, service pack level, and OS kernel UDF which will give you precise information about different Windows 95 systems and computer roles like workstation, server, domain controller.
And, BTW, I do use this extensively as I heavily rely on the OS Kernel info and server roles in my scripts. [ 25. February 2003, 18:02: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
#73449 - 2003-02-26 10:35 AM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
I have found another problem with the script the OS check piece is working if it is win95 or a server it skips install. But once it has confirmed the OS it should confirm the user is in the group if they are not it still installs
Any Idea's
If @PRODUCTTYPE = "windows 95" or instr(@PRODUCTTYPE, "Server") or InStr(@ProductType,"Domain Controler") <> 0 else InGroup ("MIS") shell "\\potlldc01\netlogon\vplogon.bat >c:\vplogonerrors.txt" endif
|
|
Top
|
|
|
|
#73453 - 2003-02-26 04:55 PM
Re: Checking os before installing
|
Anonymous
Anonymous
Unregistered
|
I have found the problem and resolved it, I was not reading my own script and missed out the IF statement.
Thanks
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|