Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-06-29
2
Medium Priority
?
5,835 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 85

Accepted Solution

by:
oBdA earned 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
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)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

876 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