#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


.



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default 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


.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"