Hi, in a Task in the Events section I would like to launch the DEFRAG of the HDD where I have backed up with a Batch (.BAT) file, but the command requires it to be run as Administrator. Is there a way to request it when entering the command?
Greetings
Events
Re: Events
This would need the user to be able to click on the elevation prompt when is time for the backup. Not very practical.
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Events
It's tricky but you can try this :
Have fun.
- create a scheduled task that launches defrag and runs even when the user is not logged in. Enter user/password but do not enter schedules for this tasks. It will never run automatically.
- create an "execute and wait" event
- select C:\Windows\System32\schtasks.exe
- enter following parameters : /run /tn "Task_name_of_defrag_task"
Have fun.
Gabriel
Re: Events
You could also disable UAC at all (which perhaps is not a good idea) but...
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Events
I''ve had great luck by creating a shortcut to the Batch File e.g.(filenamehere.bat)
==> Right click on the created shortcut "Properties"
==>select "Shortcut" Tab
==>select "Advanced" button
=> enable "Run as administrator" checkbox.
Jim;)
==> Right click on the created shortcut "Properties"
==>select "Shortcut" Tab
==>select "Advanced" button
=> enable "Run as administrator" checkbox.
Jim;)
Re: Events
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator
Re: Events
I have tried your method but on my computer the option "Run as administrator" is grey and I can not change it. Is there any way to change it?
Re: Events
Perhaps you have disabled UAC? In that case the Administrator option should be disabled I think.
--
Luis Cobian
Cobian Backup's creator
Luis Cobian
Cobian Backup's creator