ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > DcUpdater

DcuHelper.exe v1.10 (7/12/11) - Update checking for your apps (dcupdater compat)

<< < (3/18) > >>

mouser:
ps.
If you use Inno Setup, here is a line you can add to your [Run] section which will use the dcuhelper.exe to automatically register your newly installed program with the updater so the updater itself will know how to check for updates to your program, even before the first use of your program:

Filename: {app}\dcuhelper.exe; WorkingDir: {app}; Description: Create Update Check Helper File..; Flags: nowait runhidden; Parameters: "-r PROGRAM_LABEL ""{app}"""

Basically this just invoked the dcuhelper to create the file described above, silently at end of install (user is not prompted).  Note that this doesnt invoke an update check and doesn't require the updater tool to be installed on the user's computer.  It just creates the dcupdateredirect file so that the dcupdater tool can find it if/when it's installed.

mouser:
Another fun tip for Inno Setup users:

What if you want to add a "Check for Updates" item to the start menu group of your program?

Just add this one line to your inno script, in the Icons section:

* Name: {group}Check for updates; Filename: {app}\dcuhelper.exe; WorkingDir: {app}; Parameters: "-ri PROGRAM_LABEL ""{app}"" ATTENTION -show"; IconFilename: {app}\YOUR_MAIN_PROGRAM.exe; Flags: runminimized
(you can leave off the IconFilename if you dont want to give the shortcut the icon of your main program).

When the user chooses the "Check for Updates" item from the start menu group, dcuhelper.exe will find and invoke the DcUpdater tool or show user how to install it if it isn't installed yet.

NOTE: this gives you a complete way to add update checking to your program without modifying the actual program at all.  you could even use this technique to add update checking to a package you make (which could contain multiple updatable components), consisting of programs you didn't compile yourself.

justice:
After the -r call, launching DcUpdater by itself should list your program in the complete list of all known stuff that can be updated.  If it doesn't, check to see if the file "C:\Documents and Settings\All Users\Application Data\DonationCoder\DcUpdater\RedirectFiles\PROGRAM_LABEL.dcupdateredirect" is being created, and if the contents of that file point to the directory of your program.
-mouser (August 17, 2007, 10:41 AM)
--- End quote ---
There is no C:\Documents and Settings\All Users\Application Data\DonationCoder on my XP system.
I've reinstalled 1.21.01 but after running dcupdate it still hasn't appeared.

mouser:
justice, rather than try to do tech support here let's talk in irc channel or via email and then we can post the solution here.

justice:
Right the issue is now solved with both a bugfix in dcuhelper and code changes in my code. PutAside is now the first third-party app to support DcUpdater  :Thmbsup:

For AutoHotkey coders feel free to use the following subroutine:

--- ---Gosub,EnableAutoUpdate

EnableAutoUpdate:
; Register with DcUpdater and check for updates.
; When no updates are found nothing is displayed.
; make sure the dcuhelper.exe is in a subdirectory called 'dcuhelper' of this script's location.
cmdParams = -ri    ;r = register app, i = check for updates
uniqueID = yourprogramidhere   ;anything allowed
dcuHelperDir = %A_ScriptDir%\dcuhelper
IfExist, %dcuHelperDir%\dcuhelper.exe
{
OutputDebug, %A_Now%: %dcuHelperDir%\dcuhelper.exe %cmdParams% "%uniqueID%" "%A_ScriptDir%" . -shownew -nothingexit
Run, %dcuHelperDir%\dcuhelper.exe %cmdParams% "%uniqueID%" "%A_ScriptDir%" . -shownew -nothingexit,,Hide
}
return

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version