Kory
(Lurker)
2006-09-25 12:28 PM
Update from Kix 4.02 to 4.53

I am quite new to Kix, but it is beeing used in my company for more than 7 years. I want to update it now to the latest version, but I don't knwo what
has to be noticed attended while upgrading.

Is overwriting the old files and renaming the *.scr to *.kix the only thing to do?
Please answer via email!

Thx
Kory


Mart
(KiX Supporter)
2006-09-25 12:40 PM
Re: Update from Kix 4.02 to 4.53

No need to change from .scr to .kix. You can just overwrite the kix32.exe and/or wkix32.exe.
Running the scripts on the new version in a test environment just to see if they still work as expected is the least you should do. If everything runs ok it should be no problem to upgrade the production environment. Maybe some commands/functions have been added to the latest version that makes some stuff in you current script easier or even obsolete but kix is supposed to be backwards compatible.


Kory
(Lurker)
2006-09-25 03:20 PM
Re: Update from Kix 4.02 to 4.53

OK,

THX a lot. I'm already testing it with my account and it looks fine.
Can you tell me the differnece between kix32.exe and wkix32.exe?
I can't find it!

CU
Kory


Björn
(Korg Regular)
2006-09-25 03:34 PM
Re: Update from Kix 4.02 to 4.53

From the kix2010.doc:
Quote:


KiXtart and the console
KiXtart is provided in two ‘flavors’: the standard console-based version and a Windows version. The Windows version will only display a console if and when any output is sent to the screen. If desired, this behavior can be overridden using the /I (Invisible) commandline option.


Note
By default, the Windows version of KiXtart runs as an asynchronous process. This means that if you start WKIX32.EXE from a batchfile, the batchfile will not wait for KiXtart to exit and will continue processing. This behavior can cause problems if KiXtart is being used as part of the logon process, especially on Windows 9x clients. To prevent these problems, WKIX32.EXE should be started from a batchfile using the START command with the wait option, e.g.: "START /W WKIX32.EXE". Optionally, on Windows NT or higher, you can also specify the /B option with the START command, to prevent the creation of an additional window.





Phoenix1987
(Fresh Scripter)
2007-01-02 03:54 PM
Re: Update from Kix 4.02 to 4.53

I tried to update my version. i put the newest .exe on the server, but all the clients still have the old .exe
we are running on win2000 server and xp clients.
Is it possible to let kix check the version and overright if older ?


Les
(KiX Master)
2007-01-02 04:10 PM
Re: Update from Kix 4.02 to 4.53

Why not have the clients use the copy on the server?
KiX cannot replace itself if it is in use.


Howard Bullock
(KiX Supporter)
2007-01-02 07:23 PM
Re: Update from Kix 4.02 to 4.53

If you use a batch file to start your Kix32 session, the batch can replace the KiX32.exe on the workstation prior to invoking it.

Phoenix1987
(Fresh Scripter)
2007-01-03 09:42 AM
Re: Update from Kix 4.02 to 4.53

im new to the company and new to kix.
The version we are running here is from 1998. I found out that i need to edit the login.src. And yes kix is started trough a batch file containing:

Code:
If Exist C:\"Program Files"\Kix32\*.* goto Login
Xcopy \\%ourserver%\NETLOGON\Kix32\K*.* C:\"Program Files"\Kix32\*.* /s
Xcopy \\%ourserver%\NETLOGON\Kix32\Winset.* "%WinDir%\Command\*.*"

REM **********************************************************
REM *  Copy scriptfile and start Kix32 to run the script     *
REM **********************************************************

:Login
copy \\ourserver\NETLOGON\login.scr C:\Progra~1\Kix32
C:\Progra~1\Kix32\kix32.exe C:\Progra~1\Kix32\login.scr
goto EXIT

REM **********************************************************
REM *  End login script                                      *
REM **********************************************************

:EXIT
exit

Is this a good way or does it need an update ?

we have 30 workstations here so i dont feel for updating them manual.

Please help \:\)


Witto
(MM club member)
2007-01-03 10:00 AM
Re: Update from Kix 4.02 to 4.53

There is something about the quotes
Code:
Copy "Source" "Destination"

and not
Code:
Copy So"ur"ce Des"tina"tion

Anyway, I presume a normal user cannot write to "C:\Program Files" and "%WinDir%" during logon if workstations are formatted in NTFS.
What is %ourserver%?
You will also skip the copy of kix32.exe to the client as it allready exists.


Phoenix1987
(Fresh Scripter)
2007-01-03 11:41 AM
Re: Update from Kix 4.02 to 4.53

as far as my knowledge goes it dows skip the copie if it alraidy excist.
Code:
If Exist C:\"Program Files"\Kix32\*.* goto Login

And yes our people can write in program file and windows folders.

haha i see the quotes now your talking about. I didnt wrote it but it works. If i delete the folder it copies them from the server to the program files.
U think its better to use the .exe from the server ?? in stead of copie ?
and %server% is just a hide name for our server. dont see it as a variable Sorry.


Witto
(MM club member)
2007-01-03 11:55 AM
Re: Update from Kix 4.02 to 4.53

Look in kix2010.doc for syntax of Exist
Quote:

EXIST ("file name")

and If Else EndIf
Quote:

IF expression
statement1
....
[ELSE
statement2
.... ]
ENDIF

So I think it should read
Code:
If Exist("C:\Program Files\Kix32\*.*")
	Goto Login
EndIf

I think there are better ways to define "C:\Program Files" as it could be "D:\Program Files". The directory can be looked up in the registry.
I also think it is better trying to avoid the use of Goto.
If your Logon Script runs fast enough, I would prefer to run it from the logon directory. Both Logon Script and wkix32.exe in the netlogon share on the domain controllers.


