Problems running application as standard user!!
Hi, I am new to Vista and am hoping someone can assist me with the following problem. I currently have VB6 application that runs without any problems on XP SP2. I am currently testing the same application on Vista but am coming across some errors regarding UAC. Let me explain. When i log in as an administrator with UAC enabled, everything works fine. However when i am logged in as a standard user there are certain things that fail for me. Within the application users have the ability to export XML documents (i.e. save XML documents to a directory of their choice). If i try to save the document to the C:\ directory i get a "System.UnauthorizedAccessException: Access to the path is denied" error message. This led me to search the internet for a solution, and it was then that i found out about adding manifest files to applications to allow them to run as administrator. I then added the manifest file containing the following: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn: schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn: schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="False"/> </requestedPrivileges> </security> </trustInfo></assembly> However now when i try to run the application.exe i get an error saying "The requested operation requires elevation", and the app will not run. I know the way around this is tochange the compatibility propertiesto run the app as an administrator, but I don't want to have to get the user to Right-click and select "Run as administrator" everytime they want to run the app. Can anyone tell me if it is possible to run the app (just like it did for XP), without showing any UAC screens and allow the user to save documents to whatever directory they want? This is getting quite frustrating!! Thanks
September 17th, 2008 5:18pm

Hi Here are some links that should give you all the information you need. The last link is for the MSDN Windows Vista Developer Forums. This is where the Microsoft Developers answer questions. Go here first for a quick overview on this subject.Windows Vista Application Development Requirements for User Account Control (UAC): http://msdn2.microsoft.com/en-us/library/aa905330.aspx Download the following document. This includes a complete discussion of the subject including code examples.Windows Vista Application Development Requirements for User Account Control Compatibility: http://tinyurl.com/2pf8n3 There is also a very comprehensive help file that deals with the subject of developing applications for a least privilge environment that you can download here: http://tinyurl.com/2uh8ve MSDN Windows Vista Developer Forums: http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=24&SiteID=1 Hope this helps. If this post helps to resolve your issue, click the Mark as Answer or Helpful button at the top of this message.By marking a post as Answered, or Helpful you help others find the answer faster. Ronnie Vernon Microsoft MVP Windows Desktop Experience
Free Windows Admin Tool Kit Click here and download it now
September 19th, 2008 3:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics