Pim Joosten
Всего сообщений: 549
Дата регистрации: 11.11.2010
|
Создано:
31.10.2011 07:50:01
|
 |
I want to automate my AWM back-ups and am planning to use the command line option to do so. Up till now I have been copying the files in C:\Users\Pim\AppData\Roaming\Actual Tools\Actual Window Manager with an automated task, but I have found that this will copy some files that I do not need and it does not copy the registry settings. AWM’s own back-up procedure covers that all perfectly and therefore I want to change my back-up method.
I was successful in creating a shortcut that works, but I can not use the Task Scheduler to automate a shortcut. If I do that, Task scheduler wants to start the program that is included in the shortcut and not the shortcut itself. I have then tried to enter the correct additional parameters, but I apparently do not enter the paths and/or command for AWM correctly, so it does not work.
I have also tried to write a batch file, but I can apparently not write a good one that works. Could you please help me out? Even though I have written some batch files many years ago, it apparently has changed or I have forgotten how to do it correctly. I think a batch file is the best way to go if I combine it with the Task Scheduler.
The location of ActualWindowManagerCenter.exe is C:\Program Files (x86)\Actual Window Manager. I want to add the parameter: Backup "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip"
I have tried:
START /D "C:\Program Files (x86)\Actual Window Manager" ActualWindowManagerCenter.exe BACKUP "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip"
and
PUSHD "C:\Program Files (x86)\Actual Window Manager" START /WAIT ActualWindowManagerCenter.exe BACKUP "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip" POPD
and also
cd "C:\Program Files (x86)\Actual Window Manager" START /WAIT ActualWindowManagerCenter.exe BACKUP "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip"
All batch files have failed. I think I must be doing wrong some basic thing in the batch file. Can you help me out? Any help is greatly appreciated.
I am using AWM 6.7 on a computer with Vista Ultimate 64-bit and on my laptop I use Vista Ultimate 32-bit.
Many thanks!
|
Vasiliy Ivachev
Администратор
-retired-
Всего сообщений: 2073
Дата регистрации: 09.11.2010
|
Создано:
01.11.2011 01:58:11
|
Hello Pim,
Thanks for the post.
Could you check whether these your batch files works correctly without Task Scheduler or not:
Цитата |
---|
1) PUSHD "C:\Program Files (x86)\Actual Window Manager" START /WAIT ActualWindowManagerCenter.exe BACKUP "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip" POPD 2) cd "C:\Program Files (x86)\Actual Window Manager" START /WAIT ActualWindowManagerCenter.exe BACKUP "F:\Pim\Documents\ICT beheer\Backups\Backups\Actual Window Manager\Vista PC\AWM Backup Vista PC.zip" |
?
If they works correctly, you should check in Task Scheduler what account you are running these files under.
Best regards.
|
Pim Joosten
Всего сообщений: 549
Дата регистрации: 11.11.2010
|
Создано:
02.11.2011 02:12:14
|
 |
Thank you Vasiliy. Your reply helped me solve it. I had already tried to directly execute the batch files you mentioned without using the Task Scheduler, but they failed. Because the contents of these 2 batch files should be good according to your post, I did some further research. I had originally typed in the batch file in WordPerfect and then saved it as Unicode text, where it should have been ASCII DOS text. I discovered that was why the batch file could not be executed properly. Also, I noticed that I should be careful about which “” I use in both a batch file or the Task Scheduler, because that makes much difference too. The standard “” is not the right one. One should have the straight "".
I have also been able to make a Task Scheduler task that works without a batch file. It turns out to be better than a batch file, because when I run a batch I will always see a command box quickly opening and closing. That does not happen when I run the back-up from the Task Scheduler.
Now for those of you who want to automate the AWM backup, here’s the procedure. I include a description of both a batch file and making a task in the Task Scheduler.
In a batch file include:
@echo off C: cd "C:\Program Files (x86)\Actual Window Manager" START /WAIT ActualWindowManagerCenter.exe BACKUP "X:\<path>\<filename>.zip"
The rule “C:” only needs to be included if the batch file is run from a different partition than C:. If you are running a 32-bit system the 3rd line should be cd "C:\Program Files\Actual Window Manager", hence without (x86) after Program Files. Path and filename indicate the path and filename you want to set for your back-up file.
If you want to set up a task in Task Scheduler, after opening a new task enter the following: - in the tab Actions choose Start a program - under settings browse to ActualWindowManagerCenter.exe in C:\Program Files (x86)\Actual Window Manager (64-bit Windows) or C:\Program Files\Actual Window Manager (32-bit Windows). - Add as arguments: BACKUP "X:\<path>\<filename>.zip" - enter all other settings (e.g. triggers, settings) as you want to have it.
That should do the trick. Best regards.
|
Vasiliy Ivachev
Администратор
-retired-
Всего сообщений: 2073
Дата регистрации: 09.11.2010
|
Создано:
02.11.2011 20:03:01
|
Hello Pim,
Thanks again for this post!
I think this will be very useful for other users.
Best regards.
|