RE: [info-tech] Logon vbscript

2010-05-18 Thread Richardson,Tony
No currently we have some very basic logon batches with just a few drive
mappings. Below is a vbscript I just whipped up. I would welcome
suggestions for improvements. Remove the echos and replace them with
required code for the logon. Seems to work.

 

strComputer = "."  

  

Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")   

Set objOS = objWMIService.ExecQuery ("select * from
Win32_OperatingSystem where Primary=true")   

For Each osInfo in objOS

OS = OSInfo.version

Next  

 

If OS = "5.1.2600" Then

wscript.echo "Windows XP"

ElseIf OS = "6.0.6002" Then

wscript.echo "Windows Vista"

ElseIf OS = "6.1.7600" Then

wscript.echo "Windows 7"

ElseIf OS = "5.2.3790" Then

wscript.echo "Windows 2003"

ElseIf OS = "6.0.6002" Then

wscript.echo "Windows 2008"

ElseIf OS = "6.1.7600" Then

wscript.echo "Windows 2008 R2" 

Else

  'some other op system

End If

 

____

From: info-tech-ow...@aea8.k12.ia.us
[mailto:info-tech-ow...@aea8.k12.ia.us] On Behalf Of Stanzel, Matt
Sent: Tuesday, May 18, 2010 8:23 AM
To: info-tech@aea8.k12.ia.us
Subject: RE: [info-tech] Logon vbscript

 

Tony, does your current script do detection based on Windows NT version?
If so, you can add a line to detect Windows NT 6.1. 

 

From: Richardson,Tony [mailto:trichard...@humboldt.k12.ia.us] 
Sent: Tuesday, May 18, 2010 7:28 AM
To: info-tech@aea8.k12.ia.us
Subject: [info-tech] Logon vbscript

 

Anyone got a logon vbscript that detects Windows 7. If this is on the
internet I guess I'm not asking the right questions in order to find it.

 

Thanks,

Tony Richardson

Network Administrator/Director of Technology

Humboldt Community Schools

trichard...@humboldt.k12.ia.us

or

l...@edu: trichard...@humboldtschools.org

 

 



RE: [info-tech] Logon vbscript

2010-05-18 Thread Stanzel, Matt
Tony, does your current script do detection based on Windows NT version?
If so, you can add a line to detect Windows NT 6.1. 

 

From: Richardson,Tony [mailto:trichard...@humboldt.k12.ia.us] 
Sent: Tuesday, May 18, 2010 7:28 AM
To: info-tech@aea8.k12.ia.us
Subject: [info-tech] Logon vbscript

 

Anyone got a logon vbscript that detects Windows 7. If this is on the
internet I guess I'm not asking the right questions in order to find it.

 

Thanks,

Tony Richardson

Network Administrator/Director of Technology

Humboldt Community Schools

trichard...@humboldt.k12.ia.us

or

l...@edu: trichard...@humboldtschools.org

 

 



RE: [info-tech] Logon vbscript

2010-05-18 Thread Richardson,Tony
Never mind found it the Win32_OperatingSystem version is "6.1.7600". Now
it is a cake walk. :-)

 



From: info-tech-ow...@aea8.k12.ia.us
[mailto:info-tech-ow...@aea8.k12.ia.us] On Behalf Of Richardson,Tony
Sent: Tuesday, May 18, 2010 7:28 AM
To: info-tech@aea8.k12.ia.us
Subject: [info-tech] Logon vbscript

 

Anyone got a logon vbscript that detects Windows 7. If this is on the
internet I guess I'm not asking the right questions in order to find it.

 

Thanks,

Tony Richardson

Network Administrator/Director of Technology

Humboldt Community Schools

trichard...@humboldt.k12.ia.us

or

l...@edu: trichard...@humboldtschools.org

 

 



[info-tech] Logon vbscript

2010-05-18 Thread Richardson,Tony
Anyone got a logon vbscript that detects Windows 7. If this is on the
internet I guess I'm not asking the right questions in order to find it.

 

Thanks,

Tony Richardson

Network Administrator/Director of Technology

Humboldt Community Schools

trichard...@humboldt.k12.ia.us

or

l...@edu: trichard...@humboldtschools.org