PDA

View Full Version : Shutting down my software



NewsArchive
12-05-2008, 03:20 AM
I have the webupdate working... almost. I am running wupdate from my
software. However, it doesn't tell me to shut down my software (Ok, I was
hoping there was some magic in there)... so it doesn't update because my exe
is open (no error either)... Also, when I try an update again, it thinks I
have the current version.

Anyway, what are you using to check to see if the software is open and how
do you implement it into the wupdate. I am curious also to find out what
wupdate is looking at to determine that the software is newer (on the local
computer).

Thanks.

--
Ray Rippey
VMT Software - http://www.vmtsoft.com
support@vmtsoft.com

NewsArchive
12-05-2008, 03:29 AM
Ray,

There is a function check if in use and another one to close app ....

--

Thank you - Merci

Cordialement - Best Regards
Jean-Pierre GUTSATZ

DMC - Data Management Center - A tool to let you Migrate Import Export
Transfer all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
12-05-2008, 03:29 AM
Yes, found it... I didn't think to look into the install update... then I
did.

Thanks,

Ray

NewsArchive
12-05-2008, 03:29 AM
Ray,

In my product I run WebUpdate in silent mode to determine if an update is
available.
If it is I give the user the option to install the new version.

If they choose to install the new version I display a message that says the
"Update" will start when they exit the software.

And the app termination I run webupdate as the app closes.....

Seems to work okay They get the message that the app must be closed to do
the update and I avoid conflicts.

I do NOT put Webupdate on the Start Menu or anywhere else I can't control
it....

The biggest problem I have w/ WebUpdate is network installs. If WebUpdate
is run from a workstation that DID NOT do the original install, then the
registry doesn't have the info and always says there is a new version.

I'm planning to find those entries and test for them when my app starts and
disable the WebUpdate check/option if it's not the original installation
workstation....

Paul

NewsArchive
12-05-2008, 03:30 AM
Paul,

HKLM
software
wow32node OR not depending on OS
lindersoft
webupdate
apppaths AND apps there look for your GUID and you get all details required
for the webupdate


--

Thank you - Merci

Cordialement - Best Regards
Jean-Pierre GUTSATZ

DMC - Data Management Center - A tool to let you Migrate Import Export
Transfer all your Data very easily
www.dmc-fr.com
Certified by Microsoft : "Works with Vista" & "Works with Windows Server
2008"

NewsArchive
12-05-2008, 03:31 AM
Hi Ray,

> I have the webupdate working... almost. I am running wupdate from my
> software. However, it doesn't tell me to shut down my software (Ok, I was

Run wupdate to check for an update. If it's there then I do this on the
frame:

Run('wupdate.exe')
Post(EVENT:CloseWindow)

Best regards,

--
ArnĂ³r Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
12-05-2008, 03:41 AM
Ray,

> I have the webupdate working... almost. I am running wupdate from my
> software. However, it doesn't tell me to shut down my software (Ok, I was
> hoping there was some magic in there)... so it doesn't update because my
> exe is open (no error either)... Also, when I try an update again, it
> thinks I have the current version.
>
> Anyway, what are you using to check to see if the software is open and how
> do you implement it into the wupdate. I am curious also to find out what
> wupdate is looking at to determine that the software is newer (on the
> local computer).

Well, you have several options and all the functions to handle this are
SetupBuilder built-in functions.

You can use "Detect Active Application" to find out if your software is
running. And/or you can use "Check In-use File..." or "Check In-use Folder
Tree..." to find out if specific files or files in a specific
folder/sub-folder are "locked".

Okay, let us assume you have the information that the application is active.
You can now display a message box using "Display Message Box..." and ask the
user to shut down the application. Do it in a LOOP to make sure the user
really closed it.

See this thread:
http://www.lindersoft.com/forums/showthread.php?p=10385&highlight=%22detect+active+application%22#post1038 5

And then there is the "Terminate Active Application..." function to
terminate selected 32-bit processes. You can use the "Gently Close
Application" option to gently close your application. Your application only
has to process the WM_CLOSE event and you are done.

Be careful when ending a process and the "Gently Close Application" option
is not use. In this case if you end an application, you will lose unsaved
data.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-06-2008, 03:23 AM
Thanks Jean-Pierre...

paul macfarlane

NewsArchive
12-06-2008, 03:24 AM
Friedrich,

