Solved

How I determine OS Type with KiXtart

Posted on 2011-09-17
4
1,517 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 38

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:Jeff Perkins
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

733 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