problem in updation

Got a problem you cannot solve? Try here.
rahul
Posts: 14
Joined: Tue Nov 05, 2013 3:47 am

problem in updation

Postby rahul » Fri Dec 13, 2013 5:05 am

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 7050 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 7050 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.
Attachments
OpKey Builder.rar
(3.76 MiB) Downloaded 435 times

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: problem in updation

Postby FrancescoT » Mon Dec 16, 2013 12:01 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

rahul
Posts: 14
Joined: Tue Nov 05, 2013 3:47 am

Re: problem in updation

Postby rahul » Tue Dec 24, 2013 7:26 am

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

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: problem in updation

Postby FrancescoT » Fri Dec 27, 2013 10:29 am

Dear Rahul,

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

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

rahul
Posts: 14
Joined: Tue Nov 05, 2013 3:47 am

Re: problem in updation

Postby rahul » Thu Jan 02, 2014 4:33 am

yes , i implemented. but i received 0 every time.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: problem in updation

Postby FrancescoT » Thu Jan 02, 2014 9:11 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

Re: problem in updation

Postby glenharvy » Sat Jun 02, 2018 6:12 pm

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.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 60 guests