Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Calling RegSvr32 From VB?


Hi,

I'm developing an app that will automatically check for file updates. If it determines there is an update, it will download the appropriate file and install it on the user's computer.

However, if the file happens to be a dll, I'm assuming that I will need to unregister the old one first, copy the new one on top of the old one and then register the new one.

How can this be done in VB code behind the scenes without the user having to do anything?

Any help and/or examples would be appreciated..

Dan




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
My VB App Calling Regsvr32.exe
My VB6 program is calling regsvr32.exe to register a control. Is regsvr32.exe the same for all windows versions XP and higher? Or does each windows use a different one? I don't want to rely on the program being in the windows path so I wanted to include it.

Thanks!

Regsvr32 On XP
Hi folks ! I have a problem registering an OCX under Windows XP pro. One for the VB Samples CalendarVB.ocx.

It gives an error message with no sense at all when trying to use regsvr32. Is it normal ? Is there some major differences betweeen the use of regsvr32 on XP and 2000 ? Because it works fine under 2000.

Regsvr32
ok-

so you use regsvr32 to register dll's etc in win2k, xp

what about win 9x?????


EDIT--

i am stupid disregard me

EDIT EDIT--

i meant i am stupid - regsvr32 is in win9x

Regsvr32
Is there any way to simulate

Start-->Run-->regsvr32 C:someDll.dll

??

Thanks

Chief

"Dammit Smithers, this is brain surgery not rocket science!! Now hand me that ice cream scoop..."

RegSvr32
Anyone have or know where to find a list of error codes with DESCRIPTIONS for regsvr32?

Regsvr32 And MSI
I was wondering could an expert help me with regards to a couple of problems/ questions. I am new to Vb6 and have been asked to write a couple of Applications in a project.

I using VS2003 to build an MSI which installs a couple of vb6 dlls which are used as an MS Office add ins.

The problem I have is that I don't seem to be able to get the MSI installer to install for all users even if I use orca to set ALLUSERS. This is happening in test mode at the minute so I can easily go over to the testers machines and use regsrv32 and get them going again after a new drop. The testers are logging in using different usernames all the time to test different functionaility. However when this gets rolled out into production, this will be a major problem.

Also what happens if a new user is created on the PC? If the MSI did work would the new user have these dlls registered.


regsvr32
If you copy in new dlls of the same name with same version number or different version numbers do you have to use regsrv32. I don't understand how it works completely?

Thanks for any help in advance.

Regsvr32
In order to register dlls using the regsvr32 utility, does need admin rights on the machine running the command?

Regsvr32
I am using shell and regsvr32 for registring DLL files it work perfectly on some PC's but in some PC i have to manually register the DLL to make it work. i am using "/s" as argument with regsvr32 for no popup messagebox but when i remove "/s" argument it work on ervery PC wihtout any problem.. is there anything i have to know about regsvr32 and "/s" argument? why not my DLL's are registring on some PC when i use "/s"?.. is there any better option for registring DLL files?

Regsvr32 Help
Hi,

I need to register 2 .dll's and 2 .ocx's to the system32 folder silently without any msgboxes. Can someone give me an example on how I would do so? All I know so far is:


VB Code:
Shell "C:WINDOWSsystem32
egsvr32.exe"


But I know it needs parameters and it needs to register one at a time. Thanks for the help.

JBD2

Regsvr32!!!!!
I'm trying to register an add-in for VB using regsvr32... however it won'tr register!

No success message appears, but no error message appears either when I run regsvr32. The registry, however, has no trace of the dll I just registered!

I replaced my regsvr32.exe file, but the problem still persists.

My Windows is ME.

Any ideas?

Regsvr32
What is regsvr32? I need to install a component using code and I have been told to use "regsrv32 <componentpath>" but VB does not recognize "regsrv32"!

Please help!

Regsvr32
I created an app that requires a few DLLs and OCXs to run (such as MSVMVB60.DLL). I would like to not have to create an installation program for it (using, for example, the P&D Wizard). If the user that runs the program does not have these files, could he simply place the files where they should be (in C:WINDOWSSystem)? Is it necessary to register the DLLs and OCXs with regsvr32?
I tried doing this with computers that did not have VB installed and did not register the DLLs. In one of them, the program appeared to run normally... However, the program did not work in the other computer.
If the DLLs must be registered, is there any way to do so without an installation program (and besides doing it manually)?

