• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1585
  • Last Modified:

Setting folder's permission at MSI installation

Trying to find an answer to my problem of setting folder's permission at installation time I bumped into this question/answer
http://www.experts-exchange.com/Programming/Installation/InstallShield/Q_24315443.html
I thought the following paragraph was the answer to my problem:
"What exactly did not work with the standard way? by the way, you mentioned the table lockpermissions; why going directly to the table if you can simply right-click your folder in the "destination computer's folders" panel, select Properties/Permissions... and specify the permissions in user-friendly dialog?"
But I don't seem to get the same options, particularly I don't get the option to set the permissions.  I use Visual Studio 2008.
I attach a picture of what I get with translations from spanish
What am I missing here?
PICTURE.JPG
0
KLBO
Asked:
KLBO
3 Solutions
 
MirfsterCommented:
It's been a while since I created a MSI with Visual Studio, but from my recollection, I think the MSI creation part of VS is kinda limited.  I do not think that there is a way to set File/Folder Permissions when creatiing the MSI.

However, you could include an EXE and have this run at the end of the installation to set the permissions.  I have used both "SetAcl.exe" and "FileAcl.exe" in the past.  I would recommend using "SetAcl.exe", which is available here: http://setacl.sourceforge.net/

Also, you could call "CACLS" to set permissions, which is part of the Windows OS already.
0
 
Vadim RappCommented:
Q_24315443 was asked in the Installshield area, so when I answered it, it was about Installshield, that's where it's all seen.

The phylosophy of Visual Studio setup and deployment project is that you see only a very limited subset of all installation functionality in IDE; for everything else, you write custom actions that have API access to the internal structures of the installation package.

See however http://robmensching.com/blog/archive/2007/04/19/Managed-Code-CustomActions-no-support-on-the-way-and-heres.aspx that explains why this approach is incompatible with the very Windows Installer it's all about.
0
 
jmcmunnCommented:

I'm used to setting the permissions in Installshield by going to the component that I am dealing with, and setting the permissions in the property grid that shows up in the right panel when you have a component selected.  But it appears that this is the same type of thing you have in your picture.

I don't use Visual Studio for the installation design because it is so limited, and this appears to be the case here.

Also, somewhat related but worth noting.  I believe that until the most recent version (IS 2010) setting permissions on a folder using the installshield IDE during installation design will blow away all of the existing security on that directory.  Just be aware of that going forward, make sure to be cautious setting security unless you are doing it on a folder you are creating or else using a custom action of some sort.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now