Page 1 of 1 1
Topic Options
#147972 - 2005-09-16 03:07 PM -F[:yyyy/mm/dd]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I never did comprehend the logic of passing a fixed date on the commandline. I mean, if using a BATch file to kick off KiX, one would have to edit it constantly to change the date. If not using a BATch, one would have to modify all the users' profiles.

I realize that one can code date math logic inside the script to delete the reg key, but better still would be to change the -F switch to accept a relative value. That way, one could set it to the number of days and KiX would do the date math.

I also think there should be a command built into KiX to do the same thing.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#147973 - 2005-09-16 04:18 PM Re: -F[:yyyy/mm/dd]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
My understanding is that the idea is that if you do something that causes the cache mechanism to fail such as renaming a group then you can set the value to the day (or day before) you made the change. This will force the cache to refresh if it precedes the change.

The normal cache validation and 30 day refresh will still happen, but this is a way to force the refresh in the exceptional case that you've made a change that won't be picked up.

Top
#147974 - 2005-09-16 04:36 PM Re: -F[:yyyy/mm/dd]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I deduced that much on my own. I guess I should have put the emphasis on the word "commandline".

Still, the notion of modifying every users' profile every time a group name changes...

The problem is that often the person renaming the groups is not the same person charged with maintaining the scripts.

I see often where people use the -F without the fixed date, effectively flushing the cache on EVERY logon. What I propose is a compromise where the cache could be flushed more frequently than once every 30 days without having to constantly update the CL switch or do date math and deleting the key. Maybe another SetOption as well for the built-in option.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#147975 - 2005-09-16 05:23 PM Re: -F[:yyyy/mm/dd]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Quote:

Still, the notion of modifying every users' profile every time a group name changes...




True - if you are assigning the login script on each individual profile and calling it directly rather than with a wrapper batch / script it could be a large overhead.

Quote:

Maybe another SetOption as well for the built-in option.




You still have the problem of different people doing the scripting and group re-naming though.

Top
#147976 - 2005-09-16 05:44 PM Re: -F[:yyyy/mm/dd]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
A quick'n'dirty fix for login scripts which would do the same as "-F" but from within the script:
Code:
Dim $sTokenCache
Dim $sTokenAge

$sTokenCache="HKCU\Software\KiXtart\TokenCache"
$sTokenAge="2005/09/16"

If ReadValue($sTokenCache,"Token Cache Last Check") <= @DATE $=DelKey($sTokenCache) EndIf
$=WriteValue($sTokenCache,"Token Cache Last Check",@DATE,"REG_SZ")



You just need to update $sTokenAge whenever you need to force the cache to flush.

You could of course keep $sTokenAge in a parameter file rather than hard code in the script.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 414 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.051 seconds in which 0.023 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