Regsvr32.exe With 98
Does anyone know why this is not working? Or if they have another way of doing this?

I am trying to unregister a dll for win 98 and it is not working. The exact same statement will work for 2000, but not for 98. Does anyone know why not?



VB Code:
ShellExecute 0, vbNullString, "regsvr32.exe", "/u """ & App.Path & "AdjustBilledPrices.dll" & """", "", 0

Regsvr32
Hi,


In my program I am registering some DLLs using
shell "regsvr32 dllName /s" . Now my question is that if I does not specify the path of DLL then what is the default path ,
Is it winnt /system32 for win2000. or else.

Regards
Gary

Regsvr32.exe
I have a question and hope that you can help me. My program works fine but I just want to know this for my own knowledge.

OK, I made a COM dll. My client program reference it.

Once in a while, I would reimage my computer with a software called Ghost leaving my OS like brand new again. That means all the registered COM dll has to be reregister after this process.


I included this line in my client program to automatically register the COM dll everytime it runs.

Code:
Call Shell("Regsvr32.exe /s " & Chr(34) & App.Path & "Web PowerWeb Power.dll" & Chr(34), vbHide)

Will this cause any problem?

I have a copy of the entire program on the hard drive and a copy on CD. I also like to know if there will be any conflicts if I run it from both place.

So far, from my analysis, I did that and there seem to be no problem.

The only difference between the two place is the InprocServer32 location changed.

Thanks

Regsvr32.exe
if I give a program to a friend he get's the error 'class not registered'?
which class isn't registered?
and how to do that with regsvr32.exe?

VIP

Using Regsvr32
In my job I test software applications. To make it easier for me to reinstall new builds I wrote a batch file to unregister the dlls used by one of our apps. (it will not uninstall otherwise) The batch file is very simple: "regsvr32 -u c:....filename.dll" I would like to convert this to a visual basic 6 application. Clicking a command button to do what the batch file does, another command button to exit and a couple of labels. Should be really simple but I am stuck. I have tried the shell execute function to run regsvr32, I get no error messages but it doesn't work. For something this simple should I be able to use the open command? Nothing I have tried so far appears to work. eg: open "regsvr32.exe -u <path> for binary as #1
Close#1" That statement gives me a whole host of syntex and compile errors. Any suggestions?

thanks,
Myra

How To RegSvr32 -U Within VB??
I need my program to unregister a DLL whenever it is started up. And I do not want an error box to popup if the file does not exist or if it already unregistered. Is there a simple way to do this at the startup of my VB program?

Thanks for your help!

Regsvr32.exe
Is there anything more to registering a server than using that exe?

Regsvr32.exe /s myserver.dll

What&#039;s Regsvr32.exe?
I need to know what Regsvr32.exe does and how do I use it? I think it registers dlls but I want to make sure.

Thanks,

Run Regsvr32
Hello
I was told that to activate my olch2x7.ocx I need to run regsvr32. Well, how do I do that? When I click on it it tells me to open it from a list or web choice.

thanks for any help!
Duane

Regsvr32
Hi all,
i wrote a simple and small com dll and i'm trying to register it with
the regsvr32.exe.

when i run it from windows 2000 ,it works fine , but when i'm trying to do that in win 95 or win 98 i get this message :

"Load Liberary (path/dll) failed getLastError returns 0x00000485"

what should i do to register com dll in win 95 or win 98 ?

ActiveX Regsvr32
Hi,
I've got 2 pc
On the first I can add activeX from the internet only with a regsvr32 xxx.ocx
and with the second one
he doesn't accept that I only add the activeX in the form
There's no message of error on the regsvr
I try with other activex and it's the same
I'm really lost
I've watch on the internet option for the security and it's the same on the 2 pc
can some one help me ?
What must be Install on the second pc ?

thank you

ActiveX DLL And Regsvr32
I've created an ActiveX DLL and have tested it on my own machine with no problems. I've given the DLL to a remote user to test, and he gets the error:
"ActiveX component can't create object". Does he need to use regsvr32 before he can test my DLL? And if I give him a new version of the API...will he have to unregister the old version? Thanks!

Quick Regsvr32 TIP
If you locate the .DLL you want to register and then drag and drop it over the .EXE in the System32 folder, then voila! you have registered your COM dll!

Cool huh?

A Regsvr32 Trick Most Of You Probably Already Know
Due to my recent problems with my registry & regsvr32, I called Microsoft and learned a cute trick (most of you probably know already). If you open Regsvr32 (Start|Run), after you type in Regsvr32, you can open My Computer & navigate to the dll you want to register and drag & drop it next to Regsvr32. That way you don't have to type in the full path. Works with Windows 2000, don't know about other OS's.

How To Use RegSvr32 In Vista To Get VB Dll In
In trying to fix the mouse wheel scroll, VB6IDEMouseWheelAddin, you have to register the Dll. This was done with RegSvr32 in XP and down but does not exist in Vista. Does anyone know how to manually register a DLL to Vista?

Shell Regsvr32
How do you shell Regsvr32 with the command line of registering, and unregistering a file specified in a text box?

I have a text box, when you click browse you choose the file from the box, it then closes and enters the filename into the text box ok.

When i click register how would i register that component into the registry using Regsvr32?

RegSvr32 Problem
I need to register a Dll but keep getting this message from RegSvr32.
Any ideas?

Regsvr32 And Windows Me
Can you use regsvr32 to register dlls in windows Me? If so, what's the path to it, is it windowssystem32 ?

Don't have an me machine here, but a user is having a problem with a batch file i wrote to register some dlls on Me

Thanks!

REGSVR32 And ShellExecute
I am trying to use ShellExecute to register a dll library automatically as follows:

Public Function MRRegisterLibrary(path$)
' On Error GoTo err_trap
Call ShellExecute(0&, vbNullString, "regsvr32.exe " & path, vbNullString, "C:", 1)
Exit Function
err_trap:
MsgBox "Registration failed"
End Function

No errors occur, but it doesn't seem to actually do it. This is on a machine where typing

regsvr32.exe T:dsofile.dll

into the Start>Run textbox definitely does register the library.

Any thoughts please as to why this might not be working. (I know there are other ways to register libraries, but this just seemed a simple way to do it).

How Can I Unregister Something Using Regsvr32
How can I unregister something using regsvr32. I would like to unregister msdxm.ocx because it is not working properly.
Thanks
Eric

Regsvr32 Errors?
Im having trouble registering dll files, I have tried a few different dlls but they all result in similar errors.

I click run, then type,
Regsrv32.exe C:VB_Stuffmze.dll

then Regsrv will give me a message like

LoadLibrary("C:VB_Stuffmze.dll") Failed.
GetLastError returns 0x00000485

Does anybody know what this error means?

Any help is appreciated.

How 2 Run Regsvr32 Using Windows Api In Vb
can any 1 tell me thw way to run regsvr32 using vb6.0 and win32 api

How To Register OCX Or DLL Using Regsvr32
Hi,

What's the syntax to register an OCX?
And to register a DLL?
Is there any difference?

Thanks a lot...

Michel Jr.

Regsvr32 Problems
tried registering a .dll on my computer (Win 98) and it works fine.. so i copied the .dll over to two other computers (one Windows ME and the other Windows 98) and ran regsvr32 to install the same .dll. for some reason, though, the whole process fails. i don't know why. i type in the exact same command line:


Code:
regsvr32 c:progra~1ascentadodbadodbrel.dll


problem is, doesn't work on the others.

Regsvr32 Broken?
If I try to register a ocx with it I get:
Sorry the -R switch is unrecongnized,
I've tried re-installing VB5 from the CD a few too many times, any ideas?

Regsvr32 Without Using Start-&gt;Run
I recently distributed an application on Windows NT
that referenced scrrun.dll

When I installed the application I had to go
to the Start->Run and type
"regsvr32 scrrun.dll"

I have to distribute another application using
scrrun.dll
Is there any way I can prevent the user from
having to go to start->run and registering the server ?

Regsvr32 Msado15.dll
Hi all

im trying to register msado15.dll and msado15r.dll on Server 2000

using the run button then , regsvr32 c:.......msado12.dll

then i get a message

Load library (C:........msado15.dll) failed - the specified procedure could not be found.

I have a program that i need to run , and uses recordsets (2.8) , i think i need to register this to make it work, as it crashes at the time the recordset is invoked.

Thanks in advance


C

Regsvr32 Info
Hi everyone,

I have 2 small question.

Question 1
---------------
We register OCX files in the computer bu the following:

Start->Run-> regsvr32 <ocx FileName>

If everything ok then the file gets registered.

Now my question is if i want to Unregister the above file from the computer how will i do it.

Question 2
---------------
In vb6 when i have added a reference as Project1 from a program while learning Activex Comtrol.

Now i want to remove the reference from the Reference window of VB6. I have tried by deleting the ocx file but the reference in the reference explorer in VB6 remains and when i try to add the reference it generates an error as cannot add the reference because i have deleted the file.

Can anyone tell me how can i remove the reference.

regards
Amarjit

Regsvr32 - Standalone?
Hi!

Is it possible to load Regsvr32, and it's necessary support files (if any), by itself without VB loaded?
If so, where can I download (freeware?) Regsvr32?

Thanks for your help in this matter!

RegSvr32 Crystl32.ocx Is Not Working
Friends
I have developed a program in visual basic and the reports in crystal reports.
i converted into a package using package and deployement wizard.
but im not able to open the exe program after installing while installing itself the crystl32.ocx is giving error.
so i typed in the
start-->run-->regsvr32 crystl32.ocx.
but its giving the following error.

LoadLibrary("crystl32.ocx")failed.
GetLastError returns 0x00000485

how can i solve this problem.

thanks

How To Include Information To RegSvr32
Hi,
Which code have I to include in my VBP to achieve that RegSvr32 register my ocx?

RegSvr32 Not Registering Some Dll's Or OCX Files
Hi Guys,

Im hoping someone can help and In in the right section..

My app has its own installer and the app itself is in VB6

What I want to know is ther any reason my PC wont register certain DLL's & OCX files now?

EG: CDO.DLL just wont install now with my app, it says the modual cant be found?

I have tried just going to RUN and using RegSvr32 on the files but its the same??

EG: RegSvr32 C:CDO.DLL (And the file is there in the root of C: when I try)

There are 4 others doing similar and the rest are fine?

Although the app seems to run when it does install I just get the error message about the DLL's and OCX files after the reboot after installing.

I wondered if Microsofts updates to my PC may have done this as Ive changed nothing except formatted the PC in the last while?

Any help would be greatly appreciated.
Thanks
L

Does Regsvr32 Works On Win98 Too?
I would like to register dll on win 98 and XP too

Is this simple regsvr32 works on both OS

Thanks
Eran

Regirtering Dll Using Regsvr32 Command In Vb
How to execute regsvr32.exe command in vb ?

** RESOLVED ** Problem With Regsvr32.exe
I am trying to move my programming stuff to a new PC. I have been fairly successful so far. However, I have tried this:

VB Code:
C:windowssystem
egsvr32.exe c:windowssystem32graph32.ocx


It has worked for all the other OCXs I have come acroos. However, this gives me the message:


VB Code:
load library ("C:windowssystem32graph32.ocx") failed - the specified module could not be found


I have verified that it is where I said it is.

Automate Regsvr32 Process
Hi!

I'm trying to make a small app. to automate the installation of OCX files to PCs. Right now, the user has to download the file to a set location, and then they go to <Start> <Run> and enter "Regsvr32.exe PATH_TOOCXFILEFILENAME.OCX" (without quotes) to install/register the ocx files. If successful (or not) they get an error message indicating success/failure.

I have two questions, the first being the most important, but the second that would be VERY helpful.

1) How can I make my VB app. automatically run/install the OCX file (regsvr32), given a static path to the file? Meaning, I'm going to put the OCX files in a set location using the app. i'm creating... then I want the app. to essentially run the regsvr32 app silently to install the OCX.

2) I'd like to "trap" the popup boxes that would normally appear, and do two things with them:
a) trap the text for use in a debugging if/then statement
b) surpress the popups... ultimately, i'll use the if/then statements from a) to create my own custom popup indicating failure/success.

I'd really love any and all help with this!

Thanks so much!

Get Msgbox When Regsvr32 Some Activex Dll?
refering to: My Old Thread

I have one activex dll and i want himself show a msgbox when someone regsvr32 it, with a copyright message.
can this be donne?

thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved