D
d-42
Hi,
How do I ask for escalation from within a program?
I'm developing a standalone program that can also act as a 'plugin' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.
The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.
So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception 'access denied'. I'd be happy if I could get the 'The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.
As it stands now, it works if they launch the software using the 'run
as administrator', but I'd prefer it to ask on that one function
instead, if its not a buttload of work.
thanks in advance for any suggestions or advice,
-Dave
How do I ask for escalation from within a program?
I'm developing a standalone program that can also act as a 'plugin' to
another application. The way the other app was designed, it scans a
plugin folder in its "program files" folder for settings documents
which contain all the settings it needs to know to call the plug-in
apps.
The problem, of course, is permissions. Under vista, even the
administrator accounts are prevented from writing to the folder
without escalation.
So I how do I request escalation so that my program can save the
settings file to its plugin folder? right now it just throws an
exception 'access denied'. I'd be happy if I could get the 'The
program is trying to access a protected folder..." type of message
that they could just accept. After all, it only normally needs to be
done once.
As it stands now, it works if they launch the software using the 'run
as administrator', but I'd prefer it to ask on that one function
instead, if its not a buttload of work.
thanks in advance for any suggestions or advice,
-Dave