Thank you. I decided not to go for the loop because sure as heck I'll get
stuck... besides, I want the end user to follow my simple directions... so I
did this...

! Detect previous installation folder
Set Variable %_SB_INSTALLDIR% to FUNCTION:Detect Previous
Version("[PRODUCTGUID]")
If %_SB_ERRORCODE% Equals "0" Then
Display Message Box "The Web Update application failed to detect a
prev..." -- "Previous Version Detection Failed"
Exit Installation
Else
Set Variable %INUSEFILE% to FUNCTION:Check In-use File
"%_SB_INSTALLDIR%\wvid.exe"
If %INUSEFILE% Equals "1" Then
Display Message Box "You must close Video Deluxe on all computers on
the network" -- "Please Close the Program"
End
Set Variable %INUSEFILE% to FUNCTION:Check In-use File
"%_SB_INSTALLDIR%\wvid.exe"
If %INUSEFILE% Equals "1" Then
Display Message Box "OK, you didn't close the program so I will have
to Exit" -- "You didn't close the program!"
Exit Installation
End
End

This gives them one shot to close the program.. and if they don't, I tell
them they didn't close the program and I simply end the update process
before it begins.

If I do a silent check... will it then only check every week (or whatever I
setup).. or do I need to take charge of the timing of the update check?
Right now I simply have it in a menu in my program.

And while I'm asking.. if I automatically check for an update and they don't
have an internet connection... .will it simply just ignore it?

I understand the program goes to my web folder and checks against the ini
file... but what file is it looking for on my local computer? When I am
testing I have to increase the version # in the compiled web update install
program... and I want to reset it back to normal (the previous version +1).
I'd also like to reset whatever file it is looking at on my local computer
back to the previous version.

It would be nice if there were a way to test the version update.. or a
simple way to revert.

Thanks... after I get this the way I want it.. I'm thinking of tackling the
subscription thing. I like the idea of getting my users hooked on getting
the free updates... and then when the major update comes along... the free
updates end.. they will miss them. However, what I would like to do on the
update is pass a message... like just before the update telling them what is
in the update... or that their updates have ended and something about the
next version... like a constant promotion.

Thanks again,

Ray Rippey
VMT Software

NewsArchive
12-08-2008, 02:55 AM
Ray,

> If I do a silent check... will it then only check every week (or whatever
> I setup).. or do I need to take charge of the timing of the update check?
> Right now I simply have it in a menu in my program.

See wupdate.sb6 source code. If you are using the /W inteval checking then
whatever you have defined in "Check Interval (days)" in the "Install Web
Update Client" properties is used.

> And while I'm asking.. if I automatically check for an update and they
> don't have an internet connection... .will it simply just ignore it?

It will display a connection error with an error code.

> I understand the program goes to my web folder and checks against the ini
> file... but what file is it looking for on my local computer? When I am
> testing I have to increase the version # in the compiled web update
> install program... and I want to reset it back to normal (the previous
> version +1). I'd also like to reset whatever file it is looking at on my
> local computer back to the previous version.

It reads the values from the Registry. If you are using the "Store
Properties in INI File" in the "Install Web Update Client" properties then
it uses the defined INI file.

> It would be nice if there were a way to test the version update.. or a
> simple way to revert.

You have several options to test your web update.

What we are doing at the moment is:
http://www.lindersoft.com/forums/showthread.php?p=21947

SetupBuilder 6.9 supports "smart rollback". You can execute the uninstall
with the /UR command line switch and the last modifications (e.g. the web
update) are reverted.

> Thanks... after I get this the way I want it.. I'm thinking of tackling
> the subscription thing. I like the idea of getting my users hooked on
> getting the free updates... and then when the major update comes along...
> the free updates end.. they will miss them. However, what I would like to
> do on the update is pass a message... like just before the update telling
> them what is in the update... or that their updates have ended and
> something about the next version... like a constant promotion.

You can display whatever you want and with SetupBuilder 7 you can even
create your own custom dialogs. You can download RTF documents from your
web site and display it, etc.

I really think the maintenance subscription model is a good idea. Our
own subscription renewal rate for SetupBuilder is 94%.

And this is also an interesting reading:
http://www.lindersoft.com/forums/showthread.php?t=1191
http://www.lindersoft.com/forums/showthread.php?t=2895

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner