Solved

Register VB controls

Posted on 2004-04-07
7
276 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
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 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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now