views:

15

answers:

1

Suppose I have a Win32 C++ application that displays a save file dialog. Also suppose that I browse to C:\Windows (or some other protected location) and type a file name. Then suppose I hit save. What happens is I get a message saying I don't have permission to save there and would I like to save to My Documents instead.

So here is the problem: my application knows this and can spawn a separate process to fire a UAC prompt and save to the folder. BUT the user cannot dismiss the save dialog until they choose an 'unprotected' (for lack of a better term) directory to save in.

How can I disable this warning/error?

+1  A: 

Try using the OFN_NOTESTFILECREATE flag.

Gerald