Re: Forcing a VB6 application to run with administrative privileges



You create a resource ( .res ) file from a properly prepared manifest using rc.exe in the wizards directory,
and then add the resource file to your project.

There's a zip file here with instructions and sample .bat files that explains how to do it here:
http://www.vbaccelerator.com/home/Vb/Code/Libraries/XP_Visual_Styles/Using_XP_Visual_Styles_in_VB/VB5_XP_Styles_Demonstration_-_Manifest_Resource.asp



--

Steve Easton




"Sarah M. Weinberger" <mweinberger@xxxxxxxxxxx> wrote in message news:uVBjMolRIHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Has anyone figured out how to have a VB6 application forced to run with administrative privileges yet?
Microsoft talks about adding a manifest, a small piece of code, but that is for .Net based applications
built with Visual Studio.Net and involves adding code to the web.config file and the resource table. VB6
applications do not have that, so it is not possible to add in a manifest to my knowledge to VB6 based
applications.

InstallShield does have the ability to force the setup.exe to run in administrative mode, but that does
nothing for the actual executable. I checked the shortcut on my Vista installation and saw that there is a
tab that has a "Privilege Level" option, but that is grayed out for whatever reason. Why? Even if there is a
way to have the shortcut force the application to run in admistrative mode that does not solve the problem
for the application, when a user double clicks on the actual executable or types in the executable name in
the run dialog off of the start menu. A "manifest" solution seems like the ideal method, but as I mentioned
above that does not work for VB6 applications, only Visual Studio.Net applications supporting manfests.

Thoughts?

Sarah M. Weinberger



.



Relevant Pages

  • Re: Forcing a VB6 application to run with administrative privileges
    ... the manifest "Must" be embedded in a resource file. ... Has anyone figured out how to have a VB6 application forced to run with administrative privileges yet? ... Microsoft talks about adding a manifest, a small piece of code, but that is for .Net based applications ... As part of my install there is an AutoInstall program that takes up to six arguments. ...
    (microsoft.public.vb.general.discussion)
  • Re: Forcing a VB6 application to run with administrative privileges
    ... VB6 applications do not have that, ... to add in a manifest to my knowledge to VB6 based applications. ... As part of my install there is an AutoInstall program that takes up to six ...
    (microsoft.public.vb.general.discussion)
  • Forcing a VB6 application to run with administrative privileges
    ... administrative privileges yet? ... VB6 applications do not have that, so it is not possible to ... add in a manifest to my knowledge to VB6 based applications. ...
    (microsoft.public.vb.general.discussion)
  • Re: XP-Style Theme
    ... applicationname.exe.manifest file and placed it within my VB6 project ... >> Is there any online help explaining Resource files? ... > into an executable file. ... > applications would be able to read the bitmaps from the executeable. ...
    (microsoft.public.vb.general.discussion)
  • Re: Visual Styles
    ... adding the manifest does the trick. ... applications you coded yourself, because it was always ... app as a resource. ...
    (microsoft.public.outlook.program_addins)

Quantcast