views:

128

answers:

3

I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during the client app install, both for the user friendliness, and to avoid config errors from mis-typed technical bits. Ideally I'd like the web server-side code to run as part of the ASP.NET app.

FogBugz seems to do something like this. There is a menu option within the web app to download a screenshot tool, and when you download and run the installer, it knows your particular FogBugz web address so it can send screenshots there. (Hey Joel, looking for a question to answer? hint hint)

A: 

If it helps RegexBuddy does this also.

Unkwntech
A: 

Does the information need to be secure? If not, ClickOnce can use URL-based parameters. Here's an article about that on MSDN.

Matt Hamilton
+2  A: 

The way the FogBugz screenshot setup tool does this is that it appends a 256 byte block at the end of the setup program at the moment it is downloaded. In other words, the download script spits out all the bytes from setup.exe and then an extra 256 with the url for the FogBugz server, plus any padding.

Windows ignores these extra bytes when the .exe is run (provided you turned off the CRC check for your setup installer - we're using InnoSetup).

After installation, we run the Screenshot program with a command line switch that tells it where the setup installer is. It looks at the end of the setup.exe and finds it's info, and then writes that to the registry so the user doesn't have to know it.

Michael Pryor