I have a .NET 1.1 Windows Forms app that is called through the following chain:
- Start the program, which is a VB6 app
- VB6 app calls CreateObject on .NET dll
- VB6 calls .ShowDialog on the instantied object
- OnLoad is overridden in the Windows Forms app - it spawns a thread that
does work
- The thread encounters some kind of error and raises an event back to the
Windows Form to show an error.
-------- At this point the program appears to freeze because somewhere
between raising the event and actually showing the error message, something
goes wrong (because the program just sits there!)
So the next thing I tried was right clicking my vb6 executable and selecting
'Run as Administrator'. Now a message box actually shows when the error
occurs!
So, I shut down the program and then restart it (this time I just double
click the executable). It shows the error message again! I reboot, and
double click the executable - still shows the message!
So my question is: What is Vista really doing when I pick 'Run as
Administrator'? It must be doing something permanent to make the .NET stuff
work correctly from that point on, even if you're not running as admin. Any
ideas?
Jon Skeet [C# MVP] - 12 Mar 2007 19:17 GMT
<snip>
> So my question is: What is Vista really doing when I pick 'Run as
> Administrator'? It must be doing something permanent to make the .NET stuff
> work correctly from that point on, even if you're not running as admin. Any
> ideas?
My guess is that when it ran as an admin, it created something that it
wasn't able to create before, but gave that (whatever it is) loose
enough permissions to be used from a non-admin account.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
VJ - 12 Mar 2007 19:43 GMT
I am guessing if you right click again, it might a option to run as
normal-user.. Oh or maybe MS did not go that far...
Please ask in a Vista group you might get a answer...on how to revert or
where to look for.
VJ
>I have a .NET 1.1 Windows Forms app that is called through the following
>chain:
[quoted text clipped - 27 lines]
> Any
> ideas?
Bryan Phillips - 13 Mar 2007 01:06 GMT
"Run as administrator" makes the process run with the highest available
privileges assigned to your account. If you no longer have to run as
administrator, check the compatability tab of the program and see if the
"Run as administrator" box is checked. Also, have you turned off the
UAC?
--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog: http://bphillips76.spaces.live.com
> I have a .NET 1.1 Windows Forms app that is called through the following chain:
>
[quoted text clipped - 22 lines]
> work correctly from that point on, even if you're not running as admin. Any
> ideas?