Solved

How I determine OS Type with KiXtart

Posted on 2011-09-17
4
1,492 Views
Last Modified: 2013-12-23
I've found the @DOS and @PRODUCTTYPE macros within KiXtart to get the OS information, but I can't find a reference that will tell me the possible values and how they relate to the operating system version.  For example on my Windows 7 installation @DOS returns 6.1  

I've also seen VBScript code that gets information from  winmgmts: Win32_Operatingsystem Caption

If I'm trying to write and enterprise script that is going to do its best anticipate the returning values what is the most reliable way to get the operating system version.  

My current problem is that I am trying to read the logon provider from the registry and the location is different when you use Windows 7.

For Windows 7 I use:
  Temp = ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnProvider")
    LogonProvider = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\" & Temp & "\"
    Temp = ReadReg(LogonProvider)

For other Windows I use:
    Temp = ReadReg("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName")


Thank you,
Dion
0
Comment
Question by:dstempfley
4 Comments
 
LVL 10

Expert Comment

by:acbxyz
ID: 36556583
@DOS returns the windows version as counted internally. Each wikipedia-page about Windows has a "current version" on the right. With this it is not possible to differ between W7 and W2008R2 (both 6.1) nor Vista or W2008 (both 6.0) - but paths are mostly on the same place on these server or desktop versions.
Older windows versions are printed on kixstart help pages
http://www.adminscripteditor.com/syntax.asp?act=v&id=44
In addition, you can use @BUILD, which returns the build number of the os.

If you are still using WinME or older, @INWIN could also be helpful:
http://www.adminscripteditor.com/syntax.asp?r=1&act=v&id=45
0
 
LVL 37

Accepted Solution

by:
Gerwin Jansen, EE MVE earned 125 total points
ID: 36557183
The dos command ver will return both Windows version and build number, for example for W7:

Microsoft Windows [Version 6.1.7601]

Here is a reference to the OS versions: msdn
0
 
LVL 15

Expert Comment

by:riteheer
ID: 37052158
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to count occurrences of each item in an array.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question