|
|
#1 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Hello
I'm trying to implement some Scheduled Tasks. These are for backups, and link to .bat scripts. There are two kind of Batch scripts in-use;[list=1][*]One that backs-up data to the I:\ drive[*]One that backs up data to the N:\ drive[/list=1] I'll include both scripts within the one NSIS installer. All servers have an I:\ drive, however only about half of them have the N:\ drive. Here is an idiosyncratic-programming way of showing you what I'd like; code: code: Can you please give me an example script which;
Panarchy BTW: Backup-Scripts folder is located in T:\Backup-Scripts |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2007
Posts: 546
|
To check if the drive exist, you can use IfFileExists, or ${If} ${FileExists} with the LogicLib header.
For scheduled tasks: http://nsis.sourceforge.net/Scheduled_Tasks |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2008
Posts: 72
|
I have written some code, below which SHOULD do the first part (everything but install the new Scheduled Tasks).
http://pastebin.com/f9bcd502 I can't get the aforementioned code to compile correctly. ![]() Here is the output of the compiler; http://codepad.org/YuaKjt4o Please help me fix the script. Thanks in advance, Panarchy |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,841
|
Err... The compiler is already telling you what is wrong.
'Error: could not resolve label "PastIBackupsCheck" in function ".onInit"' You tell it to go to a label that doesn't exist. |
|
|
|
|
|
#5 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Problem solved!
Thanks, I found a better example online, and it is now this;
code: Which seems to work fine... however I'd like to remove the prompt, and make it continue automatically based on existence of the drive letter/directory. Also I'll need to add the Scheduled Tasks... which from the looks of things is very confusing. Hopefully I won't have to end up with "ExecWait"ing a Batch!!! Please tell me how I can fix up my function. Thanks in advance, Panarchy EDIT; Might of fixed it with: code: EDIT2: Ended up fixing the issue, now just need to work out how to add Scheduled Tasks... Last edited by Panarchy; 25th September 2009 at 02:32. |
|
|
|
|
|
#6 |
|
Member
Join Date: Nov 2008
Posts: 72
|
They ended up not wanting it, so I've got a half-finished script here. Works perfectly, however doesn't install any Scheduled Tasks.
Enjoy ![]() Panarchy code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|