locked
Cannot Elevate Priveleges for ClickOnce Application RRS feed

  • Question

  • The following VB.Net solutions is built using VS 2005 (w/ SP1) and consists of a Windows Service and an ASP.Net Web service.  Both components are typically installed on the same machine.  We have a separate setup project for each of these components, one to install the service and the other to install the web service.

    We have a third (ClickOnce) application that is a wizard driven windows form-based installation application which launches MSIEXEC to install/uninstall the components above in order to simplify the installation for the user and provide them with a single install.

    The ClickOnce application works fine on Windows XP, but croaks on Vista unless IE is started running as an Administrator.

    The documentation out there is very confusing about how to embed a manifest which declares the need for elevated privileges for an application that must run on Windows XP and Vista.

    In addition, it seems like when we build the ClickOnce application it ends up extracting the embedded manifest when it publishes itself to the web.

    Can someone please let us know how we can use ClickOnce to deploy this installation application?  We currently run the following "post build" event to embed the manifest below (which seems to work fine).

    Post Build Command:

    "$(DevEnvDir)..\Tools\Bin\mt.exe" -manifest "$(ProjectDir)manifest.xml" -outputresource:"$(TargetDir)$(TargetFileName);#1"

    Embedded Manifest:

    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
         <
    assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" >
             
    <ms_asmv3:trustInfo xmlns:ms_asmv3="urn:schemas-microsoft-com:asm.v3">
                   <
    ms_asmv3:security>
                        
    <ms_asmv3:requestedPrivileges>
                              <
    ms_asmv3:requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
                         </
    ms_asmv3:requestedPrivileges>
                    </ms_asmv3:security>
              </
    ms_asmv3:trustInfo>
         </
    assembly>

    Thanks in advance.

    Friday, March 23, 2007 12:51 AM

All replies