Phoenix1987
(Fresh Scripter)
2007-01-03 12:04 PM
Re: Update from Kix 4.02 to 4.53

im not that good in programming and its currently only used for drive mapping. that works so its fine, but would be better if i could do more with it.
and how can i it be d:\program files if it always installs on c:/
even if they manualy move it it will reinstall so i dont think i should look anywhere else.

At some playes we use if, else and endif.
i know how that works. Only the statements i need to put in is hard.


Witto
(MM club member)
2007-01-03 12:26 PM
Re: Update from Kix 4.02 to 4.53

Whoops, I think I made a mistake.
The code you provided is a batch file and not a KiX script.
In that case, it will be fine.


Phoenix1987
(Fresh Scripter)
2007-01-03 12:28 PM
Re: Update from Kix 4.02 to 4.53

ghehe ok np :P

do u advise me to upgrade to the latest version. and should i use wkix32 ?
i dont even know what it does but i read it somewhere.


Gargoyle
(MM club member)
2007-01-03 04:34 PM
Re: Update from Kix 4.02 to 4.53

What is your enviroment? Are you running AD? If you are you could replace the executable on the server, ditch the batch file and call the login script directly from the profile.

Once you have that going then you can put a small code fragment in the script to delete the existing copies on workstations.

Then you only have one copy to ever worry about.


Les
(KiX Master)
2007-01-03 05:14 PM
Re: Update from Kix 4.02 to 4.53

As long as the users are well connected, doing as Gargoyle suggests is the way to go. If however, they sometimes VPN, dial, or WAN in, you may want to elaborate on the batch approach with locally cached copies.

Phoenix1987
(Fresh Scripter)
2007-01-04 09:18 AM
Re: Update from Kix 4.02 to 4.53

Originally Posted By: Gargoyle
What is your enviroment? Are you running AD? If you are you could replace the executable on the server, ditch the batch file and call the login script directly from the profile.

Once you have that going then you can put a small code fragment in the script to delete the existing copies on workstations.

Then you only have one copy to ever worry about.


So in the ad i must set the login file to. login.src or /kix32/KIX32.exe ?

edit:
After some trying i now in my AD have:
test/WKIX32.exe test/login.scr
This works, but i think its far more handy to call a batch file. Just for the looks in the AD. Now for every user in the ad i must change it.
Isnt it better to say in a batch file
just 1 single line:
test/WKIX32.exe test/login.scr
i call that login.bat i dont need to change it with any user. If something changes all i need to do is change the login.bat

u all agree ?


Gargoyle
(MM club member)
2007-01-04 01:26 PM
Re: Update from Kix 4.02 to 4.53

You are correct

Now you just need to write a piece of admin code to remove the remnants from your users workstations.


Phoenix1987
(Fresh Scripter)
2007-01-04 02:08 PM
Re: Update from Kix 4.02 to 4.53

i dont think its neccesairy to do that. Cause in my batch file i dont call to the client kix files anymore, but though its better to remove so the computers stay clean. a litte batch line must do the trick i think

Gargoyle
(MM club member)
2007-01-04 02:19 PM
Re: Update from Kix 4.02 to 4.53

If you do it as an admin script it will be a one time shot, you will not be taking extra login ticks to check for something that has already been done.


Fairly simple script (this of course is not production quality just to show a way of doing it)

Code:
For each $workstation in ComNetView()

  If exist $Workstation+"C$\Kix32"
   Del $Workstation+"C$\Kix32" /c /s
  EndIf
Next

;FUNCTION      COMNetView()
;
;ACTION        Enumerate all joined computers in a domain
;
;AUTHOR        Jens Meyer (sealeopard@usa.net)
;
;VERSION       1.3 (added error codes, changes variable redim algorithm)
;              1.2
;
;DATE CREATED  2002/05/14
;
;DATE MODIFIED 2003/06/24
;
;KIXTART       4.12+
;
;SYNTAX        COMNetView([Domain])
;
;PARAMETERS    DOMAIN
;              Specifies the domain to enumerate. If domain is omitted, returns a
;              list of all joined computers in the current domain.
;
;RETURNS       An array of strings representing all the computers in the domain
;
;REMARKS       This function returns all computers that have joined the specified domain
;              independent of whether the computer is on- or off-line. It will not return
;              computers running the Windows 9x operating system since they technically do
;              not join the domain. To include Windows 9x computers in this list, please use
;              either NetView() or NetView2()
;
;DEPENDENCIES  none
;
;EXAMPLE       for each $computer in COMNetView()
;                ? ''+$computer
;              next
;
;KIXTART BBS   http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=12;t=000201
;
Function COMNetView(optional $domain)
  Dim $list, $objDomain, $objComputername, $filter[0]

  ; this function seems to only work on Windows 2000/XP computers
  ; even in a Windows NT 4.0 domain
  if val(@INWIN)<>1 or val(@DOS)<5
    exit 196
  endif

  $domain = trim($domain)
  if $domain=''
    $domain=@DOMAIN
  endif

  $filter[0]='Computer'

  $objDomain = GetObject('WinNT://' + $domain + ',domain')
  if @ERROR
    exit @ERROR
  endif
  $objDomain.Filter=$filter
  if @ERROR
    exit @ERROR
  endif
  For Each $objComputername In $objDomain
    redim preserve $list[ubound($list)+1]
    $list[ubound($list)] = $objComputername.Name
  Next

  $objDomain = 0

  $COMNetView = $list

  exit @ERROR
EndFunction