Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista security

Vista - Self-registering DLLs in Vista?

Reply
 
Old 11-29-2006   #1 (permalink)
Adam Hilstad


 
 

Self-registering DLLs in Vista?

Hi, I'm wondering how to allow a DLL to self-register when running Regsvr32
in Vista. I'd like to have an elevation prompt appear when Regsvr32 is run
for my DLL, but there seems to be a catch-22 invovled here: If I put the
self-registering behavior into a COM object, this would require that the COM
object first be registered before it can be created with
CoCreateInstanceAsAdmin. But registration is what I'm trying to accomplish
in the first place. The only other option I can think of is to have the DLL
run an executable as admin in order to indirectly perform its
self-registration. According to Microsoft's documentation, it looks to me
like the only way to request elevation within an executable is to either
launch another executable, or create a COM object. Is there a simpler option
that I'm missing here?

Thanks!



My System SpecsSystem Spec
Old 11-30-2006   #2 (permalink)
Josh


 
 

Re: Self-registering DLLs in Vista?

Well the obvious answer is to register the DLL's as part of your setup/MSI.
This would need to be elevated to facilitate the install anyway.

Is there a reason that won't work?

--
Josh


You never know what you might learn - http://windowsconnected.com

"Adam Hilstad" <adam_hilstad@yahoo.com> wrote in message
news:urOjzfCFHHA.4464@TK2MSFTNGP03.phx.gbl...
> Hi, I'm wondering how to allow a DLL to self-register when running
> Regsvr32 in Vista. I'd like to have an elevation prompt appear when
> Regsvr32 is run for my DLL, but there seems to be a catch-22 invovled
> here: If I put the self-registering behavior into a COM object, this would
> require that the COM object first be registered before it can be created
> with CoCreateInstanceAsAdmin. But registration is what I'm trying to
> accomplish in the first place. The only other option I can think of is to
> have the DLL run an executable as admin in order to indirectly perform its
> self-registration. According to Microsoft's documentation, it looks to me
> like the only way to request elevation within an executable is to either
> launch another executable, or create a COM object. Is there a simpler
> option that I'm missing here?
>
> Thanks!
>


My System SpecsSystem Spec
Old 11-30-2006   #3 (permalink)
Josh


 
 

Re: Self-registering DLLs in Vista?

I tried replying once before, but it didn't seem to make it. so lets try
again. The obvious answer is to make this action part of your setup. Which
should prompt for elevation on install.

--
Josh
http://windowsconnected.com

Now with NNTP goodness!

"Adam Hilstad" <adam_hilstad@yahoo.com> wrote in message
news:urOjzfCFHHA.4464@TK2MSFTNGP03.phx.gbl...
> Hi, I'm wondering how to allow a DLL to self-register when running
> Regsvr32 in Vista. I'd like to have an elevation prompt appear when
> Regsvr32 is run for my DLL, but there seems to be a catch-22 invovled
> here: If I put the self-registering behavior into a COM object, this would
> require that the COM object first be registered before it can be created
> with CoCreateInstanceAsAdmin. But registration is what I'm trying to
> accomplish in the first place. The only other option I can think of is to
> have the DLL run an executable as admin in order to indirectly perform its
> self-registration. According to Microsoft's documentation, it looks to me
> like the only way to request elevation within an executable is to either
> launch another executable, or create a COM object. Is there a simpler
> option that I'm missing here?
>
> Thanks!
>



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Problem registering vista General Discussion
Registering a DLL with Vista Vista General
Registering Windows Vista Vista installation & setup
Registering Windows Vista online Vista General
Registering windows Vista RC1 Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46