Code: Select all
Command: %comspec%
Parameters: ? /c runas /user:<USERNAME> "notepad %N"
Code: Select all
> runas /user:<USERNAME> "notepad \"my file.txt\""
Code: Select all
> runas /user:<USERNAME> "notepad "my file.txt""
One possible solution is getting %N without surrounding quotes. Is it possible somehow?
In particular, are there any alternative ways exist to execute "runas" command with specified arbitrary user like above?
P.S. I know that asterisk '*' in front of the command name forces to start a command with admin rights. Two asterisks '**' - to start as a different user seems not working for me (in TotalCommander 8.51a).