Page 1 of 1 1
Topic Options
#24604 - 2002-07-09 03:40 PM POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Pure NT4 enviroment (Svrs/WS's)

Have been tasked by our "little dog aka A/Dir" to add a "popup style" box that will come AFTER ... run seperately ... the logon info box. Yes, I know I showed that it can be part of the logon process ... but it is not what is envisioned (sic)(too much coffee in some peoples lives and not enough in mine) This annoying box will contain the usual max password age - current age = days left and a single OK (no time out) ... surely will add a few more members to the "I hate Russell club" Maybe run it only on Mondays to be less of a pain in the butt.

But, dooh, cannot get it to come up ... clues please?? I have a messagebox in the /repl/scripts and pointing toward it in my last line of the logon.kix ... but nothing ... augh!
_________________________
If not for the last minute ... nothing would get done ...

Top
#24605 - 2002-07-09 03:43 PM Re: POPUP Password age reminder
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what you mean run after?

like, should it come up at logon time or timed after five minutes or what?
anyway, you most likely want to make this messagebox your last line of logonscript.
if it's timed then you make it timed to show it after specified time and ...

what is your situation?
_________________________
!

download KiXnet

Top
#24606 - 2002-07-09 03:50 PM Re: POPUP Password age reminder
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I like your writing style Beelzel ... So your looking to launch a floating POPUP message, after the login script finishes, one that can be dismissed at the users convienence ( annoyance) ... what kinda kode you got so far ?
Top
#24607 - 2002-07-09 03:50 PM Re: POPUP Password age reminder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You don't show us any code and my clairvoyant service is down at the moment.

What you need to do is stuff a call to it in the RunOnce key of the reg to run after logon.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24608 - 2002-07-09 03:51 PM Re: POPUP Password age reminder
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Solution 1:
code:
$rc=messagebox(@WKSTA,'5 days left before password expires')

This will pop up with about 1-2 seconds delay.

Solution 2:
Write a separate KiXtart script for the message box display and start it by writing into the user's RunOnce registry key.

Solution 3:
Write a separate KiXtart script for the message box display and start it with the RUN command from within your login script. The separate script should have e.g. a SLEEP 10 and be set to be hidden. It'll then execute 10 seconds after the RUN command has been issued.

Solution 4:
Schedule a delayed task using the Task Scheduler (you can utilize the ScheduleTask() UDF)

[ 09 July 2002, 15:52: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#24609 - 2002-07-09 03:53 PM Re: POPUP Password age reminder
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I'll go with door number 3, Monty ... door number 3 !!!!!
Top
#24610 - 2002-07-09 04:03 PM Re: POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Ahem, yes, door three ... sleep is what I left out (my life also) ... KOOL guys ... thanks
_________________________
If not for the last minute ... nothing would get done ...

Top
#24611 - 2002-07-09 04:03 PM Re: POPUP Password age reminder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hey, I like door #4...

Set the task to repeat every hour and boost the membership in the "I hate Russell club" [Big Grin]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24612 - 2002-07-09 04:30 PM Re: POPUP Password age reminder
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Outside of the normal popup from the domain when each user logs in (These start 13 days out from the time the password expires). The only caveat that I could see from that is if a user never logs out.

For service accounts, here is one that Brian and I cobbled together for Service Account Password Expiration.

HTH,

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

Top
#24613 - 2002-07-09 06:07 PM Re: POPUP Password age reminder
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kent,
That's what makes Door #4 so attractive.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24614 - 2002-07-24 03:30 PM Re: POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Getting closer ... at least a bit more pleasent ... have nicked a script out of the samples box ...
code:
 ;  agent.kix
;
; Demonstrates the use of COM automation to program a Microsoft Agent.
;
; Note : This code sample is provided for demonstration purposes only.
; Microsoft makes no warranty, either express or implied,
; as to its usability in any given situation.
;
; Copyright (C) 2001 Ruud van Velsen.
; All rights reserved.
;
break on
setconsole("hide")
if Ingroup ("Domain Users") and @day = 1
debug off
Sleep 15
;;set password expiration variable
$Pwdage = @MaxPWAge - @PWAge
; DIM $pwexp


; first, try for the defaul agent (the wizard 'Merlin')

if exist( "%WinDir%\msagent\chars\clippit.acs" )
$agentname = "merlin"
else
;
; merlin doesn't live on this PC, try for any other MS Agent
;
$agentname = dir( "%WinDir%\msagent\chars\*.acs" )
if len( $agentname )
$agentname = substr($agentname,1, len($agentname)-4) ; remove .acs extension from name
endif
endif


if len( $agentname )
$agentpath = "%WinDir%\msagent\chars\" + $agentname + ".acs"

$agent = CreateObject ("agent.control.2")

if @error = 0
$agent.connected = "1"
$=$agent.characters.load($agentname,$agentpath)
$char = $agent.characters.character($agentname)

$=$char.show()
$=$char.moveto(400, 300)
$=$char.play("read")

$req=$char.speak("Hello there " + @fullname + ". Just a reminder, you password expires in $pwdage days.")

sleep 90 ; give him time to catch up...

$myreq=$char.wait($req)
$=$char.play("readreturn")
gets $x
else
? "Microsoft Agent not installed, or failed to start. " + @error + " / " + @serror
endif
else
? "Microsoft Agent not installed."
endif
EndIf
; Keep character onscreen awhile after speaking
sleep 50
; Hide last character
$Characters[$Char]{agent}->Hide; }

