Removing APPDIR - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Removing APPDIR

My latest project is to build an installer that runs all of the SQL scripts required to update 14 schema versions.

I have done this without a problem except that I want to remove what I have installed, which I do with VBScript CA using msiexec /q /x <Product Code>.

However, I cannot get rid of the APPDIR presumably because I am actually working in it.

I have tried a CA off the Finish button as a Published Event and I have also tried to launch a vbs script but in fact the launch comes before the attached CA's in th elog. I don't even know whether I can launch a vbs script in this way but it didn;t seem to complain.

Whatever I do the directory remains. I can delete it from thesame machine eithout a problem. It is marked as ead only but I am forcing delete anyway in the VBScript.

I wonder how the removal operation copes with this, however it is obviously in a different context to the installation.

Weird having an installed product uninstalling iteslf but maybe interesting nonetheless.

Any ideas that would help me with the above I will be very eager to listen to.

Regards,
John
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing APPDIR

Hi John,

If your installer needs resources only during the installation, the correct approach is to use temporary files instead.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: Removing APPDIR

Thanks. I sorted this issue by using the level above as my APPDIR, creating the directory to store files under [WindowsVolume]\Program Files]\ABC\XYZ, then deleting them on the way out using a CA, after removing the product with msiexec /q /x [ProductCode]. This meant that the APPDIR used for installation was 'read only' but those below it were not. I take the point about temporary files but this was not what I was trying to achieve.

Regards,
John

Return to “Common Problems”