How to change directory security attributes using InstallShield?

独自空忆成欢 提交于 2019-12-07 21:18:48

问题


I'd like to change the security attribute of a directory that InstallShield creates under the CSIDL_COMMON_APPDATA - can someone please advise on how to do that during the installation process?

It's a script-defined folder.

Thank you.


回答1:


you can also just easily call Windows commands "CACLS.EXE" or "ICACLS.EXE" -both are easy command line tool, e.g.

icacls file /grant Administrator:(D,WDAC) - Will grant the user Administrator Delete and Write DAC permissions to file




回答2:


Under InstallShield 2008 it's

Installation Designer > Components > [somecomponent] > Destination Permissions

Note that the directory properties are attached to the component, while individual File permissions are set under the 'Files' node

This assumes you are letting InstallShield / Windows Installer handle directory creation. If you're creating the directory in a script then things start getting tricky if you need to ensure a clean uninstall.




回答3:


I think I found the answer for this - on this page: http://www.installsite.org/pages/en/isp_os.htm there's an ntperm.zip archive which contains a script that seems to do what I need.




回答4:


I don't know whether a Installshield builtin function exists for that. The simple solution is to create a DLL that does the real work of manipulating the security attributes and call it once the directory is created.

Typically, one might want to change the access so that everyone is able to read/write to the whole directory or file(s) within it.



来源:https://stackoverflow.com/questions/137870/how-to-change-directory-security-attributes-using-installshield

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!