How to read a registry key in a script 
Author Message
 How to read a registry key in a script

I am trying to push an IE patch via a login script and know everything
except how to read the key that contains the version of ie in a script and
then do a IF or similair.

Or I could read the version of the .dll but I am unfaimliar with that
process as well. I am certianly "scripting for dummies" so any help is
appreciated.

TIA

Chris



Sat, 30 Jul 2005 22:50:03 GMT  
 How to read a registry key in a script
Hi,
here is a script that should help;

Brgds,

Bruno

set wshshell = wscript.createobject("wscript.shell")
iever = wshshell.regread("HKLM\Software\Microsoft\Internet
Explorer\Version")
wscript.echo iever

Quote:
>-----Original Message-----
>I am trying to push an IE patch via a login script and
know everything
>except how to read the key that contains the version of
ie in a script and
>then do a IF or similair.

>Or I could read the version of the .dll but I am

unfaimliar with that
Quote:
>process as well. I am certianly "scripting for dummies"
so any help is
>appreciated.

>TIA

>Chris

>.



Sat, 30 Jul 2005 23:26:10 GMT  
 How to read a registry key in a script
One other question then, how can I take this value that the script gets and
then if it is one thing use this patch and if it is another use patch b?

Do you know a good resource for this stuff? I dont want to bug a nice person
tooo much! :)

Much Thanks!


Quote:
> Hi,
> here is a script that should help;

> Brgds,

> Bruno

> set wshshell = wscript.createobject("wscript.shell")
> iever = wshshell.regread("HKLM\Software\Microsoft\Internet
> Explorer\Version")
> wscript.echo iever

> >-----Original Message-----
> >I am trying to push an IE patch via a login script and
> know everything
> >except how to read the key that contains the version of
> ie in a script and
> >then do a IF or similair.

> >Or I could read the version of the .dll but I am
> unfaimliar with that
> >process as well. I am certianly "scripting for dummies"
> so any help is
> >appreciated.

> >TIA

> >Chris

> >.



Sat, 30 Jul 2005 23:50:52 GMT  
 How to read a registry key in a script

Quote:

> One other question then, how can I take this value that the script gets and
> then if it is one thing use this patch and if it is another use patch b?

Set oShell = CreateObject("Wscript.Shell")
sIEver = oShell.RegRead("HKLM\Software\Microsoft\Internet Explorer\Version")

If sIEver = "5.50.4807.2300" Then
  WScript.Echo "IE is v5.5 SP2"
ElseIf sIEver = "6.0.2800.1106" Then
  WScript.Echo "IE is v6.0 SP1"
Else
  WScript.Echo "I don't know this IE version"
End If

' alternatively
Select Case sIEver
  Case "5.50.4807.2300"
    WScript.Echo "IE is v5.5 SP2"
  Case "6.0.2800.1106"
    WScript.Echo "IE is v6.0 SP1"
  Case Else
  WScript.Echo "I don't know this IE version"
End Select

Quote:
> Do you know a good resource for this stuff? I dont want to bug a nice person
> tooo much! :)

WSH 5.6 documentation download:
http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/00...

and as my sig states:
Administration scripting examples and a ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Starting e.g. here

Scripting Concepts and Technologies for System Administration
http://www.microsoft.com/technet/scriptcenter/scrguide/sas_pt1_overvi...

Here are some Windows Script Host (WSH)  Web introductions:

WSH
http://cis.stvincent.edu/wsh/index.html

Introduction to Windows Scripting
http://www.winguides.com/article.php?id=2

NT Gains Scripting Muscle
An introduction to Windows Script Host by Bob Wells.
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=3026

Scripting 101
A 4 part series on how to create and structure WSH scripts by Bob Wells
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5410
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5505
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=5683
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=7112

VBScript Primer
http://www.microsoft.com/technet/prodtechnol/windows2000serv/maintain...

Here is a newsgroup thread you should look at as well with links to other
resources:


Subject: beginner looking for resources
Newsgroups: microsoft.public.scripting.vbscript
Date: 2002-01-31 08:11:00 PST
http://groups.google.com/groups?hl=en&th=7015b808b5fb0cb4

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and a ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Sun, 31 Jul 2005 02:09:10 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Read Registry Keys and Trees / API Call for Registry access

2. Read Registry key via JScript

3. Reading Registry keys??

4. reading a registry key

5. Reading Binary Registry Keys

6. Reading key in registry

7. Read/write registry key using .asp or .hta

8. Reading registry keys in vbscript from ASP page

9. read/set registry key

10. Registry key reading

11. How to read registry key containing many string values

12. read (all) subkeys of a given registry key ?

 

 
Powered by phpBB® Forum Software