?
Solved

Register VB controls

Posted on 2004-04-07
7
Medium Priority
?
291 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 300 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

800 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