Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


vbscript and regsvr32...

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1170
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript and regsvr32...
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 vbscript and regsvr32... - 7/23/2004 2:58:53 AM   
  wynken

 

Posts: 2
Score: 0
Joined: 7/23/2004
From:
Status: offline
Hello there!

Newbie here. ;-) I need to write a vbscript (if possible) to check if a particular .dll is registered on a remote PC, and if it is not registered, I need to register it. Is there any way to do this in vbscript?

I was able to put the script below with alot of cut & paste from other scripts. The first part of the script tests to see if we can connect to the remote PC. The part that I need is to check if the .dll is registered, and if not, to register it.

___________________________________
On Error Resume Next
If WScript.Arguments.Count = 0 Then
Wscript.Echo "Usage: regdll.vbs computername"
Wscript.Echo "Where computername is the remote PC you want to connect to."
WScript.Quit
End If

For Each Computer In WScript.Arguments
Set objWMIService = GetObject("winmgmts://" & Computer)
If Err.Number <> 0 Then
Wscript.Echo Computer & " " & Err.Description
Err.Clear
Else
Wscript.Echo "Connected to: " & Computer
End if
Next
__________________________________________

Any help that could be provided is greatly appreciated.


;-) wynken
 
 
Post #: 1
 
 Re: vbscript and regsvr32... - 7/23/2004 5:07:55 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
Here is a script taken from the technet script center:
Change the . in strComputer to the remote PC's name.
I have not tried this but it may help you.

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\System Admin Scripting Guide"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

(in reply to wynken)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript and regsvr32... Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts