#71037 - 2002-10-24 05:53 PM
Re: UpdateKiXForms() - comments
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Doc,
One comment (one thing that I learned from MCA )..
I would replace:
code:
$Destination="%windir%\system32\"
with:
code:
$Destination=$windir+"\system32\"
Where $windir is:
code:
$windir = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","SystemRoot")
There is my 2¢..
Kent
|
Top
|
|
|
|
#71038 - 2002-10-24 10:05 PM
Re: UpdateKiXForms() - comments
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Kent,
Yes, I could read reg for that, but then that would add a couple more lines, as Windows 9x would not store in the same place, etc... And as far as MCA on that point, It was my recommendation many times in the past to do Reg reads for locations. MCAs was the <>0 <>1 etc.. However, in this case I'm not sure it is the best or not. The environment "should" mimick the reg for that. If the environment is not, then that workstation is going to be having other pathing problems beyond your script as well.
Sorry Lonkero, I've been using/working/fixing NT since 3.1 days. .DLL files should not go anywhere else. I'm not saying you can't, I'm saying that they should not go anywhere else except the %windir%\system(32) folders.
2000 now has a dllcache folder under system32 which puts back .DLL files into the SYSTEM32 folder if a user deletes them.
As far as optional, I'm still not sure what you're meaning. I put it as C:\TEMP because I used c:\temp for testing, but in your own useage I would expect one to put in their location which may be %NETLOGON% folder. (Windows 9x would not find it that way though).
How or what more specifically are you alluding to? Maybe show a code example of what you're thinking of. Sorry, but I'm drawing a blank as to what you're asking for.
|
Top
|
|
|
|
#71039 - 2002-10-24 10:59 PM
Re: UpdateKiXForms() - comments
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Doc,
Yeah.. I guess I could agree, but it would add five lines and the variable could be re-used throughout the script..
code:
IF (@inwin = 1) $windir = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion","SystemRoot") ELSE $windir = READVALUE("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion","SystemRoot") ENDIF
Thanks,
Kent
|
Top
|
|
|
|
#71040 - 2002-10-25 04:05 AM
Re: UpdateKiXForms() - comments
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11623
Loc: CA
|
Lonkero, Les, Kent...
Have updated the code again. This time it has variables you can supply Lonkero, Has names as Les asked for, and has Registry reads that Kent suggested.
You guys done picking on me yet?
Love ya... Actually found this a very enlightening post. Learned some more "finer" points of coding in KiX.
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=12&t=000285#000000
|
Top
|
|
|
|
#71042 - 2002-10-28 04:40 PM
Re: UpdateKiXForms() - comments
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Doc,
One more comment..
You are correct in copying down the KIXFORMS.DLL to the %windir%\system32 and needing Admin access.. If you created a %Systemdrive%\Scripts folder which I have done for the KIX32.EXE updates and modified MCA's code for.. Couldn't this be done for KIXFORMS.DLL too?
The reason for the location outside of %windir% is that we ran into a situation where a locked down user could not write to even %windir% much less %windir%\system32.
Thanks,
Kent
|
Top
|
|
|
|
#71044 - 2002-10-28 04:45 PM
Re: UpdateKiXForms() - comments
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
I was thinking that too.. But, you know the submit was pretty quick here..
Kent
|
Top
|
|
|
|
#71045 - 2002-10-28 04:48 PM
Re: UpdateKiXForms() - comments
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
how about an admin script that would: check file version scheduletask() a job to unregister it (if necessary) push the file to the client PC scheduletask() a job to register it
possibly provide a open/readline method for listing client PC names
|
Top
|
|
|
|
#71047 - 2002-10-28 04:54 PM
Re: UpdateKiXForms() - comments
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I wouldn't say King...
I'm just clever... There are people here that actually KNOW what they are doing.
|
Top
|
|
|
|
#71048 - 2002-10-28 06:03 PM
Re: UpdateKiXForms() - comments
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Les,
You are right, here is the error:
quote:
RegSvr32 DllRegisterServer in c:\scripts\kixforms.dll failed. Return code was: 0x8002801c
Thanks,
Kent
|
Top
|
|
|
|
#71051 - 2002-12-04 06:48 PM
Re: UpdateKiXForms() - comments
|
Grasshopper
Fresh Scripter
Registered: 2002-11-29
Posts: 15
Loc: London, UK
|
Just what I'm looking for, but just wanted to ask quickly, will this install and register the dll without admin rights ? I'm guessing 'no' !
_________________________
Just Another Aussie on Tour !
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 557 anonymous users online.
|
|
|