#202735 - 2011-07-26 05:28 PM
Existing Kix script works in XP but does not work with Win7
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Hi I apologise if Iam in the wrong area and would welcome your direction I am a newbie to the forum sorry.
We all use XP sp3 and Kix login script ok for last 5 year but I now have 30 systems on Win7 and it say...
This operating System is unknown or unsupported - Cancelling Login Script Press any key to continue . . .
I can post my scripts etc if anyone feels they could assist me thank you
|
Top
|
|
|
|
#202744 - 2011-07-27 01:11 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: ShaneEP]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Hi there here is the KIX script and you can see where I tried to add win7 but its probably entirely wrong
;*****************************************************
; SLISI STAFF Login Script
;*****************************************************
; Author:
; Date: 22/10/04
; Format: KIX
; Description: SLISI Staff Login script
; Last Modifed Date:
;
;*****************************************************
;SETUP KIXSCRIPT ENVIRONMENT
;*****************************************************
SetTitle ("Sun Life Ireland Login Script")
cls
Color w+/n
? "Sun Life Ireland Login Script on " @MDAYNO"/"@MONTHNO"/"@YEAR " at " @TIME
?
;*****************************************************
;Declare Global Variables
;*****************************************************
GLOBAL $DDMMYYYY, $MyIP, $MySubnet, $LogonType, $MyPriv, $MyMachineType
;*****************************************************
;Set Global Variables
;*****************************************************
$DDMMYYYY = DDMMYYYY
$MyIP = MyIP
$MySubnet = MySubnet
$LogonType = LogonType
$MyPriv = MyPriv
$MyMachineType = MyMachineType
;*****************************************************
; This enables a Crtl/Break without rebooting.
;*****************************************************
; Break on
;*****************************************************
; Run Script in debug mode if user is a member of "LOGIN_SCRIPT_DEBUGGER" global group
;*****************************************************
IF INGROUP("LOGIN_SCRIPT_DEBUGGER")
DEBUG ON
ENDIF
;*****************************************************
; Create a local logon.log file on users C: drive and redirect all output to this file
;*****************************************************
If $logontype = "Local"
IF RedirectOutput("C:\logon.log", 1 ) <> 0
? "Error Logging Script Results to 'C:\logon.log' @error - @serror" ?
ELSE
? "Login Script Results logged to 'C:\logon.log'" ?
ENDIF
ENDIF
? "Sun Life Ireland Login Script on " @MDAYNO"/"@MONTHNO"/"@YEAR " at " @TIME
;*****************************************************
; Welcome User
;*****************************************************
?
? "You are logged on to the " @LDomain " domain as User: " @UserID
?
? "*****************************************************"
? "User and Host computer Information"
? "*****************************************************"
?
? "Hostname: " @WKSTA
?
? "IP Address: " $MyIP
?
? "Location: " $MySubnet
?
? "Machine: " $MyMachineType
?
? "Logon Type: " $LogonType
?
? "User Privileges: " $MyPriv
;*****************************************************
;Log user and workstation information to central logfile location on the network
;*****************************************************
$logshare= "\\sv4103\Software\Reports\Login"
$logfile= "$Logshare\$DDMMYYYY.LOG"
$logdata= "@MDAYNO/@MONTHNO/@YEAR,@TIME,@WKSTA,@ProductType,@FULLNAME,@USERID,$MyPriv,@LSERVER,$MyMachineType,$MySubnet,$MyIP,@ADDRESS,$LogonType"
?
$null = Loginfo($logfile,$logdata)
?
;Run "c:\program files\internet explorer\IEXPLORE.exe http://www.google.ie/"
;Run "c:\program files\internet explorer\IEXPLORE.exe http://thesource-redirect.ca.sunlife/"
;*****************************************************
; Skip rest of script for all Citrix and Term Serv (Application mode) clients
;*****************************************************
If $logontype = "Citrix Metaserver or Terminal Services in Application mode"
GOTO END
ENDIF
;*****************************************************
;DETERMINE ACTIONS BASED ON OS
;*****************************************************
$OSVal = @PRODUCTTYPE
SELECT
;*****************************************************
; Actions for Windows Server Operating Systems ONLY
;*****************************************************
CASE ( (INSTR ($OSVal,"Server") <> 0) OR (INSTR ($OSVal,"Domain Controller") <> 0) )
?
? "Running Windows NT/2000/2003 Server KiXtart Login Script"
?
;*****************************************************
;Actions for Windows XP Professional or 2000 Professional ONLY
;*****************************************************
CASE (LEFT(@PRODUCTTYPE,10) = "Windows XP") OR (@ProductType = "Windows 2000 Professional") OR (@ProductType = "Windows 7")
? "*****************************************************"
?
? "Running Windows 2000/XP Workstation Login Script"
?
? "*****************************************************"
? "Mapping Drives for user @USERID..."
? "*****************************************************"
;ADD STANDARD DRIVE MAPPINGS FOR ALL Authenticated USERS
MAPDRIVE ("J:","SV4103","Slisishare")
MAPDRIVE ("L:","SV4101","Slisiapps")
MAPDRIVE ("M:","SV4102","Dept")
MAPDRIVE ("S:","SV4103","Software")
;ADD Personal DRIVE MAPPING FOR ALL Authenticated USERS
MAPDRIVE ("P:","SV4102","Slisiprivat\@USERID")
|
Top
|
|
|
|
#202789 - 2011-08-03 01:04 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: Glenn Barnas]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Thanks to you all I will be introducing those changes this weekend to see how it all works. I have taken on board all of your generous replies. I shall certainly keep you all posted with my progress and finding. Thanks everyone.
Indeed I have not put all the script in as it is very large and would swamp the board. Later I will post in the varies sections and functions if thats ok thank you
|
Top
|
|
|
|
#202801 - 2011-08-08 02:47 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: blackboyberry]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Hi all, I have made the change you all recommended and it all works nicely under WXP however Win7 still fails. However I did remove all select-case-case1-endselect around os checks etc and left the mapdrives section and the script executes fine. So it does show that you are all correct when you say it is an OS check failure. I honestly do not know how to resolve this and wpuld like to continue to do an OS check so your suggestions and help would be most welcome
steve
|
Top
|
|
|
|
#202803 - 2011-08-08 03:31 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: Mart]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Code removed and will be put up inh sections in next posts as I work thru the newer Kix version
Edited by blackboyberry (2011-08-10 12:17 PM)
|
Top
|
|
|
|
#202804 - 2011-08-08 03:33 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: blackboyberry]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
thank for the followup guys
|
Top
|
|
|
|
#202805 - 2011-08-08 04:43 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: blackboyberry]
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Strange, the only part I see that checks the OS is the following line, and it should work fine.
Case InStr(@ProductType,"Windows XP) OR InStr(@ProductType,"Windows 2000 Professional") Or InStr(@ProductType,"Windows 7")
Do you know what the trouble machines are actually showing for @ProductType? Try adding the following and testing...
$nul = MessageBox(@ProductType,"OS",0)
|
Top
|
|
|
|
#202809 - 2011-08-08 06:51 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: Les]
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Ahh, good point. And just as I was adding the new OS version to a new CHM too. I must be on top of things today.
|
Top
|
|
|
|
#202811 - 2011-08-08 07:21 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: ShaneEP]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4545
Loc: USA
|
LOL
|
Top
|
|
|
|
#202815 - 2011-08-09 04:10 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: Allen]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
I have checked the version and it is Kix32 Version 4.50.0.0 buoild 196 2010
|
Top
|
|
|
|
#202816 - 2011-08-09 05:17 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: blackboyberry]
|
blackboyberry
Fresh Scripter
Registered: 2011-07-18
Posts: 9
Loc: Ireland Waterford
|
Guys I think I have solved it. Put the $nul = MessageBox(@ProductType,"OS",0) in the script and behold I was given this" Windows LongHorn Media Center Edition" changed the line windows 7 for this and behold the entire script ran.
Here was I winver Windows 7 Ver.... in Dos windows 6.. bla bla... wrong track entirely
now it reads Case InStr(@PRODUCTTYPE, "Windows XP") Or InStr(@ProductType, "Windows 2000 Professional") Or InStr(@ProductType, "Windows LongHorn Media Center Edition")
|
Top
|
|
|
|
#202818 - 2011-08-09 08:34 PM
Re: Existing Kix script works in XP but does not work with Win7
[Re: Allen]
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Yep, I agree with Allen. It would have been recognized as Windows 7 with kix 4.61. BUT...if youre going to keep your current version, i would change your code to...
Case InStr(@PRODUCTTYPE, "Windows XP") Or InStr(@ProductType, "Windows 2000 Professional") Or InStr(@ProductType, "Windows LongHorn")
I would be reluctant to lock it down to only the media version.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|