#88950 - 2002-10-25 10:41 PM
KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Here is the logonscript sample I promised.
It makes use of a logo, so you'll have to download it from here:
http://www.geocities.com/gk_zone/kix_logonsample.html
|
Top
|
|
|
|
#88952 - 2002-10-25 10:51 PM
Re: KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Isn't it, though?
I left the comment in from when I was writing it. I'd suggest to others to change it to "Show" when they edit the script for their own use.
{edit} Oh, yeah. Remove the "CLS" if you are using WKix32 like Jooel is. [ 25. October 2002, 23:05: Message edited by: Chris S. ]
|
Top
|
|
|
|
#88953 - 2002-10-25 11:02 PM
Re: KiXforms - Logonscript Sample
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
Top
|
|
|
|
#88954 - 2002-10-26 10:32 AM
Re: KiXforms - Logonscript Sample
|
rclarke
Starting to like KiXtart
Registered: 2001-06-08
Posts: 178
Loc: Oxfordshire, United Kingdom.
|
Hi Chris,
Pleased to see that your script is also a good example of how to use Hungarian Notation
Rod.
|
Top
|
|
|
|
#88955 - 2002-10-26 11:23 AM
Re: KiXforms - Logonscript Sample
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Thanks for the sample Chris. Looks
|
Top
|
|
|
|
#88956 - 2002-10-26 02:04 PM
Re: KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
|
Top
|
|
|
|
#88957 - 2002-11-04 03:05 PM
Re: KiXforms - Logonscript Sample
|
Wizard
Hey THIS is FUN
Registered: 2000-12-05
Posts: 264
Loc: Bristol, England
|
This is cool.!
I am going to 'borrow' this and re-write my script to fit.!
If you take alook at this...
code:
$lblStatus.Text = "Mapping Network Drives..." $sNetDrives = Split("P,R,S,T", ",") $sNetMappin = Split("\\server1\share,\\server2\share,\\server3\share,\\server4\share", ",") $frmFuncStatus.Text = "Network Drive Mapping" $prgFuncStatus.Max = Ubound($sNetDrives) + 1 $prgFuncStatus.Value = "" $frmFuncStatus.Show Sleep 0.5 For Each $sDrive in $sNetDrives $prgFuncStatus.Value = $prgFuncStatus.Value + 1 ; $lblFuncStatus.Text = "Mapping Drive $sDrive:\" $lblFuncStatus.Text = "$sNetMappin($prgFuncStatus.Value)" Sleep 0.5 Next $frmFuncStatus.Hide
I can't get the $lblFuncStatus.Text line to work.
Any ideas ??!
W [ 05. November 2002, 13:27: Message edited by: Wizard ]
_________________________
Wizard There's no place like 127.0.0.1
vb | kix | batch | html | cfm | js | english
|
Top
|
|
|
|
#88958 - 2002-11-05 03:00 PM
Re: KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Wiz, I'm not sure that you can use a "$something.Value" in quotes. You might want to populate another string before like...
code:
$sMapping=$sNetMappin[$prgFuncStatus.Value] $lblFuncStatus.Text = $sMapping
Also, you are using parens () when you should be using brackets [].
Sorry I didn't catch your question earlier, but you did an edit on your previous post instead of posting a new question.
|
Top
|
|
|
|
#88961 - 2002-11-06 02:59 PM
Re: KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Well, you might get stuck in an endless loop if your user doesn't have sufficient rights to register DLLs (e.g. at least Power User rights) so I might prefer doing it like this...
code:
$frmRoot = CreateObject("Kixtart.Form") If @ERROR $nul=SetConsole("Show") "KiXforms.dll not installed/registered" ? Copy @SCRIPTDIR+"\KiXforms.dll" "%WINDIR%" If @INWIN = "1" Shell "%COMSPEC% /c Regsvr32 /s %WINDIR%\KiXforms.dll" Else Shell "%COMSPEC% /c %WINDIR%\System\Regsvr32 /s %WINDIR%\KiXforms.dll" EndIf $frmRoot = CreateObject("Kixtart.Form") If @ERROR "Unable to register KiXforms.dll, please call the helpdesk." ?? "Press ENTER to continue..." ? Get $S Exit(1) EndIf EndIf
The @INWIN section is in there since RegSvr32 is in not necessarily in the %PATH% on Win 9x machines.
|
Top
|
|
|
|
#88962 - 2002-11-06 03:14 PM
Re: KiXforms - Logonscript Sample
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Just as an FYI (and I haven't been able to verify this 100%) but I think one might be able to get away with registering the Kixforms DLL ONLY ONCE on a per machine basis. Kixforms.DLL is totally standalone and has no other COM dependencies ... the TypeLib for Kixforms is embedded in the DLL itself.
Not sure if anyone can verify this assertion or not, but what it means is that once Kixforms is registered, all one has to do to upgrade the component is to copy over the original. No regsvr32 required.
So, this (may) mean that for this particular case - it might be wise to host Kixforms.DLL in a domainuser read/writeable folder on the wkstn. I can't remember off the top of my head just how protected and locked-down system32 is
|
Top
|
|
|
|
#88964 - 2002-11-06 03:20 PM
Re: KiXforms - Logonscript Sample
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Hmm. Hadn't tried that. I'll test it this morning, since I have a brand-new build of KiXforms to try out.
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|