Page 1 of 1

problem in updation

Posted: Fri Dec 13, 2013 5:05 am
by rahul
hello Support,
I am facing a problem in update process.

In update process after download process. Install window appear.

install Window.jpg
install Window.jpg (37.84 KiB) Viewed 9168 times


Then i click on install button . Installation start and Welcome dialog box appear. After that cancel the installation process .

setup run.jpg
setup run.jpg (76.35 KiB) Viewed 9168 times




Click on update button it show message no update are available.


I attach my project . Please see where is problem with the script and resolve my problem.

Re: problem in updation

Posted: Mon Dec 16, 2013 12:01 pm
by FrancescoT
Dear Raul,

to handle your case you could try with modifying the default update script behavior, in order to intercept if the running package completed its installation.
This could be done with evaluating the value that returns the update package ( ... the one executed by the update script).

To return a desired value with the setup process ( ... in your case the downloaded update package), in the main script code you can use the "Terminate with Exit Code" statement just after the Apply Install command.

For example;

Code: Select all

...
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS Equals COMPLETE
 Terminate with Exit Code 100
end

With the above example the setup process returns 100 if it completes correctly.

In the update script code instead, you need to verify if the value returned by the downloaded update, it is equal to 100 once its install process is terminated.

Example,
- By default with the update script, you have the following lines of code that are responsible of the update installation (Run Program) and to keep track of the installed updates with the "installedupdates.dat " file (Write into Text File).

Code: Select all

...
Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT)
if Variable UPDATE_LOG Equals TRUE
 Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
end
...

Consequently, you should modify the above lines as below;

Code: Select all

...
Set Variable MY_UPDATE_RESULT to
Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT, get result into variable MY_UPDATE_RESULT)
if Variable MY_UPDATE_RESULT Equals 100
 if Variable UPDATE_LOG Equals TRUE
   Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
 end
end
...


With the above example the "installedupdates" file, it will be updated if the value returned by the Run Program is 100 only ( ... update installation completed).

Alternatively and if you don't want to use the above method, you could even decide to install your updates silently.

Hope this helps you.

Regards

Re: problem in updation

Posted: Tue Dec 24, 2013 7:26 am
by rahul
hello installaware support,



Apply Install (get result into variable SUCCESS)
if Variable SUCCESS Equals COMPLETE
Terminate with Exit Code 100
end

BUT MY_UPDATE_RESULT RETURN 0 IN MY BELOW SCRIPT... :-(


Set Variable MY_UPDATE_RESULT to
Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT, get result into variable MY_UPDATE_RESULT)
if Variable MY_UPDATE_RESULT Equals 100
if Variable UPDATE_LOG Equals TRUE
Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
end
end

Re: problem in updation

Posted: Fri Dec 27, 2013 10:29 am
by FrancescoT
Dear Rahul,

... are you sure you have implemented "Terminate with Exit Code 100" with the package you are executing during update?

Regards

Re: problem in updation

Posted: Thu Jan 02, 2014 4:33 am
by rahul
yes , i implemented. but i received 0 every time.

Re: problem in updation

Posted: Thu Jan 02, 2014 9:11 am
by FrancescoT
Please check your code carefully.

If you receive always "0", it can only means that the "Terminate with Exit Code 100" statement ... it is never executed by the called package.

Regards

Re: problem in updation

Posted: Sat Jun 02, 2018 6:12 pm
by glenharvy
FrancescoT wrote:Please check your code carefully.
If you receive always "0", it can only means that the "Terminate with Exit Code 100" statement ... it is never executed by the called package.
Regards


Isn't the "exit code" the code that is returned by the called executable which, unless otherwise specified by that executable is always 0. :?

Glen.