Mar. 13, 2004, 10:26 PM
Mar. 13, 2004, 11:00 PM
Try this:
http://members.ozemail.com.au/~enigman/vbs.../vb_binfo6.html
Script source link doesn't work...
http://members.ozemail.com.au/~enigman/vbs.../vb_binfo6.html
Script source link doesn't work...
Mar. 14, 2004, 12:16 AM
That's JavaScript too. It wasn't for HTML either, I want it for a VBS file.
Mar. 14, 2004, 06:36 AM
Quote:http://members.ozemail.com.au/~enigman/v...info6.html
The Nosy Javascript filter stops it.
Mar. 16, 2004, 12:36 AM
Well, I still can't see the source, but none of you know a simple line a code to get the OS?
Mar. 16, 2004, 07:55 AM
Shea,
No, in VBScript, I don't know a simple line of code, for anything. [lol]
In the Document Object Model (DOM), you want to access the window.navigator.oscpu object - that will return the OS no matter what scripting language asked for it.
In your researches on the DOM, I do not recommend that you spend much time at the W3C site - they go out of their way to make sure that this kind of information is not available. For some reason, they seem to think that all anybody would ever be interested in is how the DOM was originally made. A pox upon them, I say.
Instead, I Googled for 'DOM reference', and the first hit was the Gecko project. Everything was laid out nice and clear, and any script programmer worth his/her salt should keep this site bookmarked for future reference.
So says....
Oddysey
No, in VBScript, I don't know a simple line of code, for anything. [lol]
In the Document Object Model (DOM), you want to access the window.navigator.oscpu object - that will return the OS no matter what scripting language asked for it.
In your researches on the DOM, I do not recommend that you spend much time at the W3C site - they go out of their way to make sure that this kind of information is not available. For some reason, they seem to think that all anybody would ever be interested in is how the DOM was originally made. A pox upon them, I say.
Instead, I Googled for 'DOM reference', and the first hit was the Gecko project. Everything was laid out nice and clear, and any script programmer worth his/her salt should keep this site bookmarked for future reference.
So says....
Oddysey
Mar. 16, 2004, 04:16 PM
If you want to run the script locally, you can get the info from the registry ...
... or the system environment
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName")
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
WScript.Echo WshSysEnv("OS")
Mar. 16, 2004, 10:34 PM
Thanx sidki, I had the system environment code, but it wasn't working. Now i realize I was missing part of it.
Mar. 17, 2004, 10:30 PM
Sorry guys, it still isn't working. When the message box pops up to tell the OS, it's blank. I have Win98 and WSH 5.6 if that matters.
Mar. 17, 2004, 10:55 PM
IIRC there is no "OS" environment variable in Win98 (type "set" in a DOS box).
However, there is an OS value in the registry:
HKLM\Software\Microsoft\Windows\CurrentVersion\ProductName
HTH
However, there is an OS value in the registry:
HKLM\Software\Microsoft\Windows\CurrentVersion\ProductName
HTH