Thanks very much, will try and give a feedback. Edit 01/04/2024: nothing work for me... tested .bat file => all good no error, logout and restarted but same as before, it's launched as a single user... tested .reg file and same result. UAC is completly OFF re edit at 13h14 pm: I've try to add this on batch file: Code: @echo off setlocal :checkPrivileges NET FILE 1>NUL 2>NUL if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) :getPrivileges if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) echo NO pause :gotPrivileges if '%1'=='ELEV' shift /1 setlocal & pushd . cd /d %~dp0 echo YES pause and seems good, it return YES everytime. Just i don't have Administrator when cmd is opened, weird... Thanks very much for help!
OP = original poster or original post It's good to know some basics on creating batch scripts or reg files Like with the script posted in the OP... You just need to copy/paste it to a text editor like, I use, Notepad++ then save as batch (*.bat, *.cmd) file or registry (*.reg) file
The reason I use PowerRun is after trying a lot of TI apps/scripts, I haven't run into any errors "yet". It's still the most reliable one
According to cmd.exe help, /R is a historical alias for /C - "Carries out the command specified by string and then terminates".
I think Code: PowerRun.exe /WD:\"%%%%~dp#\" is slightly wrong. The PowerRun help says even the /WD: should be within the double quotes.like "/WD:folderpath". Check a bat file generated by PowerRun.
There is no hard-and-fast rule in coding. There are different variations to scripting. What's important is it works and gets the job done
I updated the scripts in the OP to show the correct icon on both Windows 10 and 11. The icon numbering of imageres.dll in Windows 10 and 11 are different.
Just a little nitpick. To avoid having the same icon for run as administrator/run as powerrun I suggest using something else than user32dll,6 Not that I browsed all the icons available but something like shdocvw.dll,0 (exclamation mark on yellow shield) would do the job
change it from: Code: /WD:\"%%%%~dp#\" to: Code: \"/WD:%%%%~dp#\" Do the test, and bring to US the result.