Solved

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

Posted on 2009-06-29
2
5,569 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 82

Accepted Solution

by:
oBdA earned 500 total points
Comment Utility
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
Comment Utility
Thanks for your help!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
Resolve DNS query failed errors for Exchange
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now