Page 3 of 4 <1234>
Topic Options
#74743 - 2003-05-02 08:11 AM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Jooel,

How does this look? Better?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74744 - 2003-05-02 08:53 AM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Jooel,

One comment..

The .ok provides a convenient "marker" to look for in the NTLOGON.BAT file. While this information can be written/read to the registry, it cannot be read or picked up without an external tool...

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74745 - 2003-05-02 09:41 AM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
it is anyway more trustworthy to run the checking every time.

thus packaging this with kixtart as self-executable...
although that makes the logon start little slower (exe size would be approx 150k) it would always be for sure.

but, if the ok is trusted, there must be something else there than just checking the file-name and it's location...
modification time and it's incredients or something needs to match too to be trustable.
_________________________
!

download KiXnet

Top
#74746 - 2003-05-02 10:00 AM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
the reg-part you can still mod back to file...

anyway, parsed the code a little and remembered to keep the functionality intact [Wink]
code:
DIM $FilesToCopy,$
$tmp='%tmp%\'
$srcdir=@scriptdir+'\'
$destdir=split('%WINDIR%',':')[0]+':\Scripts\'
$message=JOIN(split(@kix,'.'),'')

IF 0=Exist($destdir)
MD $destdir
ENDIF

$FilesToCopy='kix32.exe wkix32.exe'
IF @inwin=2
$FilesToCopy=$FilesToCopy+' kx16.dll kx32.dll kx95.dll'
ENDIF

FOR EACH $ IN Split($FilesToCopy)
COPYKIX($srcdir+$,$destdir+$)
NEXT

$=WRITEVALUE('HKCU\Software\KiXtart','KIXPKG','kix'+$message,'REG_SZ')

FUNCTION COPYKIX($srcfile,$destfile)
dim $
IF Exist($srcfile)
IF Exist($destfile)
$=SetFileAttr($destfile,128)
ENDIF
IF GetFileSize($srcfile) <> GetFileSize($destfile) OR
GetFileTime($srcfile) <> GetFileTime($destfile) OR
GetFileVersion($srcfile) <> GetFileVersion($destfile)
COPY $srcfile $destfile /h
ENDIF
ENDIF
ENDFUNCTION



