Solved

Register VB controls

Posted on 2004-04-07
7
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Title # Comments Views Activity
Paint/Redraw window while dragging 16 88
MS Access Search and Replace Using VBA 6 92
Getting warning: You are about to delete 1 row(s) 9 54
Set WorkSheet  not Working 9 52
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

726 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