Solved

How I determine OS Type with KiXtart

Posted on 2011-09-17
4
1,556 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

688 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