I wanted to describe one thing i will be adding very soon to the dcuhelper.exe utility.

Right now, when your program launches it to check for updates, it finds the dcupdater tool installed on the user's computer and invokes it.

If the main dcupdater tool is not installed, then dcuhelper will tell the user about it, and open the dcupdater web page for them so they can install it if they want.

I'm going to change this slightly so that if the dcupdater tool is not found, it will display a message explaining this to the user and offer them 3 choices:1. Open the dcupdater web page to learn more about the updater and download it.2. Open the program's own web page (the program they asked to check for updates for) so they can manually look for an update.3. Cancel and do nothing.

In this way, even users who do not want to use the updater can be redirected to the program website to check for updates manually.

//---------------------------------------------------------------------------This tiny helper utility will let your program check for updates by invoking the isntalled DcUpdater tool on their computer, or explaining to them how to get it and directing them to the DcUpdater web page (and your program's web page) if it's not installed.

2. To invoke the updaterwith various commandline options: dcuhelper.exe -[r]i "program_labelname" "full_path_to_app_directory" "missingupdatertitle_or_._for_silent" [commandline options to be passed to updater] e.g. if they explicitly ask to check for updates, do so and report results no matter what: dcuhelper.exe -ri "ProcessTamer" "C:\Program Files\ProcessTamer" "Error" e.g. or if you want to check for updates at startup silently (dont report if no update found): dcuhelper.exe -ri "ProcessTamer" "C:\Program Files\ProcessTamer" "."

Note: program_labelname is just a unique arbitrary label that is used to create the redirect files (see below).//---------------------------------------------------------------------------

//---------------------------------------------------------------------------How does dcuhelper.exe register your program with the updater?It creates a file: %COMMONAPPDATA%\\DonationCoder\\DcUpdater\\RedirectFiles\program_labelname.dcupdateredirectWhich points to your program's directory.//---------------------------------------------------------------------------

//---------------------------------------------------------------------------You can also load the dcuhelper.exe from within your program as if it were a dll, and invoke it that way (and check for updater path/existence):

I've got some weird behavior with dcuhelper that we talked about in IRC. But I thought I'd post about it here in case you needed more information on what was happening.

I've been getting dcuhelper to work with my Universe project. Following along with the methods mentioned in this thread, I've placed dcuhelper in it's own directory inside the application directory, and I call dcuhelper.exe with a batch file in the Universe directory. Directory structure is like so:Universe\dcuhelper\dcuhelper.exeUniverse\universe.dcupdateUniverse\update.bat

Running this batch file on a PC that doesn't have DcUpdater installed brings up a dialog box that says something to the effect that "DcUpdater isn't installed but is required to check for updates. The Universe website and the DcUpdater website will now be opened in your browser."

The interesting thing about this is that if I supply the wrong path or no path to the .dcupdate file, it only opens the site to download the DcUpdater, with the following (working) URL: http://www.donationcoder.com/Software/Mouser/Updater. It doesn't open the Universe site because it obviously can't find the site if it doesn't have a .dcupdate file to read.

v1.03.01 - August 1, 2008 - added -t commandline option fixed bug in opening dcupdater page improved dialog on updater not installed if no commandline options are passed it will try to load .dcupdate file in current dir and check for updates

Here's an excerpt of AHK code from my post-compile script that I use to automatically generate the necessary trout.dcupdate and versioninfo.xml files for my Trout audio player. You will need Skan's FileGetVersionInfo() function. Obviously, change paths and other specific information to suit your app and environment.

<!-- version info of locally installed current version, and simple remote version file --><Version>%Version_String%</Version><VersionFileRemote>http://skwire.dcmembers.com/apps/trout/versioninfo.xml</VersionFileRemote>

<!-- where to get more info about the app remotely, only queried once an update is discovered --><InfoFileRemote></InfoFileRemote><WebPage>http://www.donationcoder.com/forum/index.php?topic=16157.0</WebPage>

<!-- ok how to conduct updates; could be: "Run" (download and run program), or "Visit" (visit website), or "Unzip" (download zip and unpack over files) --><UpdateMethod>run</UpdateMethod><CloseForUpdate>trout.exe</CloseForUpdate><UpdateFile>http://skwire.dcmembers.com/apps/trout/trout_setup.exe</UpdateFile>

I had a thought.. without adding much size to dcuhelper.exe i could add a minimialist built in update check into dcuhelper.exe.

In other words, right now what dcuhelper does is if the dcupdater big utility is not installed, it opens the program web page so user can check version themself.

But it wouldnt be hard or add much size to add a really quick and dirty version check into dcuhelper.exe itself, so that it could inform the user when there is a new version and then open the program website, or do nothing if a new version is not ready.

The advantage of this is that it would be more useful to people who don't want to install the larger dcupdater tool and make it viable to use dcuhelper.exe itself as a very lightweight update checker.

I'm not proud to say it only took me 11 months to add this feature, but i'm happy to say that i have implemented it, and will upload it in the next few days.

The new version of dcuhelper works as follows:

You bundle dcuhelper.exe (still about 100k) with your executable, and invoke it to check for updates.As before, if the user has the full dcupdater installed, that will be used to check for updates and manage their installation if any are found.

What's changed is the behavior if the user does NOT have the main dcupdater tool installed.

In the past, the dcuhelper.exe would open the program web page and dcupdater page, where they could manually check to see if an update had been released.

Now, dcuhelper.exe will actually check on it's own if an update is available (note this only works with installs that have a single .dcupdate file and won't recursively check plugin updates).

If dcuhelper detects a new version available (or an error), it will behave as before and open the program web page in the browser for user to download and install the new version manually.

If there is no update, dcuhelper will behave like dcupdater and silently exit without bothering the user.

I hope this new feature will offer people the best of both worlds -- very lightweight update checking for people who don't want a full fledged update downloader and prefer to do things manually, and a full featured update tool for people who prefer an automated solution, and for complicated cases like plugins, etc. The bottom line is that in the past users HAD to install the main dcupdater tool to get any useful benefit -- whereas now dcuhelper.exe on its own will be good enough for most users. This should make bundling dcuhelper with your application more clearly a good thing to do.

I'll post the new version in a few days and would appreciate any help testing.

I've read this thread with interest as I've been toying with the idea of including something along these lines in Circle Dock. However, I have some questions:

1. Circle Dock makes use of Mutexes. Assuming only one installation of the program, when CD starts, it checks for its Mutex and, if already allocated, it switches to the original instance and the second instance terminates. If there are multiple installations (in different folders), multiple instances can be run and each "knows" about the others' presence. Is DCU mutex-aware (as Inno Setup is) ?