Forum Index  ViceVersa HOME         FAQ and Knowledge Base

 FAQForum FAQ   SearchSearch Forum  RegisterRegister 
 ProfileProfile   Log inLog in 

VVEngine read environment variables

 
Post new topic   Reply to topic     Forum Index -> Support
Author Message
infovarenne
Guest





PostPosted: Wed Jun 21, 2017 6:10 pm    Post subject: VVEngine read environment variables Reply with quote

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

PostPosted: Thu Jun 22, 2017 1:50 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 22, 2017 2:39 pm    Post subject: Reply with quote

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

PostPosted: Fri Jun 23, 2017 12:34 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Support All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group
Copyright © TGRMN Software. TGRMN Software products: