Events

Questions about Cobian Reflector
Post Reply
VascoVicenza
Posts: 21
Joined: 24 Oct 2021, 10:48

Events

Post by VascoVicenza »

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
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Events

Post by cobian »

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
gvd
Posts: 127
Joined: 05 Oct 2021, 16:05
Location: Belgium

Re: Events

Post by gvd »

It's tricky but you can try this :
  • 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"
This should do the trick and, afaik, it is the only way to run an executable without having to click on the elevation prompt.

Have fun.
Gabriel
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Events

Post by cobian »

You could also disable UAC at all (which perhaps is not a good idea) but... ;)
--
Luis Cobian
Cobian Backup's creator
JtDodd
Posts: 2
Joined: 06 Dec 2021, 17:39

Re: Events

Post by JtDodd »

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;)
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Events

Post by cobian »

:OK
--
Luis Cobian
Cobian Backup's creator
packal28
Posts: 1
Joined: 18 Feb 2022, 08:54

Re: Events

Post by packal28 »

JtDodd wrote: 27 Feb 2022, 17:44 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;)
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?
User avatar
cobian
Site Admin
Posts: 4611
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Events

Post by cobian »

Perhaps you have disabled UAC? In that case the Administrator option should be disabled I think.
--
Luis Cobian
Cobian Backup's creator
Post Reply