Groups | Blog | Home
all groups > visual studio .net setup > february 2007 >

visual studio .net setup : How to flag installed EXE as "runas Administrator"


Gerry
2/26/2007 3:15:23 PM
The program I develope uses Application Updater blocks (code sample from
Microsoft) to download newer versions of itself as we make them available
from our website. This is a C# .NET application developed under VS 2005.

To work properly under Vista, the user must turn off UAC or flag the exe as
"runas Administrator", so that it can write to the Program Files tree, to
update itself. How can I mark my EXE as runas Adminstrator in Visual Studio
2005? I have tried creating a manifest, and I have a code signing ID.

BTW, is it good design to make "Program Files" a restricted folder, and yet
allow EXEs to run from any other folder? If I install my application to
"ProgramFiles" with no space, it works properly with no restrictions.
However, it seems to be valuable for all program to be in one common tree, to
Phil Wilson
2/28/2007 4:53:45 PM
Manifests do work, so maybe there's something you're not doing right. Using
mt.exe is a popular way to do it, try a search on mt.exe and manifest.
Code signing doesn't matter just for run as administrator in a manifest
unless you think you need uiaccess=true (and you probably don't).

--
Phil Wilson
[Microsoft MVP-Windows Installer]
[quoted text, click to view]

AddThis Social Bookmark Button