Author |
Message |
infovarenne Guest
|
Posted: Wed Jun 21, 2017 6:10 pm Post subject: VVEngine read environment variables |
|
|
Hello,
I'm trying to copy a folder to another one using an environment variable. By example: C:\Folder\1 to C:\Folder\<increment>.
I have a script that runs before comparison, a batch file. The batch file increment the environment variable <increment>, but VVEngine doesn't get the updated variable.
I tried with registry (reg add..) and with setx to change the environment variable, but it doesn't increment.
Has someone already done something like that, that can help me?
THank you,
Yan C. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8763
|
Posted: Thu Jun 22, 2017 1:50 am Post subject: |
|
|
Hi, the problem is that the script runs outside VVEngine just before ViceVersa is stating the profile. Do you get an error in VVEngine? thanks _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
infovarennes
Joined: 21 Jun 2017 Posts: 5
|
Posted: Thu Jun 22, 2017 2:39 pm Post subject: |
|
|
Hello,
No I don't have any error, but the folders and files are copied with the actual value of <increment> "2" not the new one "3" after the script updates it in the registry or with setx.
When I execute the VVEngine job, I need to manually restart the VVEngine service to get the new value of the environment variable. Of course, the job failed If I restart the service..
It's what I have in the profile.
"; ******* Script to run before comparison
Script Before Comparison Path=D:\ViceVersa_SrvInformatique\VV_Scripts\Creation_StructureSFIN-SRVDONNEES.bat".
Thank you.
Yan C. |
|
Back to top |
|
|
TGRMN Software Site Admin
Joined: 10 Jan 2005 Posts: 8763
|
Posted: Fri Jun 23, 2017 12:34 am Post subject: |
|
|
Hi, so I think then it's not a VVEngine issue. It looks like the problem is with ViceVersa, where folder variables are re-solved before the custom script is run.
Do you get the same counter issue if you run the profile manually in ViceVersa and outside the VVEngine?
A possibility could be to increment the variable in a script that runs AFTER execution which would setup the correct counter for the next profile run. _________________ --
TGRMN Software Support
http://www.tgrmn.com
http://www.compareandmerge.com |
|
Back to top |
|
|
|