Forum posts for consent.exe

“Send to” a folder over to a batch script not behaving as expected

I have a simple batch script take.cmd

echo %1


I've then created a shortcut to it in the C:UsersabcAppDataRoamingMicrosoftWindowsSendTo folder. Specifically the shortcut and not the batch script itself so that I can run it as admin (right click > properties > advanced > Run as administrator).

Now when I right click a folder and Send To it to the shortcut I've created it prompts the consent.exe asking for permission as expected but then instead of running the batch script it flases an error saying 'Filename/syntax is incorrect' (it flashes very quickly, I can hardly make it out).

Odd this is if I uncheck the 'Run as administrator' from the shortcut it runs as expected (ie echos the path) without the elevation prompt.

What might be causing the error when 'Run as administrator' is checked?

View complete forum thread with replies

Other posts related to consent.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

How to bring UAC's consent.exe to the foreground programmatically?
How I can get process path or pid from consent process (UAC)
“Send to” a folder over to a batch script not behaving as expected

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.