Page 1 of 1

Variables and Values question?

Posted: Wed Jul 21, 2010 8:47 am
by arrigob
I am working on an install and I have it running prefect, there is just one part of the script that is not working. I have posted a copy of the script below.

I call up a value from an ini file, then apply if statements to it, and then either delete a file or copy and rename a file. When I run the script through debug it comes back with correct values for the variables but does not seem to execute correctly. I verify this by adding text to the $WINDIR$\aas2.ini file that I can check to see if the copy takes place and changing the wsversion to a version not greater than 7.01.50 to force it to copy. But when I change the version value in the wsversion, and run the installer it does not copy the file to its new location like I am wanting to.

Any ideas?
-------------------------------------------------------------------------------------------------------------
Get INI $CALLINGPATH$\wsversion.ini, [version] version Value into Variable WSVERSION
if Variable WSVERSION not Greater Than (Version) 7.01.50
Does File Exist $CALLINGPATH$\fpa.ini (get result into variable DOESFILEDIREXIST)
if Variable DOESFILEDIREXIST Equals True
Delete Files $CALLINGPATH$\fpa.ini (when installing)
end
end
Does File Exist $CALLINGPATH$\fpa.ini (get result into variable DOESFILEDIREXIST)
if Variable DOESFILEDIREXIST Equals FALSE
Copy Local Files $WINDIR$\aas2.ini to $CALLINGPATH$\fpa.ini
end
Set Variable DATAPATH to
Get INI $WINDIR$\aas2.ini, [Global] Datapath Value into Variable DATAPATH
Delete Files $CALLINGPATH$\wsversion.ini (when installing)
Copy Local Files $DATAPATH$\wsversion.ini to $CALLINGPATH$\wsversion.ini
Set Variable TARGETDIR to $CALLINGPATH$
-------------------------------------------------------------------------------------------------------

Re: Variables and Values question?

Posted: Wed Jul 21, 2010 9:04 am
by arrigob
Could region location be the cause?

Re: Variables and Values question?

Posted: Thu Jul 22, 2010 8:43 am
by alibaba
AFAIK you have not to use leading zero in the version. Try using 7.1.50 and try to log your script by using the Plugin WriteLog (Camelot Plugin).
If it is an localization problem it should at least work for english.

Re: Variables and Values question?

Posted: Thu Jul 22, 2010 10:19 am
by arrigob
Thanks for directing me to the plug-in, I am going to take a look at it now.

Re: Variables and Values question?

Posted: Mon Jul 26, 2010 7:42 am
by arrigob
All my variables are showing up correctly, but the installation seems to skip executing the commands in the script I provided in my first post. It starts skipping the code when it the version number with the variable wsversion. Any help would be awesome, thanks.

Re: Variables and Values question?

Posted: Wed Jul 28, 2010 9:47 pm
by mills
Are you calling Apply Install?

Code appearing in the pinkish color are Windows Installer commands and won't be run until Apply Install is called...

Re: Variables and Values question?

Posted: Thu Jul 29, 2010 8:03 am
by arrigob
Apply Install or Apply changes. I could not find apply install.

Re: Variables and Values question?

Posted: Thu Jul 29, 2010 6:28 pm
by mills
Apply Changes will appear as Apply Install if you select "Install Product" as the "action to perform" from the Apply Changes command.

The pinkish lines of code won't be applied until Apply Install is called.