cardiweb
Posts: 1
Joined: Wed Nov 18, 2009 6:22 pm

Application not well executed during installation process

Hello,

I upgraded Advanced Installer from 7.2.1 to 7.3.

My Java application uses the files system to store a configuration file, as well as log files. When launching, the application tries to read this configuration file, if it exists, or creates it with specific parameters asked to the user.

I made a msi file with Advanced Installer 7.3.

When I try to launch my Java application at the end of the installation process (with the specific checkbox selected), the configuration file doesn't exist, so the application creates it directly into its directory (in theory..). But in fact, the configuration file is not created so when I restart the application, I have to define once again my parameters ! But that's not the only strange thing ... I uninstalled the application .. Then I reinstall it, and launch the application from the installation process. Then, it's magic ! the application found parameters whereas the file didn't exist at all ! I guess the configuration file was stored somewhere else the previous time..

I tried on Windows XP, Windows Vista & Windows 7, it's the same.


I downgraded Advanced Installer to 7.2.1 and everything is fine. But some bugs fixed in 7.3 are really interesting so I'd like to know if my bug is a referenced one

and will be fix very soon.

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Application not well executed during installation process

Hello,

I am not sure why you are encountering this behavior.
On the Java Products page, select your product. In the Settings tab, under the Application group, is the "Set product folder as current" checkbox ticked? This option sets the current directory for your java product, and enabling this option should solve your problem.

If this still does not solve the issue, then please send your .aip project file to support at advancedinstaller dot com so we can further investigate the issue.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
proussin
Posts: 2
Joined: Thu Nov 19, 2009 5:54 pm

Re: Application not well executed during installation process

******edit and update. I downgraded to 7.2.1 and this problem does not occur.
******edit #2 I found a workaround.
****** I added code to read the CommandLine and then reform it into a directory path using _splitpath and _makepath.
****** I used SetCurrentDirectory so set the path to the excutable and that works for me.

This sounds like the problem that I have but I am creating a standard C++ application.
The problem occurs only if I run my program from the installer, checkbox on the last screen is checked.

This problem is new to the latest upgrade 7.3. Here is some test code.
GetCurrentDirectory(MAX_PATH-2, cmdl2); //test the working directory (see what it is.)

Typically I get, "C:\Program Files\Myapplication"
With the new 7.3 release I get "C:\windows\system32" which is absurd.
My problem is that I write the registry with paths to files in my application and all of the entries are thus wrong.

The problem occurs only if I run my program from the installer on the last screen (using the new installer).
If I uncheck that box and run my program from the shortcut or from the exe location the current directory is set correctly.
I don't know if the installer hooks the GetCurrentDir function and creates the error.

I have found no way around this.
I can set the Current directory from within my program and I still get back the wrong directory.
I am going to revert to the previous version of Advanced Installer.

Paul
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Application not well executed during installation process

Hi Paul,

Thank you for bringing this to our attention.
This appears to be a small issue in the 7.3 release. We have added a fix on our TODO list which will be available in the next version of Advanced Installer.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
proussin
Posts: 2
Joined: Thu Nov 19, 2009 5:54 pm

Re: Application not well executed during installation process

Thank you very much for the quick response.
It is a good feeling to have people listen and fix the problem.
I look forward to the fix.

Paul

Return to “Common Problems”