|cmdkey.exe /list > "%TEMP%\List.txt"|
|findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt"|
|FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H|
|del "%TEMP%\List.txt" /s /f /q|
|del "%TEMP%\tokensonly.txt" /s /f /q|
|echo All done|
This works the finest. Thank you.
I guess same as any other script. Which is a different way of saying ‘sorry, I don’t know’…
On Wed, 23 Oct 2019 at 13:52, loosetile2 ***@***.***> wrote: This works the finest. Thank you. Just a quick one, if i run this from a command promt or called from another script, how do I make sure it's the logged in user that this runs for and not administrator. For example, using LogMeIn I may be logged into a users PC and when I run this, it gets run as an admin not as the user. Is there a way i can make sure the script runs as the....let's say currently active user rather than as administrator? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://gist.github.com/77f20a1bb50055e915f4?email_source=notifications&email_token=AAKIMYYOAATJDN5KVEDND2TQQBCIRA5CNFSM4HJ4UI6KYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF27QS#gistcomment-3063561>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAKIMYY54DOO5GKDQOIEAMDQQBCIRANCNFSM4HJ4UI6A> .