Vista and UAC Problems with Addin

Add-in Express™ Support Service
That's what is more important than anything else

Vista and UAC Problems with Addin
 
Andrew Painter




Posts: 42
Joined: 2008-06-26
I've built an Addin for Excel, in VB.NET. Installation is just fine - the Addin installs to the Program Files folder. There's a point when Excel is run for the first time after installation when the System.IO namespace is used to check for (and create if they aren't present) a couple of files that are being extracted from compiled Resources.

Works just fine under XP.

Under Vista, UAC is denying access to the Addin folder because it's in the Program Files tree. I've tried embedding a manifest in my Addin, which seems not to be working because it's a DotNET DLL and not an application. I've tried modifying the adxloader.dll.manifest to request administrator priveleges, but this seems only to affect the installer process.

What I need is the ability to elevate UAC priveleges either for the whole Addin or in the AddinStartupComplete event. Is this possible?

Thanks,

Andrew
Posted 31 Oct, 2008 20:35:53 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Andrew,

Please note that the Program Files folder is not (ordinarily) writable in Vista. You can try to run your host application with administrative privileges.

.NET, Extended MAPI, Windows Phone & RT
Posted 01 Nov, 2008 04:52:06 Top
Andrew Painter




Posts: 42
Joined: 2008-06-26
Host Application is MS Excel 2007. Right click on any Excel 2007 shortcut in Vista. Run As Administrator is not an option.
Posted 01 Nov, 2008 15:10:55 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Andrew,

You can change the manifest file of Excel (see the excel.exe.manifest file). Please read more about the level attribute values here.
.NET, Extended MAPI, Windows Phone & RT
Posted 01 Nov, 2008 15:53:17 Top