S
Sandeep
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
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