Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2007

Tip: Looking for answers? Try searching our database.

Vista 'Run as admin' changes behavior forever.  Why?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
osumatt - 12 Mar 2007 16:20 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.