Solved

Register VB controls

Posted on 2004-04-07
7
279 Views
Last Modified: 2010-05-02
I want to write a script to register 2 vb controls (.ocx, .dll) at once.  How would I do this?  Also, will it run on a Windows 2000 machine with only power user rights?  

I'm trying to fix a problem remotely.

Oh, and I guess this belongs more in the VB controls sub section, but I didn't get any responses, so I'm trying it here instead.  Thanks!

0
Comment
Question by:vbhelpme
7 Comments
 
LVL 11

Expert Comment

by:jmwheeler
ID: 10777906
shell ("regsvr32 filename.dll")
0
 

Author Comment

by:vbhelpme
ID: 10777919
Thanks jmwheeler, but what do I put that inside of?

0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10778113
just goto Start -> Run-> RegSvr32 file.dll or File.ocx
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:vbhelpme
ID: 10778139
Thanks, but maybe I wasn't clear in my question.  I know how to register a control manually.  I want to write a script file that the user can click on that will register multiple controls at once.  

I've read about it before, but I can't find anything on how to do it.  Sorry for the confusion.

Thanks!

0
 
LVL 7

Accepted Solution

by:
ramesh12 earned 75 total points
ID: 10778389
Create a batch file

and in that write commands . Ask your user to execute that batch file

In the batch file specify your Commands like

Regsvr32 whatever
0
 
LVL 11

Expert Comment

by:dbrckovi
ID: 10778655
I would like to add something to ramesh12's comment.

Batch file is a pure textual file with the extension BAT
Just type commands into it in order you would like them to execute (one command per line)
then just type the name of this bat file, and commands will be excuted.
Batch file in your case would look something like this:

-------------------------- MyBatch.bat ---------------------------------
Regsvr32 MyControl.ocx
Regsvr32 MyControl.dll
--------------------------------------------------------------------------
0
 
LVL 17

Expert Comment

by:zzzzzooc
ID: 10780364
:)~~

Or..

-------------MyScriptFile.VBS-------------------
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.run "regsvr32 c:\mydll.dll"
WShell.run "regsvr32 c:\myocx.ocx"
----------------------------------------------------

Just create a new text file, copy & paste the above in it, change the 2 file names, save it then double-click it (should run if your system supports vbscript).
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question