简体   繁体   中英

Installshield - Force file to create on application path

How to force folders and files to create on install direction?

I've installed a program with Install shield that create some folders and files. Some of files are going to create after installation (like log.dat , etc). Actually their path is not install path and they will create on setup.exe's path. I've added Everyone permission to [CompanyName] but it's still not working.

Any suggestion?

Assuming I understand the question, I wouldn't open up the permissions in C:\\Program Files... because that leaves up the possibility of a non-privileged user corrupting your application. Instead I would use a directory such as [CommonAppDataFolder]\\My Company\\My Product (C:\\ProgramData\\My Company\\My Product typically) and open up the permissions there.

InstallShield has the ability to create and assign permissions to directories. It should be straight forward. See:

Configuring Permissions for Files and Folders

Edit: You say not INSTALLDIR but 'near' the directory that contains SETUP.EXE. InstallShield sets a property called SETUPEXEDIR that you can use. But I'm not sure this design can work. A user could run the installer from practically anywhere including a network share that the Windows Installer service couldn't possibly have permissions to. I'm afraid your question is unanswerable beyond how to set the permissions in general.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM