I have a simple batch script take.cmd
echo %1
I've then created a shortcut to it in the C:\Users\abc\AppData\Roaming\Microsoft\Windows\SendTo
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?