Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

Run more than one program before/after profile ?.

For technical support visit https://support.2brightsparks.com/
Post Reply
alexsunny123
Newbie
Newbie
Posts: 2
Joined: Sat Jan 16, 2021 12:44 pm

Run more than one program before/after profile ?.

Post by alexsunny123 »

Hello,

I need to run two commands before my Syncback profile runs. The first one shuts down a database, and the second one executes a VBScript file. I didn't see any way to run two programs in the "Run Before" settings, so I created a BAT file similar to this:

DATABASE.exe /STOP (stops the database)
cscript C:\MyScript.vbs %PROFILENAME% (runs the script)

I later learned that Syncback variables (e.g. %PROFILENAME%) do not work in batch files, so my script fails.

Is there anyway to execute two programs, when one of them uses Syncback variables as arguments?

thanks
alexsunny
mmullins_98
Expert
Expert
Posts: 240
Joined: Wed Jun 05, 2019 11:40 am

Re: Run more than one program before/after profile ?.

Post by mmullins_98 »

I use Windows scheduler to run a bat file that closes my database and then use the scheduler to start my Syncback profile that uses "Program Before, Run before profile" to run one program.
alexsunny123
Newbie
Newbie
Posts: 2
Joined: Sat Jan 16, 2021 12:44 pm

Re: Run more than one program before/after profile ?.

Post by alexsunny123 »

alexsunny123 wrote:
Tue Jan 19, 2021 10:34 am
Hello,

I need to run two commands before my Syncback profile runs. The first one shuts down a database, and the second one executes a VBScript file. I didn't see any way to run two programs in the "Run Before" settings, so I created a BAT file similar to this:

DATABASE.exe /STOP (stops the database)
cscript C:\MyScript.vbs %PROFILENAME% (runs the script)

I later learned that Syncback variables (e.g. %PROFILENAME%) do not work in batch files, so my script fails.

Is there anyway to execute two programs, when one of them uses Syncback variables as arguments?

thanks
alexsunny

thanks my issue has been fixed.
Post Reply