but cannot seem to make it "go away" ... obviously my "hide" at then end incorrect? Anyone?
_________________________
If not for the last minute ... nothing would get done ...

Top
#24615 - 2002-07-24 06:18 PM Re: POPUP Password age reminder
Kdyer Offline
KiX Supporter
*****

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

I did not know that Ruud was writing your code!!

code:
;   Copyright (C) 2001 Ruud van Velsen.

Hmm...

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

Top
#24616 - 2002-07-24 06:22 PM Re: POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
You are up early ...

Yep, nicked this out of his "sample file" ... any ideas how to "exit" this agent??

tried all the $Agent.hide et al commands ... the guy is still looking at me adn sometimes sleeping ...
_________________________
If not for the last minute ... nothing would get done ...

Top
#24617 - 2002-07-24 06:25 PM Re: POPUP Password age reminder
Kdyer Offline
KiX Supporter
*****

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

I picked that up too..

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

Top
#24618 - 2002-07-24 07:01 PM Re: POPUP Password age reminder
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Beelzel, I just can't resist, really!

Tip: might want to play with the req object though ... helps with the pacing !

break on

if exist( "%WinDir%\msagent\chars\clippit.acs" )
   $agentname = "merlin"
else
   ;
   ; merlin doesn't live on this PC, try for any other MS Agent
   ;
   $agentname = dir( "%WinDir%\msagent\chars\*.acs" )
   if len( $agentname )
      $agentname = substr($agentname,1, len($agentname)-4) ; remove .acs extension from name
   endif
endif

if len( $agentname )

   $agentpath = "%WinDir%\msagent\chars\" + $agentname + ".acs"

   $agent = CreateObject ("agent.control.2")

   if @error = 0
      $agent.connected = "1"
      $=$agent.characters.load($agentname,$agentpath)
      $char = $agent.characters.character($agentname)

      $=$char.show()
      $=$char.moveto(400, 300)

      $=$char.play("greet")

      $=$char.play("read")

      $req = $char.speak("Hello there " + @fullname + ". Just a reminder, your password expires in 10 days.")
      do sleep 1 until $char.wait($req) <> 0

      sleep 1

      $req = $char.play("surprised")
      do sleep 1 until $char.wait($req) <> 0

      sleep 1

      $req=$char.speak("What did you say ?")
      do sleep 1 until $char.wait($req) <> 0

      sleep 1

      $req=$char.speak("I should shove my book where ???")
      do sleep 1 until $char.wait($req) <> 0

      sleep 1

      $= $char.play("DoMagic1")

      $req =$char.speak("POOF !!! Your a Toad !")
      do sleep 1 until $char.wait($req) <> 0

      $req= $char.play("DoMagic2")
      do sleep 1 until $char.wait($req) <> 0

; sleep 1

      $=$char.speak("Bye !")

      $= $char.play("goodbye")

      $req=$char.hide
      do sleep 1 until $char.wait($req) <> 0

   else
      ? "Microsoft Agent not installed, or failed to start. " + @error + " / " + @serror
   endif

else

   ? "Microsoft Agent not installed."

endif

exit 1

 



-Shawn

Top
#24619 - 2002-07-24 09:49 PM Re: POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Shawn ... made my day ...

thanks
_________________________
If not for the last minute ... nothing would get done ...

Top
#24620 - 2002-07-24 11:45 PM Re: POPUP Password age reminder
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Shawn,

Where did you find the agent properties you used?

(.wait - .play("read") etc.)

MickeySoft I suppose??
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#24621 - 2002-07-25 05:28 PM Re: POPUP Password age reminder
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It'll be somewhere in MSDN. I also have some stuff in the November 2001 Edition of the Platform SDK.
_________________________
There are two types of vessels, submarines and targets.

Top
#24622 - 2002-07-25 08:01 PM Re: POPUP Password age reminder
Beelzel Offline
Fresh Scripter

Registered: 2002-03-08
Posts: 46
Loc: DC Metro area
Agents
_________________________
If not for the last minute ... nothing would get done ...

Top
#24623 - 2002-07-25 08:39 PM Re: POPUP Password age reminder
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
ahhhhrrrrggg not again!!!!

thus I summon your network drives!
_________________________
How to ask questions the smart way <-----------> Before you ask

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 2175 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.101 seconds in which 0.03 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