Page 1 of 1 1
Topic Options
#45381 - 2003-09-07 02:54 PM Force Logoff If...
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
[Moderator (Sealeopard): Moved topic from 'Scripts' to 'Starters' forum due to lack of script in body]

Hi,

I have a script which warrns the user if he has exceeded the PST file size limit when logging-in.

Now I need to have some kind of mechansim to force a logoff on the 3rd login if his PST file is still above the allowed limit.

Anybody have any idea how to do this?.

Note: NT4.0 Domain, W2K/NT4 WKSTNs, using Kix 4.21 and Kixforms 2.20.

Thanks,

SAM

[ 17. September 2003, 19:25: Message edited by: sealeopard ]

Top
#45382 - 2003-09-07 03:00 PM Re: Force Logoff If...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
As you have not posted a script to discuss, you are in the wrong forum. Questions such as this should be posted to "Starters".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45383 - 2003-09-07 03:08 PM Re: Force Logoff If...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
and the answer to the question is in the manual.
_________________________
!

download KiXnet

Top
#45384 - 2003-09-07 03:18 PM Re: Force Logoff If...
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Lonkero,

I know how to force logoff the user, my issue is how to determine the number of login attempt the user is making before forcing the logoff fucntion [Frown] .

TKS

Top
#45385 - 2003-09-07 03:24 PM Re: Force Logoff If...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Then you shoould be more specific in your question...

Create a key/value in HKCU to store the count and then pseudo-coding:

if PST> $max and ReadValue($key,$value)='3'
LogOff()
endif
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45386 - 2003-09-08 07:39 AM Re: Force Logoff If...
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Les,

Thanks, but I'm not too good at this, would you please show me how to add the count?.

TKS

Top
#45387 - 2003-09-08 08:26 AM Re: Force Logoff If...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh.
what about 1+1?
ok, make you a ready pseudo-code:
$var=readval
if 2<$var
"yes, log of that basta"
else
writeval 1+$val
endif
_________________________
!

download KiXnet

Top
#45388 - 2003-09-08 02:28 PM Re: Force Logoff If...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well.. since this post is in the advanced scripts forum, one would assume a certain level of basic understanding. Perhaps the starters forum would provide less pseudo-code and more hand holding.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45389 - 2003-09-10 11:17 AM Re: Force Logoff If...
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
If you are going to force the logoff of a user after "x" number of attempts once their PST reaches a certain size, what mechanism do you have in place for them to clean up their PST file?

While forcing them to log off is a good way to get their attention, how are they ever going to get back in to clean up their PST?

Kind of vicious loop don't you think? It's about the equivalent of placing shutdown.exe in their startup folder. [Eek!]

Top
#45390 - 2003-09-10 11:52 AM Re: Force Logoff If...
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
John,

My plan was to provide them with warnning message in the first 2 times they logon, and force a logoff on the 3rd attempt.

TKS

Top
#45391 - 2003-09-10 11:59 AM Re: Force Logoff If...
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Giving them a warning message so that they have the opportunity to clean up the first two times should be enough (oh well they are users maybe like a gazillion warnings is better [Big Grin] ).
Just check the regvalue you created and display a messagebox when it is 1 or 2 and maybe a little warning about the logoff and why when it hits 3.

Maybe doing a getfilesize and warning them when the file is almost at it's limit could be done also before setting the regvalues and at the end a forced logoff ?

They will have no way to login so they will have to call IT support and they can clean up for the user. Sometimes it’s best to let them learn the hard way.

[ 10. September 2003, 12:03: Message edited by: R2D2 ]
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#45392 - 2003-09-10 04:21 PM Re: Force Logoff If...
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
As stated your question more properly belongs in the starters forum but it is here now & I think the best way to get good responses is to start posting your code. Once people see exactly what you are doing they will tend to offer fixes & enhancements. Just giving a general appeal for help & expecting someone to code it for you without proper specs will not usually elict helpful responses.

As a further point - how many users do you have? If it hundreds or more be prepared for a flood of negative phone calls & visits from angry users if you implement this plan. One of whom might be the CEO. I would certainly recommend getting senior management's approval in writing for this plan before I implemented it.

A better strategy might be to collect this size information in a central INI file on a server & to send warning e-mails to problematic users.
_________________________
Jack

Top
#45393 - 2003-09-10 04:35 PM Re: Force Logoff If...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ja.
flooding them with e-mail every hour saying:
"your bloody PST is too big!
take action and these mails will stop.

Your loving sysadmin"

that should work [Big Grin]
_________________________
!

download KiXnet

Top
#45394 - 2003-09-10 04:40 PM Re: Force Logoff If...
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The flaw in that logic is that the emails will only increase the size of the PST so runs contrary to the objective. I would spam them with NET SEND instead.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#45395 - 2003-09-10 04:43 PM Re: Force Logoff If...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
why would they increase PST...
well, that's possible...

net send is good solution or even pure messagebox.
you can make it look like system error message stating that system will crash if no action taken [Big Grin]
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.194 seconds in which 0.012 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