Page 1 of 2 12>
Topic Options
#88950 - 2002-10-25 10:41 PM KiXforms - Logonscript Sample
Chris S. Offline
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
#88951 - 2002-10-25 10:46 PM Re: KiXforms - Logonscript Sample
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22333
Loc: OK
eh?
code:
Break On Cls
$nul=SetConsole("Hide")

doesn't exactly this make your console to show up?

{edit}
btw, your main page:
http://www.geocities.com/gk_zone/

looks nice [Wink]

[ 25. October 2002, 22:48: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#88952 - 2002-10-25 10:51 PM Re: KiXforms - Logonscript Sample
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Isn't it, though? [Wink] [Razz]

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. [Smile]

{edit}
Oh, yeah. Remove the "CLS" if you are using WKix32 like Jooel is. [Wink]

[ 25. October 2002, 23:05: Message edited by: Chris S. ]

Top
#88953 - 2002-10-25 11:02 PM Re: KiXforms - Logonscript Sample
Kdyer Offline
KiX Supporter
*****

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

Thanks,

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

Top
#88954 - 2002-10-26 10:32 AM Re: KiXforms - Logonscript Sample
rclarke Offline
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 [Wink]

Rod.

Top
#88955 - 2002-10-26 11:23 AM Re: KiXforms - Logonscript Sample
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11569
Loc: CA
Thanks for the sample Chris. Looks [Cool]
Top
#88956 - 2002-10-26 02:04 PM Re: KiXforms - Logonscript Sample
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Rod, if you want to see Hungarian Notation take a look at this. [Wink]

http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=13;t=000355

Top
#88957 - 2002-11-04 03:05 PM Re: KiXforms - Logonscript Sample
Wizard Offline
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. Offline
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
#88959 - 2002-11-05 03:39 PM Re: KiXforms - Logonscript Sample
Wizard Offline
Hey THIS is FUN
*****

Registered: 2000-12-05
Posts: 264
Loc: Bristol, England
Chris: Your a star.

The 'populate another string' suggestion worked great

I am so used to programming in loads of different languages (see tag) i get confused as to which construct to use.!!

My earlier post was just a 'Thank you' for the demo script, I thought I would monify it rather than post a new message.

Thanks again.!

W
_________________________
Wizard
There's no place like 127.0.0.1

vb | kix | batch | html | cfm | js | english

Top
#88960 - 2002-11-07 12:21 AM Re: KiXforms - Logonscript Sample
Wizard Offline
Hey THIS is FUN
*****

Registered: 2000-12-05
Posts: 264
Loc: Bristol, England
Chris, from your example script, you have an error check to see if the DLL is installed correctly.

Just as a sanity check, there should be no reason why we can't register the DLL and recall the login script, if the error checking fails.

...

code:
$frmRoot = CreateObject("Kixtart.Form")
If @ERROR
$nul = SetConsole("Show")
"KiXforms.dll not installed/registered" ?
copy "@lserver\netlogon\kixforms.dll" "@lanroot\kixforms.dll"
shell "%compec% /c regsvr32.exe kixforms.dll /s"
shell "%compec% /c @lserver\netlogon\kix32.exe @lserver\netlogon\logon.kix"
Exit
EndIf

Am I right ?!

W
_________________________
Wizard
There's no place like 127.0.0.1

vb | kix | batch | html | cfm | js | english

Top
#88961 - 2002-11-06 02:59 PM Re: KiXforms - Logonscript Sample
Chris S. Offline
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 Offline
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 [Frown]

Top
#88963 - 2002-11-06 03:20 PM Re: KiXforms - Logonscript Sample
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6372
Loc: Stuttgart, Germany
Can confirm this :

I registered it once (can't even remember when this was .. build 3 or something) and since ever then I use Send to -> System32 (Especially created shortcut for Kixforms [Big Grin] )
_________________________



Top
#88964 - 2002-11-06 03:20 PM Re: KiXforms - Logonscript Sample
Chris S. Offline
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. [Wink]
Top
#88965 - 2002-11-06 03:26 PM Re: KiXforms - Logonscript Sample
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Ditto. Just copied over the DLL and it works. That will make maintaining the current build of KiXforms easier. Thanks for the tip, Shawn.
Top
#88966 - 2002-11-06 03:42 PM Re: KiXforms - Logonscript Sample
MightyR1 Offline
MM club member
*****

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

does kixforms register always the same way?

I found the following changes after registering the dll in the c:\lpf dir:

code:
REGEDIT4
; Generated REG File
;

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}]
@="Widget Class"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\InprocServer32]
@="c:\\lpf\\kixforms.dll"
"ThreadingModel" = "both"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\ProgID]
@="Kixtart.Form.1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\VersionIndependentProgID]
@="Kixtart.Form"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}]
@="IWidget"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\TypeLib]
@="{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}"
"Version" = "1.0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form]
@="Widget Class"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form\CLSID]
@="{F89DF848-618A-46F9-8A1C-396EA442BDD3}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form.1]
@="Widget Class"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form.1\CLSID]
@="{F89DF848-618A-46F9-8A1C-396EA442BDD3}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0]
@="Kixforms 1.0 Type Library"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\0\win32]
@="c:\\lpf\\kixforms.dll"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\FLAGS]
@="0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\HELPDIR]
@="c:\\lpf\\"

Do you guys got the same settings???

If so, a script could be built to remotely copy the dll and change the registry after you (an admin or a helpdesk user with local client admin rights) are notified by the user...

Will this work...
_________________________
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
#88967 - 2002-11-06 03:47 PM Re: KiXforms - Logonscript Sample
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Chris, great example how a graphical login could work. I rewrote our login script to use functions and it looks great (including progressbar & icons) !!
_________________________
Kind regards,

Top
#88968 - 2002-11-07 08:58 AM Re: KiXforms - Logonscript Sample
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Can anyone verify my previous post in this topic???
_________________________
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
#88969 - 2002-11-07 09:08 AM Re: KiXforms - Logonscript Sample
Wizard Offline
Hey THIS is FUN
*****

Registered: 2000-12-05
Posts: 264
Loc: Bristol, England
MightyR1, All

I hereby confirm that all the registry keys listed in the above posting are the same on my Windows 2000 Pro machine

I am running 2.1.1.35 of KixForms.

That begin the case then, MightyR1 is right in saying that we could dump the reg keys out through a login script.

Good call M.

W
_________________________
Wizard
There's no place like 127.0.0.1

vb | kix | batch | html | cfm | js | english

Top
Page 1 of 2 12>


Moderator:  Shawn, ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
3 registered (Glenn Barnas, Mart, fergieman101) and 188 anonymous users online.
Newest Members
emnipetro, Hirze, thequeen, ameliaryan, shalomsalami
17641 Registered Users

Generated in 0.041 seconds in which 0.01 seconds were spent on a total of 13 queries. Zlib compression enabled.

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