[ 02. May 2003, 12:21: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#74747 - 2003-05-02 02:40 PM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
[Eek!] [Eek!] [Eek!]

You definitely get the KiXGolf award!

As I stated earlier, "we" as a company are looking at the possibility of going away from this. That is, remembering that this exercise is for people that cannot.

Now, we need to make the OK or marker file more "bullet-proof." [Big Grin] [Big Grin] [Big Grin]

Thanks again,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74748 - 2003-05-02 07:13 PM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
OK... Added the .OK checks back in..

That way, when you run the NTLOGON.BAT, it will find it..

Portion of the NTLOGON.BAT
code:
if not exist %SystemDrive%\Scripts\kix421.ok %LOGONSERVER%\NETLOGON\Programs\kix421update.exe /q

Here is the code..

code:
DIM $FilesToCopy,$
$tmp='%tmp%\'
$srcdir=@scriptdir+'\'
$destdir=split('%WINDIR%',':')[0]+':\Scripts\'
$msg=LEFT(JOIN(split(@kix,'.'),''),3)
$ok=$destdir+'kix'+$msg+'.ok'

IF 0=Exist($destdir)
MD $destdir
ENDIF

$FilesToCopy='kix32.exe wkix32.exe'
IF @inwin=2
$FilesToCopy=$FilesToCopy+' kx16.dll kx32.dll kx95.dll'
ENDIF

FOR EACH $ IN Split($FilesToCopy)
COPYKIX($srcdir+$,$destdir+$)
NEXT

FUNCTION COPYKIX($srcfile,$destfile)
dim $
IF Exist($srcfile)
IF Exist($destfile)
$=SetFileAttr($destfile,128)
$state=' >replaced'
ELSE
$state=' >new'
ENDIF
IF GetFileSize($srcfile)<>GetFileSize($destfile) OR
GetFileTime($srcfile)<>GetFileTime($destfile) OR
GetFileVersion($srcfile)<>GetFileVersion($destfile)
IF EXIST($destdir+'kix*.ok')
Del $destdir+'kix*.ok'
ENDIF
COPY $srcfile $destfile /h
$=WRITEPROFILESTRING($ok,split(split($destfile,'\')[2],'.')[0],'KIX',$destfile+$state)
ENDIF
ENDIF
ENDFUNCTION

The .SED file is -
code:
[Version]
Class=IEXPRESS
SEDVersion=3
[Options]
PackagePurpose=InstallApp
ShowInstallProgramWindow=1
HideExtractAnimation=1
UseLongFileName=0
InsideCompressed=0
CAB_FixedSize=0
CAB_ResvCodeSigning=0
RebootMode=N
InstallPrompt=%InstallPrompt%
DisplayLicense=%DisplayLicense%
FinishMessage=%FinishMessage%
TargetName=%TargetName%
FriendlyName=%FriendlyName%
AppLaunched=%AppLaunched%
PostInstallCmd=%PostInstallCmd%
AdminQuietInstCmd=%AdminQuietInstCmd%
UserQuietInstCmd=%UserQuietInstCmd%
SourceFiles=SourceFiles
[Strings]
InstallPrompt=
DisplayLicense=
FinishMessage=
TargetName=C:\!Kix\newpkg\kix421update.EXE
FriendlyName=Kixtart 4.21 installation
AppLaunched=KIX32.EXE
PostInstallCmd=KIX32.EXE install.kix
AdminQuietInstCmd=
UserQuietInstCmd=
FILE0="KX95.DLL"
FILE1="INSTALL.KIX"
FILE2="KX16.DLL"
FILE3="KX32.DLL"
FILE4="KIX32.EXE"
FILE5="WKIX32.EXE"
[SourceFiles]
SourceFiles0=C:\!Kix\newpkg\
[SourceFiles0]
%FILE0%=
%FILE1%=
%FILE2%=
%FILE3%=
%FILE4%=
%FILE5%=

Thanks,

Kent

[ 02. May 2003, 20:37: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74749 - 2003-05-02 08:32 PM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
this:
code:
 $=WRITEPROFILESTRING($ok,'KIX','KIX Info',@producttype+' -> kix '+@kix) 

should not be in the UDF part.
if it's there, it is executed on every file.
_________________________
!

download KiXnet

Top
#74750 - 2003-05-02 08:39 PM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Removed..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74751 - 2003-05-02 08:51 PM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
hmm...
the ok-file should be tested...
it's size or something needs to match...

the state info is not needed... I think.

and, you reference the $ok inside the udf part [Wink]

maybe some failure check needs to be done too...
as if the copy fails.
_________________________
!

download KiXnet

Top
#74752 - 2003-05-03 06:06 AM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
quote:

you reference the $ok inside the udf part

Why not? Why not do a check to see if the file that is being copied is either new or replacing another?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74753 - 2003-05-03 01:05 PM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
because, what is the meaning of checking that?
_________________________
!

download KiXnet

Top
#74754 - 2003-05-03 03:30 PM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
It is really a state or "sanity" check. That is, what happened while this script was run.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74755 - 2003-05-04 07:21 AM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
I was thinking something like:
$tmp='%tmp%\'
$srcdir=@scriptdir+'\'
$destdir=split('%WINDIR%',':')[0]+':\Scripts\'
$msg=LEFT(JOIN(split(@kix,'.'),''),3)
$ok=$destdir+'kix'+$msg+'.ok'
 
Del $destdir+'kix*.ok'
$=WRITEPROFILESTRING($ok,'General','System',@producttype) 
$=WRITEPROFILESTRING($ok,'General','KIX',@kix) 
$=WRITEPROFILESTRING($ok,'General','Destination',$destdir) 
 
IF 0=Exist($destdir)
 MD $destdir
ENDIF
 
$FilesToCopy='kix32.exe wkix32.exe'
IF @inwin=2
 $FilesToCopy=$FilesToCopy+' kx16.dll kx32.dll kx95.dll'
ENDIF
 
FOR EACH $ IN Split($FilesToCopy)
 $=WRITEPROFILESTRING($ok,split($,'.')[0],'KIX',COPYKIX($srcdir+$,$destdir+$))
NEXT
 
FUNCTION COPYKIX($srcfile,$destfile)
 dim $
 IF Exist($srcfile)
  IF Exist($destfile)
   $=SetFileAttr($destfile,128)
   $copykix=' >replaced'
  ELSE
   $copykix=' >new'
  ENDIF
  IF ''+GetFileSize($srcfile)+GetFileTime($srcfile)+GetFileVersion($srcfile)<>''+GetFileSize($destfile)+GetFileTime($destfile)+GetFileVersion($destfile)
   COPY $srcfile $destfile /h
   if @error
    $copykix='failed'
   endif
  ENDIF
 ENDIF
ENDFUNCTION


[ 04. May 2003, 07:23: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#74756 - 2003-05-04 07:24 AM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
wow, mistakenly coded wordwrap code for new postprep [Eek!]
_________________________
!

download KiXnet

Top
#74757 - 2003-05-04 09:10 AM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
[Eek!] [Eek!] [Eek!] [Eek!]

Too cool!

Me like..

[Cool] [Cool]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74758 - 2003-05-04 01:38 PM Re: Re-Write of the KIX32.EXE Deployment tool
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Wow, Joeel, jeez, I though my monitor is about to explode. What's up with that yellow color [Eek!] Don't surprise an old man like me with this on a Sunday morning! [Big Grin]
_________________________
There are two types of vessels, submarines and targets.

Top
#74759 - 2003-05-04 08:36 PM Re: Re-Write of the KIX32.EXE Deployment tool
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
It is pretty obnoxious.. But, I aint complaining. [Big Grin]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#74760 - 2003-05-04 09:30 PM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
I seem to be the only one that likes it [Wink]

somehow the yellow looks ok with red-kinda text... for my eye...
_________________________
!

download KiXnet

Top
#74761 - 2003-05-05 01:08 AM Re: Re-Write of the KIX32.EXE Deployment tool
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Some feedbacks
  • way of using registry is indeed a good alternative. We see three possible problems
    - the HKCU-hive isn't available by W9x logging on. An alternative can be that you put
    those informative to the HKLM hive.
    - by using mandatory profiles the registry information we will gone during each logging
    on. So each time the installation package will reinstall itself on the client with
    the necessary to do it.
    - with the general DOS commands you can't check the registry content.
  • about IF Len($destdir)=0 $destdir=@lanroot ENDIF has to deal with the possibility
    that the environment variable %windir% doesn't exist. Normally it is not a
    problem, but we have to deal with all kind of possibilities.
  • with the current network speed and with the required execution times of iexpress package
    runs it isn't necessary to check each time you control file kix???.ok.
    Also for a modem connection it is acceptable.
  • for testing the control-file in a DOS environment we are restricting to the available
    DOS commands. f.e. it's size isn't such function.
  • we are missing the part of removing unwanted kixtart binaries, when they were implemented
    with an older edition of iexpress packages. Specially when the current location isn't the
    same as previous locations.
    f.e.
    c:\scripts\kix32.exe
    c:\scripts\kx16.dll
    c:\scripts\kx32.dll
    c:\scripts\kx95.dll
    c:\windows\kix32.exe
    c:\windows\kx16.dll
    c:\windows\kx32.dll
    c:\windows\kx95.dll
    Do you know which version it will use, when this will be the result. So removing them can
    be necessary to prevent unexpected errors during using kixtart.
The reduction effort of different guys contains all kind of interesting elements.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#74762 - 2003-05-05 06:53 AM Re: Re-Write of the KIX32.EXE Deployment tool
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
I wonder...

we can make perfect checks with FC but how to check so trustfully...

anyway, the deletion of old files indeed is a thing we need to check...
maybe also that on failure of deletion of some file, we also get problems...

then, nowadays as ppl are finally (others than me) getting rid of logon.bat...
is there still a need to distribute the executable?
over ras it's slow to run logon-from network but with even slow 256kb connection it's already quick enough to not need a dist...
_________________________
!

download KiXnet

Top
Page 3 of 4 <1234>


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

Who's Online
0 registered and 240 anonymous users online.
Newest Members
Praveer, Ollero, rayyo, Foxlicht, DonChild
17742 Registered Users

Generated in 0.084 seconds in which 0.052 seconds were spent on a total of 12 queries. Zlib compression enabled.

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