PC Review


Reply
Thread Tools Rate Thread

App blocked by UAC

 
 
=?Utf-8?B?TmFqYXNo?=
Guest
Posts: n/a
 
      4th Jul 2007
hi, we developed an application and want it to run on Vista, but crashes
whenever UAC is on.

The error comes only When our App. trys to upgrate from trial to full Version.

When the App. is launched, UAC guesses that there is no need for "full
administrator access token" and that is correct according to the new Vista
architecture, but when our App. presents a form to registy the full version,
the user
doesn't have the administrator token, because the App was already launched
as a Standar User App. (even if it is an Administrator)

We think that providing a manifest file with the "requireAdministrator" is
not the solution because we want standard users to be able to access our App.

Instead we want to present a Message saying "You need to run this App. as an
Administrator" when this error occurs. In order to do this, we want to know
if there is a way to know the User Access token, or if there's a recommended
way to do this.

Thanks, Najash
 
Reply With Quote
 
 
 
 
Andrew McLaren
Guest
Posts: n/a
 
      4th Jul 2007
Hi Najash

To find out if the user is a standard user, you could call:

OpenProcessToken(GetCurrentProcess(), … )

then ...

GetTokenInformation( … TokenElevationType… );

then, if TokenElevationType is TokenElevationTypeDefault or
TokenElevationTypeLimited, you have a standard user.

There are probably other ways to do it, as well

Once you know the user is a standard user, you could either:
1) display a message to restart the app as Administrator; or
2) create a separate process which has requireAdministrator in its manifest,
to perform the upgrade (and possibly close the existing, standard user
process).

The other "workaround" would be to use MSI to make the changes, with the
user running as a Standard User.

Have you seen the ISV Vista cookbook, from Microsoft?:
http://sharepoint.microsoft.com/inno...20Cookbook.doc
Pages 6 and 7 describe this last option a bit more.

Other folks may have better ideas. Hope this helps a bit,

Andrew

 
Reply With Quote
 
=?Utf-8?B?TmFqYXNo?=
Guest
Posts: n/a
 
      4th Jul 2007
Excellent!, Thanks again Andrew.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Site to open the blocked sites and blocked and encoded alagmy2030 Microsoft C# .NET 0 11th Feb 2011 11:54 PM
Site to open the blocked sites and blocked and encoded porxy Microsoft C# .NET 1 6th Jan 2011 02:23 PM
Upgrade to Vista blocked by Maxtor 7L250S0 - XP SP2 Regedit blocked ojc Windows XP Help 1 10th Feb 2007 06:39 PM
Domain names in blocked senders list are not blocked. =?Utf-8?B?RGF2ZSBAIFdMRVg=?= Microsoft Outlook Discussion 2 27th Oct 2005 02:02 PM
OL2003 - Junk emails not being blocked even though they are on blocked domain li Microsoft Outlook Discussion 0 1st Feb 2004 06:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:59 PM.