#76676 - 2003-09-12 07:39 PM
script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
Can someone please help with the script below. The ExistKey check always says not installed and then registers the .dll again ? Below is the Code and below that the Regkey dumped to text. Or is there a better simpler way to check for a registered .dll. The users do not have admin rights.
thanks, Mark
code:
Select Case @PRODUCTTYPE = "Windows XP Professional" $ReturnCode = ExistKey("HKEY_CLASSES_ROOT\CLSID\{04F47D98-3495-4634-B195-AAEBB9DB5DD2}\InprocServer32=\\gtb1\netlogon\tqcrunas.dll") If $ReturnCode = 0 ? "XP TQCRunAs Installed...." Else ? "XP TQCRunAs Not Installed...." Shell "TqcRunas -f \\GTB1\netlogon\registerdll.tqc " EndIf EndSelect
code:
Key Name: HKEY_CLASSES_ROOT\CLSID\{04F47D98-3495-4634-B195-AAEBB9DB5DD2}\InprocServer32 Class Name: <NO CLASS> Last Write Time: 9/12/2003 - 1:39 PM Value 0 Name: <NO NAME> Type: REG_SZ Data: \\gtb1\netlogon\tqcrunas.dll
Value 1 Name: ThreadingModel Type: REG_SZ Data: Apartment
|
|
Top
|
|
|
|
#76677 - 2003-09-12 07:42 PM
Re: script on checking for a .dll
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
$ReturnCode = ExistKey("HKEY_CLASSES_ROOT\CLSID\{04F47D98-3495-4634-B195-AAEBB9DB5DD2}\InprocServer32")
|
|
Top
|
|
|
|
#76678 - 2003-09-12 07:54 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
slap me !!
thanks.
|
|
Top
|
|
|
|
#76680 - 2003-09-12 09:59 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
i thought i had posted it...wasn't sure, rough kinda day...
|
|
Top
|
|
|
|
#76681 - 2003-09-12 10:02 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
thanks for the help.....this is what I have so far...I can't seem to get the Shell @LDrive to work correctly. I want to split the load so as to pull from whichever server the user logs on from. code:
;=============================================================================================== ; Check for and register tqcrunas.dll ;===============================================================================================
Select Case @INWIN >= 1 $ReturnCode = ExistKey("HKEY_CLASSES_ROOT\CLSID\{04F47D98-3495-4634-B195-AAEBB9DB5DD2}\InprocServer32") If $ReturnCode <> 0 Shell @LDRIVE + "\TqcRunas -f \\@LDRIVE\registerdll.tqc " EndIf EndSelect ;=============================================================================================== ;Windows Hot Fixes and Service Packs - Check Registry and Install if needed ;===============================================================================================
Select Case @PRODUCTTYPE = "Windows XP Professional" $ReturnCode = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB824146") If $ReturnCode <> 0 MessageBox("A Windows Critical Update is being installed to your PC. Once finished, a restart may be required.","Windows Critical Update KB824146",64,30) Shell "@LSERVER \os\KB824146\WindowsXP-KB824146.tqc" EndIf Case @PRODUCTTYPE = "Windows 2000 Professional" $ReturnCode = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB824146") If $ReturnCode <> 0 MessageBox("A Windows Critical Update is being installed to your PC. Once finished, a restart may be required.","Windows Critical Update KB824146",64,30) Shell "@LSERVER \os\KB824146\Windows2K-KB824146.tqc" EndIf EndSelect Exit
|
|
Top
|
|
|
|
#76682 - 2003-09-12 10:08 PM
Re: script on checking for a .dll
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
This is how I use @LSAERVER for that task.
code:
shell "%COMSPEC% /C @LSERVER\netlogon\corp\msnet\09\msnetupd.exe"
or(with the unnecessary %comspec%) shell "@LSERVER\netlogon\corp\msnet\09\msnetupd.exe"
What is the space in your SHELL line? code:
Shell "@LSERVER \os\KB824146\Windows2K-KB824146.tqc"
[ 12. September 2003, 22:10: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#76683 - 2003-09-12 10:26 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
the space is a result of me being a dumb ass
but...i've tried to incorporate from the previous post. This is the command that I need to run: code:
TqcRunas -f \\server\netlogon\registerdll.tqc
so i'm trying to work with the \\server\netlogon switch for the tqcrunas. Possible options below ? but would rather not use the 3rd option
code:
Shell "@LSERVER\netlogon\TqcRunas -f \registerdll.tqc" Shell "@LSERVER\netlogon\TqcRunas -f %\..\registerdll.tqc" Shell "@LSERVER\netlogon\TqcRunas -f \\GTB1\netlogon\registerdll.tqc"
|
|
Top
|
|
|
|
#76684 - 2003-09-12 10:40 PM
Re: script on checking for a .dll
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
#76685 - 2003-09-12 10:45 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
I have 4 offices, single domain. The file is not large and to register the .dll would be a one time deal. I'd rather have the users register the file using their local logon server rather than GTB1 across the WAN. About 400 users total. I don't think any of the Kix switch will work as it is a Shell command and the tqcrunas then has its own switches...But if that's the easiest way it will work that's fine too.
|
|
Top
|
|
|
|
#76686 - 2003-09-12 11:17 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
Thanks for the help Howard. I decided to pull from one server...files are small. My biggest issue now is after the .dll is registered, the message box appears saying the critical update is being installed...then nothing happens ?? If I manually browse to the directory and run the .tqc file, the patch installs. This part would definately have to run on different servers to spread the load.
code:
Select Case @PRODUCTTYPE = "Windows XP Professional" $ReturnCode = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB824146") If $ReturnCode <> 0 MessageBox("A Windows Critical Update is being installed to your PC. Once finished, a restart may be required.","Windows Critical Update KB824146",64,30) Shell "@LSERVER\os\KB824146\WindowsXP-KB824146.tqc" EndIf Case @PRODUCTTYPE = "Windows 2000 Professional" $ReturnCode = ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB824146") If $ReturnCode <> 0 MessageBox("A Windows Critical Update is being installed to your PC. Once finished, a restart may be required.","Windows Critical Update KB824146",64,30) Shell "@LSERVER\os\KB824146\Windows2K-KB824146.tqc" EndIf EndSelect
|
|
Top
|
|
|
|
#76687 - 2003-09-12 11:18 PM
Re: script on checking for a .dll
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
won't this work?
Shell "@LSERVER\netlogon\TqcRunas -f @LSERVER\netlogon\registerdll.tqc"
|
|
Top
|
|
|
|
#76688 - 2003-09-12 11:31 PM
Re: script on checking for a .dll
|
Anonymous
Anonymous
Unregistered
|
well that part works....still playing with the second part.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 484 anonymous users online.
|
|
|