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
Solved

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

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Resolve DNS query failed errors for Exchange
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
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 …

839 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