Solved

How do i get a Kixtart scrip to determine an OS?

Posted on 2009-06-29
2
5,669 Views
Last Modified: 2013-12-23
Hey, im very new to kixtart and was wondering, if there is there anyway i can get my kixtart login script to check what version of windows  the pc is running, or check its role and then carry on or quit thr script based on the answer?

I have a kixtart login script and i need it to only run on PCs with windows xp, vista or 7 (eventually) on. and NOT to run on 2003 or 2008.
Basically it needs to run on workstations but not servers so idealy i would like the script to quit before it does anything if its run because a user is logging onto a server.

i know the @PRODUCTTYPE macro can help with this, but i dont know how to impliment it to do what i need it to do. Any help is greatly appreciated.
0
Comment
Question by:DEALOGIC
2 Comments
 
LVL 84

Accepted Solution

by:
oBdA earned 500 total points
ID: 24738569
The script below will check the OS type at the beginning, and leave the script immediately if the OS isn't a known workstation type.
Couldn't find anything for Windows 7, but you can just run the script on it and it should tell you the product type, then just add another line to the check.
You can just add your own script at the end.
? "Product type: @PRODUCTTYPE"
If (
    (InStr(@PRODUCTTYPE, "Windows 2000 Professional") = 0) AND
    (InStr(@PRODUCTTYPE, "Windows XP") = 0) AND
    (InStr(@PRODUCTTYPE, "Windows Vista") = 0)
   )
  ? "Server or unsupported OS found, leaving the script."
  Exit
EndIf
? "Workstation installation found."

Open in new window

0
 

Author Comment

by:DEALOGIC
ID: 24743220
Thanks for your help!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rename all files in a directory to numerical order 26 31
BATCH to EXE Converter 2 69
Powershell Exchange mailboxsizes 3 48
Manage Wireless Networks (Advanced) on Windows 10 7 59
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
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…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

749 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