Page 1 of 2 12>
Topic Options
#95170 - 2002-11-08 12:54 AM Did I just hear someone mumble it's a slow night on the board ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
yeah ?
Top
#95171 - 2002-11-08 01:21 AM Re: Did I just hear someone mumble it's a slow night on the board ?
MightyR1 Offline
MM club member
*****

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

I'm Alive [Big Grin]

read some topics on problems installing KiXForms.dll on NT4 and above without adminpowers.
So I wrote this UDF.
This UDF uses WriteLog2 from Howard Bullock (http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000188)

Check it out:

Note 1 : Not tested yet on a domain, be carefull with it !!!
Note 2 : Maybe wrong forum [Wink]
Note 3 : If fully tested, will ask mods to move to UDF

code:
;****************************************************************************
;
;FUNCTION : KiXForms_install()
;
;AUTHOR : Patrick Rutten (MightyR1@hotmail.com)
;
;CONTRIBUTORS : KiXtart buddies
;
;ACTION : Installs the KiXForms dll on every computer in @domain or on $computer
;
;SYNTAX : KiXForms_install($sourcedll, $destinationdll[, $computer])
;
;VERSION : 1.0
; initial release
;
;PARAMETERS : $sourcedll
; location of the KiXForms.dll to be copied
; i.e. @SCRIPTDIR+"\KiXForms.dll"
; $destinationdll
; location where the KiXForms.dll is to be copied
; must begin with c:\ or d:\ or ...
; i.e. "C:\WINNT\system32\KiXForms.dll"
; OPTIONAL $computer
; target computer
;
;REMARKS : In @scriptdir a KiXForms_install.log is created containing the
; installation results per computer
;
;RETURNS : Nothing
;
;DEPENDENCIES : WriteLog2() by Howard A. Bullock ()
; - http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000188
; ADSI
; Administrator rights on the target computer(s)
; Targets are >= winnt40 (W9x can use regsvr32)
;
;KIXTART VER : 4.x
;
;EXAMPLE(S) : $RC=KiXForms_install(@SCRIPTDIR+"\KiXForms.dll","C:\WINNT\system32\KiXForms.dll",@WKSTA)
;
;KNOWN ISSUES : What if OS on domain are installed in c:\winnt, d:\winnt, c:\windows etc.?
;
;****************************************************************************
;
;
Function KiXForms_install($sourcedll, $destinationdll, OPTIONAL $computer)

$file=@SCRIPTDIR+"\KiXForms_install.log"
$admindrv=SubStr($destinationdll,1,1)
$targetpath=SubStr($destinationdll,3)
$destinationpath=SubStr($destinationdll,1,InStrRev($destinationdll,"\")-1)

If Exist("$file") Del "$file" EndIf

If Len($computer) = 0
$Domain=@DOMAIN
$Computers=GetObject("WinNT://$Domain")
$Computers.filter="Computer",""
Else
Global $Computers[0]
$Computers[0]=$computer
EndIf

For Each $computer in $Computers
$loginfo="***************************************************************************"
$RC=WriteLog2($file,$loginfo)

$loginfo=$computer+" - I - Installation of KiXForms started."
$RC=WriteLog2($file,$loginfo,1)

$target="\\"+$computer+"\"+$admindrv+"$$"+$targetpath
Copy "$sourcedll" "$target"
If @ERROR
$loginfo=$computer+" - E - Copy of dll failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - Copy of dll was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)

$cnt=1

;1
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}",
"","Widget Class",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;2
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\InprocServer32",
"",$destinationdll,REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;3
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\InprocServer32",
"ThreadingModel","both",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;4
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\ProgID",
"","Kixtart.Form.1",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;5
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\VersionIndependentProgID",
"","Kixtart.Form",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;6
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}",
"","IWidget",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;7
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid",
"","{00020424-0000-0000-C000-000000000046}",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;8
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid32",
"","{00020424-0000-0000-C000-000000000046}",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;9
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\TypeLib",
"","{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;10
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\TypeLib",
"Version","1.0",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;11
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form",
"","Widget Class",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;12
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form\CLSID",
"","{F89DF848-618A-46F9-8A1C-396EA442BDD3}",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;13
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form.1",
"","Widget Class",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;14
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Kixtart.Form.1\CLSID",
"","{F89DF848-618A-46F9-8A1C-396EA442BDD3}",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;15
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0",
"","Kixforms 1.0 Type Library",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;16
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\0\win32",
"",$destinationdll,REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;17
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\FLAGS",
"","0",REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

;18
$RC=WriteValue("\\"+$computer+
"\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\HELPDIR",
"",$destinationpath,REG_SZ)
If @ERROR
$loginfo=$computer+" - E - RegWrite $cnt Failed --> ErrorCode=@ERROR; @SERROR."
Else
$loginfo=$computer+" - I - RegWrite $cnt was succesfull."
EndIf
$RC=WriteLog2($file,$loginfo,1)
$cnt=$cnt+1

$loginfo=$computer+" - I - Installation of KiXForms finished."
$RC=WriteLog2($file,$loginfo,1)

