New
#11
ok - switching the login account to admin allowed the Option One dialogue to open and work. However, once created, executing the shortcut did not function whatsoever. It looks correct in the Task Scheduler. I would try Option Two, but I am assuming it is nothing more than a manual procedure of Option One, correct? Another thing, do I have to be in that admin account for it to work? Perhaps these UAC bypass tutorials are only for apps? If not ...
... fwiw, The problem code in this batch file seems to be a specific 'taskkill' command I added, as the code has other taskkill commands and executed just fine w/o UAC interference before the add.
The way I do it:
Create batch file.
Create a shortcut to the batch file.
Run the shortcut elevated.
Instead of:
Create Elevated Shortcut without UAC prompt in Windows 10
I use a portable app to create elevated shortcuts. You can use the method in the tutorial but you have to use the task name that you created.
Anyway for what it's worth here's screenshots of a shortcut to a batch file to run Cccleaner (custom batch file to import reg files every Ccleaner launch) and run it elevated so no UAC prompt.
The batch file and reg files that it imports:
The elevated shorcut to the batch file (note.lnk extension)
The portable app used to create the shortcut. It's no longer available but the same capability is built into WinAero Tweaker.
EDIT: Ive changed the icon for Ccleaner batch file shortcut from the default icon and replaced it with the icon from Ccleaner.
Post the contents of the batch file. Maybe someone might spot an issue with it.
Also if you happen to have WinAero Tweaker installed try using it's elevated shortcut tool.
The problem command (there are other identical taskkill commands with different exe's) in the batch file is :
taskkill /im Atom.SDK.WindowsService.exe /t /f
when executed in a admin cmd window it runs fine. when I added it to the batch file, at first the command echoed "ERROR access denied". So I then began to tweak the shortcut and batch file with full permissions and run as administrator etc. and finally got it to work. However, I get the UAC with it. I can live with this, but I prefer not to.
Try adding RUNAS before the first target line in your script.
Or try changing shortcut properties advanced tab and check run as administrator box. (Or uncheck it if already checked)
Or try;
RUNAS taskkill /im Atom.SDK.WindowsService.exe /t /f
Also what level is UAC set to? If set to max - try default.
Other than that I don't have any ideas.
As you're having such problems with the script, go for Option 2 in the tutorial. It's not actually that hard.