#211716 - 2016-06-29 11:59 AM
Kix based on OS Ver
|
jszkudlapski
Just in Town
Registered: 2016-06-29
Posts: 4
Loc: UK
|
Hi As we are rolling out Win10 x64 Enterprise, is there a way I can have Kixtart run scripts based on if its Win7x32 or Win10X64?
At present we have 4 main KixScripts (two for Win7 and two for Win10) so ideally id like something like;
Selection.kix which just contains;
If Win7x32 run Win7_Main.kix If Win10x64 run Win10_Main.kix
Which will then do OS specific commands etc.
Thank you Wizards of the Kixtart world.
|
Top
|
|
|
|
#211729 - 2016-06-30 01:05 PM
Re: Kix based on OS Ver
[Re: Glenn Barnas]
|
jszkudlapski
Just in Town
Registered: 2016-06-29
Posts: 4
Loc: UK
|
Hi Thanks for the reply.
Essentially we have a historic kix script based on Windows7 which includes a load of reghacks and custom copy file commands.
With our Win10 we are trimming this down and moving them into GPO and using the power of Kix to correctly Map the drives and printers - as this is way quicker than GPO.
So I just need to have a command (I was thinking could I do it with a IF File exists?
So something like;
If file exists c:\windows\_custom\startmenu.xml then run "Win10_Main.kix" else run "Win7_Main.kix"
The problem we have at the minute is that if we let it just run it breaks some Win10 custom stuff on login (desktop shortcuts/desktop wallpaper) so as we phase Win7 out this wont be a problem but at the minute I need to support both at for at least a month.
|
Top
|
|
|
|
#211732 - 2016-06-30 03:25 PM
Re: Kix based on OS Ver
[Re: Glenn Barnas]
|
jszkudlapski
Just in Town
Registered: 2016-06-29
Posts: 4
Loc: UK
|
Thanks Glenn, do you think something like this would work;
; at top of script to set the platform type & architecture $MyVer = OSVer() ; body of script - init processes ; ; To run something platform and possibly Architecture specific If InStr('10.0', $MyVer) ; Windows 10 CALL "Win10_Main.kix" Else Call "Win7_Main.kix" EndIf
Ive got the seperate Win7_Main & Win10 Main kix files running perfect as seperate files, just now need one to sit above it to basically go....
Oh your on Win10, hit the Win10_Main.kix file please, if your not, go hit the Win7_Main.kix file please.
John Paul
|
Top
|
|
|
|
#211734 - 2016-06-30 04:03 PM
Re: Kix based on OS Ver
[Re: jszkudlapski]
|
jszkudlapski
Just in Town
Registered: 2016-06-29
Posts: 4
Loc: UK
|
I have done it this way and it seems to work;
$ntversion = READVALUE("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "CurrentVersion") SELECT CASE $ntversion = "6.1" CALL "Win7-Main.kix" CASE $ntversion = "6.3" CALL "Win10-Main.kix" ENDSELECT
Edited by jszkudlapski (2016-06-30 04:17 PM)
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 515 anonymous users online.
|
|
|