Next
EndFunction



[ 08. November 2002, 15:32: Message edited by: MightyR1 ]
_________________________
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
#95172 - 2002-11-08 01:22 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Yeah, and you have mail.

Still playing with that script. Man did you build a great tool. I turned it into a endless-loop and watched CPU and Mem Usage on KiX32. 0% and about 1000K.

Top
#95173 - 2002-11-08 01:33 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MightyR1,
Correct me if I'm wrong but at first blush it looks like you are doing all those WriteValue() statements to the local commputer running the script and not the remote computer you push the DLL to.

Wouldn't you need to do?

$RC=WriteValue("\\"+$computer+"\HKLM\...")
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95174 - 2002-11-08 03:16 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Chris,

This CPU script of yours fires the imagination.
Expecially after browsing all those PERF
counters in WMI ...

Patrick,

I really like this idea of yours to poke the
registry with COM settings ... thats what most
COM components do anyways, a virtual REGPOKE
stored as a resource (kinda like an ICON) ...
thinking that we could probably eliminate half
those pokes as being superfluous ... some are
not really needed
like "HKEY_CLASSES_ROOT\kixtart.form.1" ... as
long as you never create a form like this:

$form = createobject("kixtart.form.1")

then you don't need the poke.

-Shawn

[ 08. November 2002, 03:18: Message edited by: Shawn ]

Top
#95175 - 2002-11-08 03:50 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Eh Shawn,
No comment on the local vs. remote reg writes...

And where's the 'long lines police' when you need 'em?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95176 - 2002-11-08 05:21 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Wrong Forum [Wink] the Long-line Police are powerless [Frown]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#95177 - 2002-11-08 05:21 AM Re: Did I just hear someone mumble it's a slow night on the board ?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey Les, well spotted ... this whole registering
business really bugs me - there must be a way to
circumvent the permissions here ... i mean, when
a domain user is surfing the web, the downloads
an ActiveX control from a website, doesn't seem
to be any issue there, unless IE does some kinda
magic ... isn't HKEY_CLASSES_ROOT mirrored under
HKCU somewhere ?

[ 08. November 2002, 05:22: Message edited by: Shawn ]

Top
#95178 - 2002-11-08 07:47 AM Re: Did I just hear someone mumble it's a slow night on the board ?
MightyR1 Offline
MM club member
*****

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

I think your right concerning the writevalue...

Was only able to test it locally on my laptop.

Will adjust...
_________________________
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
#95179 - 2002-11-08 02:37 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
also...

if kixforms is already registerred, then you only need to replace the dll.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#95180 - 2002-11-08 02:49 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The way I look at it... if you're advanced enough to be using KiXForms then you are most likely so advanced that you have WMI on all the machines. With WMI you can execute RegSvr32 remotely.

Then again, there's the Task Scheduler route. You know, it's not really that difficult so why are ppl so reluctant to use it?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95181 - 2002-11-08 03:09 PM Re: Did I just hear someone mumble it's a slow night on the board ?
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Always willing to find other ways...

And let others teach me [Wink]
_________________________
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
#95182 - 2002-11-08 03:11 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
I use Task Scheduler, Les.

Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#95183 - 2002-11-08 03:12 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Patrick,
I'd be more than willing to teach you how NOT to post long lines. [Roll Eyes]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95184 - 2002-11-08 03:15 PM Re: Did I just hear someone mumble it's a slow night on the board ?
MightyR1 Offline
MM club member
*****

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

What's stopping you?
_________________________
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
#95185 - 2002-11-08 03:17 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The Atlantic ocean.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95186 - 2002-11-08 03:21 PM Re: Did I just hear someone mumble it's a slow night on the board ?
MightyR1 Offline
MM club member
*****

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

seriously:

Don't know if it has been discussed before, but is KiX able to use " _" in long lines, like VB does???

Can't remember and BBsearch function doesn't function at 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
#95187 - 2002-11-08 03:24 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Les... Doesn't your mouse have a little wheel on top?

If you were to press it, scrolling from side to side wouldn't be too difficult [Big Grin]

I't might be a cultural/religous thing however. I heard that Canada almost has a civil war a few years ago...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#95188 - 2002-11-08 03:25 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Haven't tried the underscore...
You can simply toss in a CR at any logical point like a ( or a , etc.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#95189 - 2002-11-08 03:29 PM Re: Did I just hear someone mumble it's a slow night on the board ?
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Well, here's some tips...

HKLM = HKEY_LOCAL_MACHINE
HKCU = HKEY_CURRENT_USER
HKCR = HKEY_CLASSES_ROOT
HKCC = HKEY_CURRENT_CONFIG
HKU = HKEY_USERS

Regarding the "_", ala VBScript. No need. KiX is a free-format scripting language. Just break your line and continue on the next. If you're using quotes, put an end-quote at the end of the line and following with a "+" then continue your quote on the next line...

code:
"This is a long line....................."+
"........................................"+
"....and I'm spent." ?


Top
Page 1 of 2 12>


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

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.076 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