ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   regsvr32 (https://www.excelbanter.com/excel-programming/273944-regsvr32.html)

Seth[_3_]

regsvr32
 
Does anyone know how to programmatically run regsvr32
from VB? I know it is an API call (or at least, I am
pretty sure!). Just a reference to a place that talks
about it would be great! Basically, I want to make sure
the user has a certain .ocx installed (registered), and,
if not, I want to register it.

Thanks!

Seth

Tom Ogilvy

regsvr32
 
Using the Shell command.

Regards,
Tom Ogilvy

"Seth" wrote in message
...
Does anyone know how to programmatically run regsvr32
from VB? I know it is an API call (or at least, I am
pretty sure!). Just a reference to a place that talks
about it would be great! Basically, I want to make sure
the user has a certain .ocx installed (registered), and,
if not, I want to register it.

Thanks!

Seth




Tom Ogilvy

regsvr32
 
the first argument is the whole string you would type in at the command
prompt

res = Shell("regsvr32.exe C:\Windows\MyCtrl.ocx")

I guess you would have to query the registry. I have never attempted it or
had a need to.

Regards,
Tom Ogilvy



"Seth" wrote in message
...
Thanks Tom! So you would type something like:

Shell("regsvr32.exe", "C:\Windows\MyCtrl.ocx")?

Is there a way to determine if the control has already
been registered with Windows?

Thanks so much!
Seth


-----Original Message-----
Using the Shell command.

Regards,
Tom Ogilvy

"Seth" wrote in message
...
Does anyone know how to programmatically run regsvr32
from VB? I know it is an API call (or at least, I am
pretty sure!). Just a reference to a place that talks
about it would be great! Basically, I want to make

sure
the user has a certain .ocx installed (registered),

and,
if not, I want to register it.

Thanks!

Seth



.




Tom Ogilvy

regsvr32
 
Reregistering shouldn't be a problem I wouldn't think.

Regards,
Tom Ogilvy

"Seth" wrote in message
...
Cool man! Thanks so much! Let me ask just one more
thing:

If everytime a workbook loads it executes the regsvr.exe
procedure, will that create a problem if the control
already exists? If not, then it seems like I could
just "play it safe."

This is an issue because there are some excellent control
available (for free) at sites like freevbstuff.com...if I
used them in a project, my user must have the control too.

You have been a big help!

Seth


-----Original Message-----
the first argument is the whole string you would type in

at the command
prompt

res = Shell("regsvr32.exe C:\Windows\MyCtrl.ocx")

I guess you would have to query the registry. I have

never attempted it or
had a need to.

Regards,
Tom Ogilvy



"Seth" wrote in message
...
Thanks Tom! So you would type something like:

Shell("regsvr32.exe", "C:\Windows\MyCtrl.ocx")?

Is there a way to determine if the control has already
been registered with Windows?

Thanks so much!
Seth


-----Original Message-----
Using the Shell command.

Regards,
Tom Ogilvy

"Seth" wrote in message
...
Does anyone know how to programmatically run

regsvr32
from VB? I know it is an API call (or at least, I

am
pretty sure!). Just a reference to a place that

talks
about it would be great! Basically, I want to make
sure
the user has a certain .ocx installed (registered),
and,
if not, I want to register it.

Thanks!

Seth


.



.




Harald Staff[_4_]

regsvr32
 
Hi Seth

If it doesn't exist then it probably isn't in the C:\Windows directory. If it does then it
probably doesn't need to be registered.

No big deal maybe, but any decent setup program installs/registers something ONLY if it's
not there or if what's there is an older version. If already there or if newer verson is
there then do absolutely nothing.

--
HTH. Best wishes Harald
Excel MVP

Followup to newsgroup only please.

"Seth" wrote in message
...
Cool man! Thanks so much! Let me ask just one more
thing:

If everytime a workbook loads it executes the regsvr.exe
procedure, will that create a problem if the control
already exists? If not, then it seems like I could
just "play it safe."

This is an issue because there are some excellent control
available (for free) at sites like freevbstuff.com...if I
used them in a project, my user must have the control too.

You have been a big help!

Seth


-----Original Message-----
the first argument is the whole string you would type in

at the command
prompt

res = Shell("regsvr32.exe C:\Windows\MyCtrl.ocx")

I guess you would have to query the registry. I have

never attempted it or
had a need to.

Regards,
Tom Ogilvy



"Seth" wrote in message
...
Thanks Tom! So you would type something like:

Shell("regsvr32.exe", "C:\Windows\MyCtrl.ocx")?

Is there a way to determine if the control has already
been registered with Windows?

Thanks so much!
Seth


-----Original Message-----
Using the Shell command.

Regards,
Tom Ogilvy

"Seth" wrote in message
...
Does anyone know how to programmatically run

regsvr32
from VB? I know it is an API call (or at least, I

am
pretty sure!). Just a reference to a place that

talks
about it would be great! Basically, I want to make
sure
the user has a certain .ocx installed (registered),
and,
if not, I want to register it.

Thanks!

Seth


.



.





All times are GMT +1. The time now is 04:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com