Re: Forcing a VB6 application to run with administrative privileges



Basically it says you need a manifest file. It sees the external manifest
just like it would see an imbedded manifest.

Galen

"Steve Easton" <admin@xxxxxxxxxxxxx> wrote in message
news:OeR6q7nRIHA.536@xxxxxxxxxxxxxxxxxxxxxxx
Read step 3 on this page:
http://www.devx.com/VistaSpecialReport/Article/33856/0/page/2

--

Steve Easton


"Galen Somerville" <galen@xxxxxxxxxxxxxxxx> wrote in message
news:%23ssPsjnRIHA.280@xxxxxxxxxxxxxxxxxxxxxxx
Not in VB6 from my experience. Maybe in Vfred?

The person who has to deploy the apps I write is using a new Dell laptop
with Vista Home and the installs go swimmingly.

Galen

"Steve Easton" <admin@xxxxxxxxxxxxx> wrote in message
news:uO2H6GnRIHA.3532@xxxxxxxxxxxxxxxxxxxxxxx
If you're programming for Vista, the manifest "Must" be embedded in a
resource file.


--

Steve Easton


"Galen Somerville" <galen@xxxxxxxxxxxxxxxx> wrote in message
news:ujnCJtmRIHA.4272@xxxxxxxxxxxxxxxxxxxxxxx

"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

I use manifest files with VB6. But first let me state that I do not
install into Program Files directory etc.

Please don't yell at me for creating a folder on the C drive that has
the Company name as the name of the folder. It's not my idea !!

Sub-folders are created with the name of the program being installed.
There could be up to five of these folders.

Also a common sub-folder named "Data" is created. All files that are
written to by the various programs are in this Data folder.

As part of my install there is an AutoInstall program that takes up to
six arguments. These arguments are the names of the actual install
programs. Generally I have to install USB drivers, common ocx's etc,
the programs, etc.

So it would look like this: "AutoInstall USBdrvr.exe VB6common.exe
CDS74.exe".
The cd also contains AutoInstall.exe.manifest, USBdrvr.exe.manifest,
VB6common.exe.manifest and CDS74.exe.manifest.

A typical manifest file looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="CDS74"
type="win32"/>
<description>elevate execution level</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>


For what it's worth, I don't use a fancy installer like InstallShield.
I use a simple INF file installer called INF-Tools.

Galen










.



Relevant Pages

  • Re: Forcing a VB6 application to run with administrative privileges
    ... Not in VB6 from my experience. ... VB6 applications do not have that, ... possible 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 ...
    (microsoft.public.vb.general.discussion)
  • Re: Forcing a VB6 application to run with administrative privileges
    ... 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
    ... 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
    ... You create a resource file from a properly prepared manifest using rc.exe in the wizards directory, ... 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 ...
    (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)

Quantcast