I've packed an exe (made with SWF Studio 3.5 b314) with InnoSetup (latest version). I've used the "WorkingDir" tip as mentionned by Tim.
Under XP (SP3) with admin privileges, it installs fine and runs as expected.
Under XP without admin privileges, it installs, my exe runs but onQuit event doesn't seem to work (you simply can't kill the app).
Under Vista, it installs, but again my app doesn't work (it seems that my language files are not extracted when I want it to be read).As I have never seen these problems with SWF Studio, recently, I guess there is something else wrong. This has been tested on 3 different computer for the same result. Does someone have an idea ?
I haven't seen the onQuit issue, but that should be easy enough to test here.
Where are you trying to extract your language files on Vista? If you don't have admin privileges then there are only a few places you can write to and the Program Files folder isn't one of them (if that's where you're trying to extract them to).
Can you create a couple of simple test apps that isolate these two problems? If you can show us some simple cases where this happens we can test them further here.
This is really hard to make simple tests because it is time consuming but I know this is necessary :whip:
Could you just have a look at the online installer (download link - link removed by request) ? Just install and run the exe. This will give me time to make the famous simple tests and it may lead you (and me) to the solution.
Language files are automatically extracted by the swf studio exe with default params, e.g. : C:\Documents and Settings\Clovis\Local Settings\Temp\a85eb6a99047414486bbcedf6a9ba96e. I could use a setTimeOut to wait a bit before loading xml and generate the interface?
I'll test your stuff and try to reproduce the onQuit problem. The autoextract process should be fine, I thought you might be manually extracting files and storing them somewhere. I'll take a look at that in your app as well.
I think I've solved theonQuit mystery. Your onQuit handler is always called, but when you don't have admin rights the App.forceQuit call is not called. A closer look at the debug log tells me that your call to FileSys.writeToFileUTF16 is failing because you're trying to save your XML file C:\ Program Files\XTAC\Data\configuration.xml (instead of to the application data folder). So I'm guessing that you're checking the return code from the FileSys.writeToFileUTF16 and not calling App.forceQuit if the save fails.
As usual, you're the best! I tried monitor.exe at home but there is so many data in the log that I don't know where to read. Obviously you know that :)
[Stupid question erased]
I hope you'll solve the Vista mystery as fast as this one.
How your 'updater.exe' will work with restricted rights in Program Files? Can it replace the old exe by the new one ?
The updater won't work with restricted rights on Vista unless we give it a manifest and launch it with elevated privileges. On XP I don't think there's any way to make it work as a restricted user.
If you must have autoupdate features then your user will have to grant the main app admin rights (updater will inherit those if it has the right manifest) or you'll have to store the main EXE and the updater somewhere else on the file system so it can do the update.
One option that will work on all systems is to create and install a service that can do things a normal application can't. You need admin privileges to install the service, but once it's in there you won't get another UAC prompt on Vista and it will just work on XP.
Are there pills to avoid nightmares of Vista?
As we don't have the knowledge to create an autoupdate service, just to see if this is feasable, could you tell me how much NC would charge for it (by PM or email)? Obviously, if there are pills to do that too, just tell me :)
I have changed every path in my app so it works under XP and Vista whether your have admin rights or not. Many thanks!
Concerning the quotation I asked (didn't receive yet), just remember that I don't receive your emails except those coming from 'support' (my company's mail server is provided by GMail Pro). So you can contact me by PM.