Home All Groups Group Topic Archive Search About


Author
12 May 2005 12:31 PM
Juan
i have scripts for windows 2000 pc's and I have scripts for windows xp pc's
and windows 98 and so on
That runs in the morning when people switch on there pc's

I have now made 1 vbs script and taken al the scripts and put them into the
file

But what happens now is that the windows xp pc will run windows 98 scripts
and windows 98 will run xp pc scripts “all o/s will run there script and the
other scripts

So I would like my script to begin and check what o/s is running and run
only the selected scripts in the file


Example

Check o/s ver

Windows 98*************************then run

Const OverwriteExisting = true

Set oFSO = CreateObject("Scripting.FileSystemObject")

sSourceFile = "\\enterprise\netlogon\slide1.bmp"

' When specifying just a folder name for destination, be
' sure to add a trailing backslash!
sDestination = "C:\"

oFSO.CopyFile sSourceFile, sDestination, OverwriteExisting

Windows 2000 ***********************then run



Windows xp ************************then run

Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\printserver\Production",
"Production"

windows 2003*********************then run


I will add the specific content in the correct place
I would like them all in one .vbs file






--
Juan Bredenkamp

Author
12 May 2005 4:47 PM
Torgeir Bakken (MVP)
Juan wrote:

Show quote
> i have scripts for windows 2000 pc's and I have scripts for windows xp pc's
> and windows 98 and so on
> That runs in the morning when people switch on there pc's
>
> I have now made 1 vbs script and taken al the scripts and put them into the
> file
>
> But what happens now is that the windows xp pc will run windows 98 scripts
> and windows 98 will run xp pc scripts “all o/s will run there script and the
> other scripts
>
> So I would like my script to begin and check what o/s is running and run
> only the selected scripts in the file
Hi,

See e.g. the function GetOsVersionNumber here:

http://groups.google.co.uk/group/microsoft.public.windowsxp.setup_deployment/msg/0578b298bc7c08a9?dmode=source&hl=en


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

AddThis Social Bookmark Button