I'm using ShellExecute(NULL, L"open", szSomeDirectory, 0, 0, SW_SHOWDEFAULT)
to open a directory in explorer.
I'm trying to open a directory that I would normally be prompted with You currently do not have permission to access this folder.
and would give me option to get access and show a UAC prompt.
When I'm executing ShellExecute, Explorer gives me a error message saying Access Denied
.
My program is running with administrator privileges but that doesn't seem to matter.
How can I get access to open this folder?
.exe
and selectingRun As administrator
. Depending on your OS, even though you are logged on as administrator it does necessarily mean all processes you start run with elevated privileges. – hmjd"open"
verb is just telling explorer to navigate to the directory. Explorer is giving me the access denied message. – JoshShellExecute(NULL, L"runas", L"explorer", szSomeDirectory, 0, SW_SHOWDEFAULT)
– David Heffernan