Re: Forcing a VB6 application to run with administrative privileges
- From: "Galen Somerville" <galen@xxxxxxxxxxxxxxxx>
- Date: Mon, 24 Dec 2007 12:24:36 -0800
"Sarah M. Weinberger" <mweinberger@xxxxxxxxxxx> wrote in message
news:uVBjMolRIHA.2208@xxxxxxxxxxxxxxxxxxxxxxx
Hi,I use manifest files with VB6. But first let me state that I do not install
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
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
.
- Follow-Ups:
- Re: Forcing a VB6 application to run with administrative privileges
- From: Steve Easton
- Re: Forcing a VB6 application to run with administrative privileges
- References:
- Forcing a VB6 application to run with administrative privileges
- From: Sarah M. Weinberger
- Forcing a VB6 application to run with administrative privileges
- Prev by Date: Re: Add/remove zero index of array
- Next by Date: Re: Add/remove zero index of array
- Previous by thread: Re: Forcing a VB6 application to run with administrative privileges
- Next by thread: Re: Forcing a VB6 application to run with administrative privileges
- Index(es):
Relevant Pages
|