View Full Version : Setting permissions while installin

10-20-2003, 10:01 AM
I am in of help to identify the solution while installing.
While installation of a software some of the files in the destination directory should have have permissions set based on the type of the user who is installing.
for eg.
1.if the user who is installing is Admns user and has admin priveliges then some of the files on the destnation directory can have read, write and execute permissions. in otherwords all the permissions are given.
2. if the user who is installing is an ordinary user, some of the files in the destination directory should be set with Read only permissions.
Please let me know if I can do the above using installshield.

10-20-2003, 11:54 AM
The SetFileInfo (szPathFile, nType, nAttribute, szValue) and the Is (USER_ADMINISTRATOR, szIsData) functions should do what you want. The first one will set the file attributes and the second can be used to see if the user is an administrator.

But the problem I see is that you normally want the user to be a member of Administrators because InstallShield makes registry entries in every install. I am not sure what you are installing, but if you have any Dll's that need to be registered, the user will need to be an Administrator.

10-20-2003, 12:01 PM
Hi bob,
Thanks for oyur help.
I'll try to experiment it.
While installation some of the files which I need to change the permissions are of type text like xml files and some files are binary (dll)
But none of these files are need to be registered in the registry.
Hope I understood your last point about registering correctly.

10-20-2003, 12:22 PM
Hi Bob,
The IS(User_administratoe will return TRUE only for the NT Os, but for 95 or later it always returns TRUE,
Is there any other functions to detect in all Os like 2000/XP

10-21-2003, 06:36 AM
I believe you will find that the Is function will also work in 2000 and XP as it does in NT.