Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 30th, 2003, 06:09 AM
Authorized User
 
Join Date: Dec 2003
Location: JHB, , South Africa.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Determine OS

Hello,

Does anyone know how to determine which OS is being used? At the moment I am using sysinfo and it returns the same for 2000 and NT4, I presume that it looks at the file system or something...

Any help would be great.

Thanks,

Adam
Reply With Quote
  #2 (permalink)  
Old January 3rd, 2004, 04:32 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: Johannesburg, , South Africa.
Posts: 141
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acdsky
Default

Hi

This might not be the ideal way but normally I use:

Set oShell = CreateObject("Wscript.Shell")
arrRegValue = oShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Micros oft\Windows NT\CurrentVersion\ProductName")

This will read the productName value in the reg and depending on the value do whatever. Normally if u only running 2 OS versions you could only check for the common one then assume the rest would be the other.

Maybe this helps.

Regards
Marnus

Such is Life!
Reply With Quote
  #3 (permalink)  
Old January 5th, 2004, 02:26 AM
Authorized User
 
Join Date: Dec 2003
Location: JHB, , South Africa.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Marnus,

Thanks for your help, it looks like just what I was looking for. I will give it a go and see what happens.

Thanks,

Adam

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine Credentials bmumph C# 2 November 1st, 2005 12:18 PM
Need Help: Can't determine cause of error xgbnow Visual C++ 3 September 22nd, 2003 05:00 PM
OS chaos2003 Linux 1 August 26th, 2003 12:12 PM
JRun4 for Mac OS + Mac OS X's Java 1.4.1 elbicho J2EE 0 June 27th, 2003 12:18 PM
Determine if something has already been selected harpua Classic ASP Basics 1 June 13th, 2003 01:02 AM



All times are GMT -4. The time now is 09:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.