Chris S.
(MM club member)
2002-10-25 10:41 PM
KiXforms - Logonscript Sample

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


LonkeroAdministrator
(KiX Master Guru)
2002-10-25 10:46 PM
Re: KiXforms - Logonscript Sample

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 ]


Chris S.
(MM club member)
2002-10-25 10:51 PM
Re: KiXforms - Logonscript Sample

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


Kdyer
(KiX Supporter)
2002-10-25 11:02 PM
Re: KiXforms - Logonscript Sample

Sweet..

Thanks,

Kent


rclarke
(Starting to like KiXtart)
2002-10-26 10:32 AM
Re: KiXforms - Logonscript Sample

Hi Chris,

Pleased to see that your script is also a good example of how to use Hungarian Notation [Wink]

Rod.


NTDOCAdministrator
(KiX Master)
2002-10-26 11:23 AM
Re: KiXforms - Logonscript Sample

Thanks for the sample Chris. Looks [Cool]

Chris S.
(MM club member)
2002-10-26 02:04 PM
Re: KiXforms - Logonscript Sample

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


Wizard
(Hey THIS is FUN)
2002-11-04 03:05 PM
Re: KiXforms - Logonscript Sample

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 ]


Chris S.
(MM club member)
2002-11-05 03:00 PM
Re: KiXforms - Logonscript Sample

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.


Wizard
(Hey THIS is FUN)
2002-11-05 03:39 PM
Re: KiXforms - Logonscript Sample

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
(Hey THIS is FUN)
2002-11-07 12:21 AM
Re: KiXforms - Logonscript Sample

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


Chris S.
(MM club member)
2002-11-06 02:59 PM
Re: KiXforms - Logonscript Sample

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.


ShawnAdministrator
(KiX Supporter)
2002-11-06 03:14 PM
Re: KiXforms - Logonscript Sample

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]


JochenAdministrator
(KiX Supporter)
2002-11-06 03:20 PM
Re: KiXforms - Logonscript Sample

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] )


Chris S.
(MM club member)
2002-11-06 03:20 PM
Re: KiXforms - Logonscript Sample

Hmm. Hadn't tried that. I'll test it this morning, since I have a brand-new build of KiXforms to try out. [Wink]

Chris S.
(MM club member)
2002-11-06 03:26 PM
Re: KiXforms - Logonscript Sample

Ditto. Just copied over the DLL and it works. That will make maintaining the current build of KiXforms easier. Thanks for the tip, Shawn.

MightyR1
(MM club member)
2002-11-06 03:42 PM
Re: KiXforms - Logonscript Sample

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...


Schuliebug
(Hey THIS is FUN)
2002-11-06 03:47 PM
Re: KiXforms - Logonscript Sample

Chris, great example how a graphical login could work. I rewrote our login script to use functions and it looks great (including progressbar & icons) !!

MightyR1
(MM club member)
2002-11-07 08:58 AM
Re: KiXforms - Logonscript Sample

Can anyone verify my previous post in this topic???

Wizard
(Hey THIS is FUN)
2002-11-07 09:08 AM
Re: KiXforms - Logonscript Sample

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


MightyR1
(MM club member)
2002-11-07 09:24 AM
Re: KiXforms - Logonscript Sample

Wizard,

Pushing the entries through login will not work on Wnt and above since the entries must be in HKLM where a normal user doesn't have rights...

Solution:

  • use kixforms in your script
  • error creating object: W95=copy+register, Wnt=display message to call supportdesk
  • Wnt-->supportdesk remotely copies the dll and writes the regentries (must have local admin rights!!!)


Wizard
(Hey THIS is FUN)
2002-11-07 09:27 AM
Re: KiXforms - Logonscript Sample

That is correct, but as with all mistakes I was asuming that everyone had my setup, where all ours users are a member of the LOCAL admin for each W2K PC

Or rather the Domain Users group is a member of the Local Admin group.

But, yes you are right it would fail.

W


Sealeopard
(KiX Master)
2002-11-07 04:01 PM
Re: KiXforms - Logonscript Sample

My users will not even get 'Power User' status over here.

Wizard
(Hey THIS is FUN)
2002-11-07 04:03 PM
Re: KiXforms - Logonscript Sample

its only to make our lives easier.!

I do run an application logger on the workstations once a month, and various other home-written spyware.!!

W


Dariusvw
(Fresh Scripter)
2012-02-15 10:26 AM
Re: KiXforms - Logonscript Sample

This Sample Is not available.

Is it still around? Somewhere?


ShaneEP
(MM club member)
2012-02-15 07:13 PM
Re: KiXforms - Logonscript Sample

It may be, I do not know where though as I haven't seen Chris around as much lately. In any case, since it was written in 2002, I would imagine it is probably outdated anyways. If there is something you are trying to accomplish with kixforms, you would have better luck creating a new thread. It's not used as much as it was in it's hay day, but I still use it for small applications and it still works great. So if you need a small sample of something let me know.

Chris S.
(MM club member)
2012-02-15 09:58 PM
Re: KiXforms - Logonscript Sample

I still lurk. I subscribed to the RSS feed, so I still see the posts.

Yeah, since Geocities has gone the way of the dodo this is pretty much gone. I don't have the source anymore.