Page 1 of 2 12>
Topic Options
#202735 - 2011-07-26 05:28 PM Existing Kix script works in XP but does not work with Win7
blackboyberry Offline
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
#202736 - 2011-07-26 05:46 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: blackboyberry]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
It sounds like it has to be some kind of OS check written into the script. If you post the code, Im sure we can track it down.

And please make sure to use the CODE tags when posted your script so that it gets formatted properly.

Top
#202737 - 2011-07-26 06:10 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: ShaneEP]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Agreed - this is not a Kixtart message, but one from the script itself. Post the script!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#202744 - 2011-07-27 01:11 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: ShaneEP]
blackboyberry Offline
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

 Code:
 ;*****************************************************
; 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
#202745 - 2011-07-27 01:39 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: blackboyberry]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Modify the line where you tried to insert Windows 7 like shown below.
I think the script you posted is not the full script because at least an EndSelect is missing at the bottom of the script.

 Code:
Case InStr (@PRODUCTTYPE, "Windows XP") Or InStr(@ProductType, "Windows 2000 Professional") Or InStr (@ProductType, "Windows 7")
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#202747 - 2011-07-27 02:05 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: Mart]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
If your Win7 boxes are all 32bit you should have no problems, but if they are 64bit you are going to have to take into account the folders/registry locations for both 32 and 64bit apps. {edit: although it looks like you have commented out any paths that might be effected by this. Just keep this in mind.}

Edited by Allen (2011-07-27 02:06 PM)

Top
#202748 - 2011-07-27 03:10 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Also, writing the log to C:\ may no longer work, as the security on Windows 7 is tighter. Consider writing to %USERPROFILE% for user-specific logs.

Also, the posted script is not complete, as the original message that was being returned is not present.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

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 Offline
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 Offline
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
#202802 - 2011-08-08 02:57 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: blackboyberry]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
Please post the complete script so we can see what it is doing and what may fail.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#202803 - 2011-08-08 03:31 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: Mart]
blackboyberry Offline
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 Offline
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 Moderator Offline
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.

 Code:
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...

 Code:
$nul = MessageBox(@ProductType,"OS",0)

Top
#202808 - 2011-08-08 06:43 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: ShaneEP]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I don't recall bbb mentioning what version of Kix he is using.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#202809 - 2011-08-08 06:51 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: Les]
ShaneEP Moderator Offline
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 Administrator Online   shocked
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 Offline
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 Offline
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
#202817 - 2011-08-09 06:28 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: blackboyberry]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
You fixed it,but the better answer is to use 4.61 instead.
Top
#202818 - 2011-08-09 08:34 PM Re: Existing Kix script works in XP but does not work with Win7 [Re: Allen]
ShaneEP Moderator Offline
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...

 Code:
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
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.109 seconds in which 0.039 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org