Welcome! Log In Create A New Profile

Advanced

Manual Data Modification with WDModfic.exe

Posted by Jeff Graham 
Jeff Graham
Manual Data Modification with WDModfic.exe
February 24, 2009 08:01PM
Hello,

We always execute WDModfic.exe on the start of our application for two reasons:

1) Our application has data stored in either classical or HF C/S and the data may not be accessible at the time of application update for some machines.
2) Previous data may be restored and would be out of sync with the current analysis.

However, to manually execute WDModfic.exe, you must have the .wdd file accessible. We do this by putting a copy in the EXE directory and including it with the setup process. As I have not found a way to pick up a file from the <HomeDir> of the project, we have to remember to copy any changes to the .wdd file to the EXE directory before making a setup installation.

Does anyone know how to automatically include the .wdd file? You can include it in the library but that does not make it accessible to WDModfic.exe, it has to be installed separately.

The code we use for classical HF follows:
sWDModfic is string
sWDModfic = """" + gsProgramsDir + "WDModfic.exe """ + "-nobackup -error /US ... 
    /WDD=""" + gsProgramsDir + "WDSummary.wdd""" + " /DIR=" + gsDataDir  
IF NOT ExeRun(sWDModfic,exeActive,exeWait) THEN
        Info("WDModfic Failed")
END

Does anyone have a better suggestion than running WDModfic.exe manually or another way to do data modification at start up?

Thanks,
Jimbo
Re: Manual Data Modification with WDModfic.exe
February 25, 2009 05:51AM
Quote
Jeff Graham
Hello,

We always execute WDModfic.exe on the start of our application for two reasons:

1) Our application has data stored in either classical or HF C/S and the data may not be accessible at the time of application update for some machines.
2) Previous data may be restored and would be out of sync with the current analysis.

However, to manually execute WDModfic.exe, you must have the .wdd file accessible. We do this by putting a copy in the EXE directory and including it with the setup process. As I have not found a way to pick up a file from the <HomeDir> of the project, we have to remember to copy any changes to the .wdd file to the EXE directory before making a setup installation.

Does anyone know how to automatically include the .wdd file? You can include it in the library but that does not make it accessible to WDModfic.exe, it has to be installed separately.

The code we use for classical HF follows:
sWDModfic is string
sWDModfic = """" + gsProgramsDir + "WDModfic.exe """ + "-nobackup -error /US ... 
    /WDD=""" + gsProgramsDir + "WDSummary.wdd""" + " /DIR=" + gsDataDir  
IF NOT ExeRun(sWDModfic,exeActive,exeWait) THEN
        Info("WDModfic Failed")
END

Does anyone have a better suggestion than running WDModfic.exe manually or another way to do data modification at start up?

Thanks,


Jeff Graham
Cascade Consulting

Hi Jeff,

in order to have the most recent .wdd file in the \exe directory, I suggest to add some lines to the project code:

IF OnTestMode() THEN
	// Copy the current analysis file to the exe-directory:
	fCopyFile(Left(CompleteDir(fExeDir()),Length(CompleteDir(fExeDir()))-4)+"YourProjectName.wdd",fExeDir())
ELSE
	IF fFileExist(CompleteDir(fExeDir())+"WD120Outil.xxx") AND NOT fFileExist(CompleteDir(fExeDir())+"WD120Outil.wdk") THEN
		fRename(CompleteDir(fExeDir())+"WD120Outil.xxx",CompleteDir(fExeDir())+"WD120Outil.wdk")
	END
END

The ELSE part is for smuggling the assistent for wdmodfic.exe , it's the wd120Outil.wdk, into the program's directory at (first) run time without getting a complaint from WDSETUP. WDSETUP will always ask for file replacement of .wdk files, irrespective of your clicking the check box '[X] Replace the file even if it is more recent' in order to get a smooth install without asking too many things. So, I'm renaming the .wdk file to an .xxx on install time and rename it back to .wdk whenever the program is run for the first time.

Kind regards,
Guenter




Edited 3 time(s). Last edit at 02/25/2009 05:56AM by Jimbo.
Paulo Oliveira
Re: Manual Data Modification with WDModfic.exe
February 25, 2009 12:16PM
when you generate the setup you can add external files, just add the wdd files in its orign dir and its done.
this is done in the setup generation in the step 2/2 (setup files), add the wdd and change the destination path to some relative path like <RepInst>\ or some other dir.
You only have to do this once, windev saves this information in one file (yourproj.WDF).
Jeff Graham
Re: Manual Data Modification with WDModfic.exe
February 25, 2009 05:55PM
Thanks Guenter, that is a good idea. I will use that approach.

Thanks Paulo, I have tried the steps you mentioned but I find that the setup changes the path to a full path which is then developer dependent and causes other problems when the project is copied or moved. (I just tried it again.)

I have not figured out how to make a file relative. I have tried <HomeDir> in WDSetup but that always gets translated to the full path which then gives an error if the project path changes.

Cheers,
Jeff
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: