We have a Ruby-on-rails server-side deployment that needs to allow users to download a pre-compiled self-extracting Windows EXE file on their computer.
We also need to generate a text file dynamically (based on the users id) and deploy it somewhere on the client machine where the EXE can find it.
We have 2 options:
- Generate this text file on the linux server and SOMEHOW? embed it in the Windows EXE. This seems far-fetched
- Get the user to download the static EXE and somehow get the dynamic text information stored on the clients machine (either through an invisible download, cookies, vbscript or javascripting on client side).
Note that we have, for now, ruled out having 2 separate download links (1 for the exe and 1 for the dynamic text info) because of problems associated with that user experience (i.e. ugly UX, downloads could be stored on different paths etc).
I am not much of a web developer but after spending a few minutes on Google, I think both solutions are ridden with problems and ugly.
Anybody’s got a smart idea?
A couple of ideas:
1) Zip the exe and text file on the server file to be unzipped into the same location (creating a self extracting zip (exe) would be better.
2) Provide a KEY/PIN CODE after the user downloads the exe. When the application is first run, detecting no text file, it asks for the PIN, the exe then calls a webservice and downloads the information to save to the text file. This can be a Guid for instance.