Page 1 of 1 1
Topic Options
#76676 - 2003-09-12 07:39 PM script on checking for a .dll
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 Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
$ReturnCode = ExistKey("HKEY_CLASSES_ROOT\CLSID\{04F47D98-3495-4634-B195-AAEBB9DB5DD2}\InprocServer32")
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#76678 - 2003-09-12 07:54 PM Re: script on checking for a .dll
Anonymous
Unregistered


slap me !!

thanks.

Top
#76679 - 2003-09-12 09:15 PM Re: script on checking for a .dll
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hey! Can I? No fair, I pointed out the same thing in your other post.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#76680 - 2003-09-12 09:59 PM Re: script on checking for a .dll
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
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 Offline
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 ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#76683 - 2003-09-12 10:26 PM Re: script on checking for a .dll
Anonymous
Unregistered


the space is a result of me being a dumb ass [Confused]

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 Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Why not?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#76685 - 2003-09-12 10:45 PM Re: script on checking for a .dll
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
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 Offline
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"
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#76688 - 2003-09-12 11:31 PM Re: script on checking for a .dll
Anonymous
Unregistered


well that part works....still playing with the second part.
Top
Page 1 of 1 1


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.133 seconds in which 0.102 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