Create a Folder during install but don't delete it upon uini

Got a problem you cannot solve? Try here.
Post Reply
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Create a Folder during install but don't delete it upon uini

Post by Sheri_Steeves »

Hello,

I have the following requirement:

I need to create a folder during install, to which I add a share name and assign permissions. When I uninstall (or updgrade) my product I do not want to remove this folder; my user's my have made some changes to the security and permissions on this folder that they want to keep.

Right now if the install process creates the folder (using the CreateFolder command before ApplyInstall), it is also removed during uninstall.

I tried using CreateDirectory but no folders are created; I suspect because I am calling it after ApplyInstall.

How can I keep InstallAware from removing that folder?


Thanks,

Sheri
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Create a Folder during install but don't delete it upon

Post by FrancescoT »

Dear Sheri,

please have a look at the following link that describes how to execute a Windows Installer command immediately (not deferred to "apply install" execution). In this way the command will be not part of the MSI database and consequently, no action will be executed at un-install time.

http://www.installaware.com/forum/viewt ... =2&t=10212

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

Re: Create a Folder during install but don't delete it upon

Post by Adam »

You could also Run Program CMD.exe /C MKDIR mynewdir
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Create a Folder during install but don't delete it upon

Post by Sheri_Steeves »

Francesco, Adam

Thanks for the information; looks like one if those will be what I need.

Sheri
Post Reply