New
#11
Just a thought.
Do you have a option for Systems to have full permission.
Human users (i.e. you and me) don't get "full administrator power", even though Windows says we are in the Administrators Group.
The built-in Administrator (i.e. Username: "Administrator") has more power.
On my PC, I'm an administrator and I have received the "You don't have permission to do this. Contact the Administrator" message, when I have been attempting to perform operations.
Though the last time was so long ago that I can't remember what I was trying to do.![]()
Thanks to everyone, But on further investigation of Macrium Reflect, I found that I could put an option in the vmx file that deleted old backups automatically. So this thread becomes not solved but not needed.
Sorry to resurrect this old thread, but I am dealing with the exact same problem. I have followed each item in the previous posts, but no luck.
I do have one more piece of information, though. When I remove the the argument to run the batch file in Task Scheduler the CMD window will open as Administrator. When I add the argument back it will not open as Administrator.
Can anyone provide insight into this problem?
Much Thanks.
Try with this test batch file. It only prints 2 things, if it's running as administrator or not, and the parameters.
When I try to run it from Task Scheduler as admin(Run with highest privileges) and arguments: param1 param2Code:@ECHO OFF AT > NUL IF %ERRORLEVEL% EQU 0 ( ECHO Administrator=YES ) ELSE ( ECHO Administrator=NO ) set PARAMS= SET /A COUNT=0 :CHECKPARAMS SET /A COUNT+=1 IF [%1]==[] GOTO CONT IF [%COUNT%]==[1] ( set PARAMS=%1 ) ELSE ( set PARAMS=%PARAMS% %1 ) SHIFT GOTO CHECKPARAMS :CONT echo Parameters: %PARAMS% echo. pause
Administrator=YES
Parameters: param1 param2
Press any key to continue . . .
Also test if the option "Run only when user is logged on" makes a difference.
I made a a batch file.
I called it test.bat when I saved it.
Then I create a shortcut of the real test.bat so I have a test.bat - Shortcut
I then Right-click on the test.bat - Shortcut and then I choose properties and then I select advanced in the properties section.
When you have done that there will be a new box you can mark as "Run as administrator".
Try that for starters.
Mikkel, thanks for the reply. I tried that, but the batch file is to be run unattended so I will not be around to accept the UAC message.
Tookeri,
I can't modify the batch file. Also it looks like it requires user interaction, which needs to be avoided.
Thanks
@bender123, I meant you could add a new scheduled task with this test file to see if that works. It works for me so if it works for you too then it's probably an issue with your other batch file or the properties of its scheduled task. This will verify if it's possible from a scheduled task to start a batch file with parameters as administrator.
It doesn't require interaction. The "pause" is there only so you can verify the output, but you could just close the window. It's just a one-time test, nothing you should keep.
The troubleshooting for your issue has to start somewhere and this was my idea for starting point.
Thanks, Tookeri!
I misunderstood the purpose of your script. I do see a difference in the output when I select/deselect "Run with highest privileges".
I just realized when my Scheduled Task is run it uses taskeng.exe and not cmd.exe. Maybe there is a difference in the way these applications display the privileges?