locked
Register dlls in Vista RRS feed

  • Question

  • I am using a much modified version of the VB6 P&D wizard, calling DLLSelfRegister in VB6stkit.dll.  Under Vista this fails to register the dlls unless the user turns off UAC before running the installer.  How can I code it to get the OS to prompt for a temporary lifting of UAC or elevation of status?

     

    Monday, January 22, 2007 8:24 PM

Answers

  • No, but it is implied and I have seen elsewhere that that is the case.

    However I have now found this really useful link that gives a good explanation about UAC, elevation, automatic detection and manifests.

    http://www.helpware.net/VistaCompat.htm

    I hope other confused Vista virgins will find it helpful.

    Thursday, January 25, 2007 7:52 PM

All replies

  • If you are actually an administrator (or it works when you run it as administrator) then it looks like you need your program to have a manifest to cause prompting for elevated rights.
    Tuesday, January 23, 2007 9:35 PM
  • It doesn't work when I am logged in as an Adminstrator; only if I suspend the UAC.

    Where can I find information about creating the necessary manifest to prompt for elevated rights?  What is a manifest anyway??

    Wednesday, January 24, 2007 9:16 AM
  • Search for requestedexecutionlevel, requireAdministrator and manifest. A manifest goes into the resources of your code file and indicates to Vista that you need admin privileges. If you are an administrator but running as a standard user, this will cause an elevation prompt so that process will then actually have admin privilege.

    An easier way is to get the word "setup" into the file or description area of your resources - Vista asks for elevation because it assumes you're a setup/installation program.   

    Wednesday, January 24, 2007 4:03 PM
  • Thanks, I'll do the searches you suggested.

    An easier way is to get the word "setup" into the file or description area of your resources - Vista asks for elevation because it assumes you're a setup/installation program.   
    The installation program is called setup.exe.  Should that be sufficient to prompt Vista to ask for elevation, because it doesn't seem to in my case?  My program is in VB6.  Where exactly should I add the word 'setup' ?

    Thanks again for your help - sorry if I seem a bit dim, but all this is very new to me.

    Wednesday, January 24, 2007 5:06 PM
  • This explains the Vista behavior for "setup" programs - it's not just the name of the program.

    https://blogs.msdn.com/heaths/archive/2006/06/23/644545.aspx

    Wednesday, January 24, 2007 9:44 PM
  • This explains the Vista behavior for "setup" programs - it's not just the name of the program.

    https://blogs.msdn.com/heaths/archive/2006/06/23/644545.aspx

    Thanks, but that suggests that my installer, called 'setup.exe', should request elevated privileges because it has 'setup' in the name, but it does not do so.

    Thursday, January 25, 2007 9:59 AM
  • I beg to differ. I can't see anywhere in that article saying that having setup in the name causes an elevation prompt. It explicitly names the word "installer" in the file description as one example and "patch" as part of the filename as another. The article also says that a manifest doesn't need to be embedded, it can be external, <filename>.exe.config, so that's another way to cause the elevation prompt.
    Thursday, January 25, 2007 2:59 PM
  • No, but it is implied and I have seen elsewhere that that is the case.

    However I have now found this really useful link that gives a good explanation about UAC, elevation, automatic detection and manifests.

    http://www.helpware.net/VistaCompat.htm

    I hope other confused Vista virgins will find it helpful.

    Thursday, January 25, 2007 7:52 PM