PDA

View Full Version : Using SUF8 as a stub file for another app?


JXBURNS
08-08-2008, 09:37 AM
Seeing this thread (https://www.indigorose.com/forums/showthread.php?t=24523) reminds me I have, as part of a project I am developing in VB.NET, to ensure the user has the most up to date programs installed on their local drive.

The application does not require to be installed and just a case of copying a few files from a central network location to a specific folder on the local drive if they do not already exist (and correct version etc.). It uses standard .NET 2.x framework tools. The downside is the network connection can be slow at times so only want to download if the version is out of date, not just a copy regardless, so the end user is not kept waiting.

Was wondering if anyone has used SUFx as a stub file to check everytime the user starts the application whether the files locally match those on the central site? Once compared, and updated if necessary via HTTP/FTP, to then start the application using Shell.Execute and terminate the SUFx application. I was going to write my own updater in VB.NET but then thought, what the ****, I potentially have a tool here that will do it for me.

I realise there are other tools such as Visual Patch and True Update but I want the user not to have to do anything except click an icon. And in any case those packages are an overkill for what I want.

Has anyone tried this and if so, any problems encountered particularly making sure SUFx terminates once the new app has started?

Thanks - John

coldmist
08-21-2008, 05:51 AM
I have suf7, but this works to fire off another program and then die, before doing a real install:

if <some stuff> and Table.Count(_CommandLineArgs) > 0 then
Shell.Execute(Folder.."\\file.ext", "open", "", "", SW_SHOWNORMAL);
Application.Exit(0);
end

I have that on my 'On Startup' actions.

I don't know on the file verification question though.

JXBURNS
08-21-2008, 05:57 AM
Things have gone on since. I started using SUF8 but then had a brainwave and wrote some VB.NET stuff to do the same thing. Basically my system checks a location for update files, compares versions, if newer then downloads them with a .NEW extension, renames the old one with a .OLD (including the running program if relevant), renames the .NEW to the original name before finally deleting the .OLD versions. Works really well.

I could have easily done something similar with SUF8 but the development tools I use everyday won out in this instance primarily because I only wanted the one EXE involved.

Thanks - John