App compiled in VS 2010 seems to have lesser privileges than when compiled in VS 2005
-
Wednesday, April 11, 2012 12:03 AM
We have had several different anomalies in our program. The only variable is that the program was compiled in VS 2010 instead of VS 2005.
Some new behaviors are:
1) Accessing a website will cause the 2010 program to exit.
2) Performing a search in a .chm under Windows XP will cause the 2010 program to exit.
3) The 2010 program can no longer access a drive. This seems to be a permissioning problem.
4) The 2010 program is not able to make a change to the Windows Registry. "Run as administrator" is required when it was not previously required.
None of these wide ranging problems are present when the program is compiled under VS 2005. Not every user has every problem. But when it is present, it is consistent.
Any suggestions would be greatly appreciated.
All Replies
-
Thursday, April 12, 2012 7:06 AMModerator
Hi OnFileOpen,
Visual Studio 2005 was released before UAC was introduced into Windows.
Visual Studio 2008 and Visual Studio 2010 are designed with UAC in mind, and to require as few privileges as needed (the goal of UAC to limit) unless they are needed. It then neatly asks you to prompt and restores your session. For example, if you had a solution loaded and want to debug an elevated process, it would prompt to elevate and reopen the solution in the elevated process.Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by lucy-liuModerator Tuesday, April 17, 2012 9:50 AM
-
Sunday, April 15, 2012 7:35 AM
Lucy Liu already covers the general part. In details, an application manifest file will be inserted into your app during compile time,
http://msdn.microsoft.com/en-us/library/ms235229.aspx
But I am not sure if this is the cause of the crash/exit you meet.
When that app crashes/exits, do you notice any exception? Does that only happen on Windows Vista/7/Server 2008/Server 2008 R2 with UAC enabled? The more you dive into the details, the more you learn about both the changes in Visual Studio and Windows.
Lex Li (http://lextm.com)
- Marked As Answer by lucy-liuModerator Tuesday, April 17, 2012 9:50 AM
-
Monday, August 06, 2012 7:06 PM
This problem was resolved a while ago but I figure I should close the loop.
The problem was at: Linker - System - Stack Reserve Size
Needs to manually set it to 1 M
The "Default" is 1 M but that doesn't work. Manually setting the size to 1 M works.
Apparently the VS 2005 "Default", does not carry over to VS 2010.
- Marked As Answer by OnFileOpen Monday, August 06, 2012 7:06 PM

