![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
|
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Problem with Virtualization/LUA Hi, I've an executable which displays/edits some user specific settings and do some changes in %programfiles% folder as well. XP: It works fine 'coz you can change the user specific settings (stored in the HKCU registry). And if it tries to access %programfiles% it fails(Shows an error message) if the current user is non-admin and work fine if it is an admin. All well Vista: Application works fine with user settings but when try to modify the %programfiles% folder it creates a new file in the virtual store and never throws an exception. Everything works fine except the fact that we've hard links to this file in the %programfiles% folder which are used by other applications. Now even though my application works correctly other apps trying to use the hardlinks can't see the changes because contents of %programfiles% file has not changed. What is the solution to this problem? Some more question that can solve my problem 1) Is it possible for an application to specify if a particular operation can be executed with elevated privilege only? Not the whole executable but just some methods. 2)How can I disable virtualization for my process? (can I use manifest file for this purpose?) 3)Can I determine at the runtime if I'm running with the elevated privileges? Will it return false ((WindowsPrincipal)Thread.CurrentPrincipal).IsInRole(WindowsBuiltInRole.Administrator)) if I'm running app without elevated privilege and true if running with elevated privileges. Regards Sandeep |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Problem with Virtualization/LUA > 1) Is it possible for an application to specify if a particular operation > can be executed with elevated privilege only? Not the whole executable but > just some methods. Yes and no. Yes - by separating out the elevated code its their own .exe or COM components. No - not within the same .exe/com component. An .exe/COM component is either elevated or its not, and it cant change mid flight. > > 2)How can I disable virtualization for my process? (can I use manifest file > for this purpose?) Manifested apps aren't virtualized. > 3)Can I determine at the runtime if I'm running with the elevated > privileges? > Will it return false > ((WindowsPrincipal)Thread.CurrentPrincipal).IsInRole(WindowsBuiltInRole.Administrator)) > if I'm running app without elevated privilege and true if running with > elevated privileges. Yes > > Regards > Sandeep > - JB |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Problem with Virtualization/LUA Thanks Jimmy. By manifest I meant the same thing. If I use manifest file for my app it wont be virtualized and it will throw an exception if I try to write to %programfiles%. Is that correct? "Jimmy Brush" <jb@mvps.org> wrote in message news:uPBUfSiyHHA.4276@TK2MSFTNGP05.phx.gbl... > >> 1) Is it possible for an application to specify if a particular operation >> can be executed with elevated privilege only? Not the whole executable >> but just some methods. > > Yes and no. > > Yes - by separating out the elevated code its their own .exe or COM > components. > > No - not within the same .exe/com component. An .exe/COM component is > either elevated or its not, and it cant change mid flight. > >> >> 2)How can I disable virtualization for my process? (can I use manifest >> file for this purpose?) > > Manifested apps aren't virtualized. > >> 3)Can I determine at the runtime if I'm running with the elevated >> privileges? >> Will it return false >> ((WindowsPrincipal)Thread.CurrentPrincipal).IsInRole(WindowsBuiltInRole.Administrator)) >> if I'm running app without elevated privilege and true if running with >> elevated privileges. > > Yes > >> >> Regards >> Sandeep > > - JB |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Problem with Virtualization/LUA Sandeep wrote: > Thanks Jimmy. > > By manifest I meant the same thing. If I use manifest file for my app it > wont be virtualized and it will throw an exception if I try to write to > %programfiles%. Is that correct? Correct, as long as it has the vista portion inside the manifest (requestedEexecutionLevel). <snip> >> Yes - by separating out the elevated code its their own .exe or COM >> components. Was supposed to be: Yes - by seperation out the elevated code into its own .exe or com component. Then launching the special component elevated. - JB |
My System Specs![]() |
|
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Virtualization ? | tranger05 | General Discussion | 1 | 03-27-2008 03:06 PM |
| What is Virtualization? | DeXtmL | Vista General | 7 | 10-10-2007 05:50 AM |
| Virtualization Feature | Bill | Vista security | 6 | 12-12-2006 06:10 PM |
| Program virtualization vs. installer virtualization | Roof Fiddler | Vista General | 1 | 09-21-2006 10:25 AM |
| UI Virtualization vs Grouping | Pascal Bourque | Avalon | 1 | 04-25-2006 04:22 PM |
| Complimentary Industry Resources Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today! |