cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kflanagan
Level 3

How do I set folder permission

Apologies if this has been beat to death, we are moving our installs from express 12 to 2009 Pro and have come across an odd thing I need a fix for.

I need to be able to set folder permission for our software so it runs properly under vista.

We create a folder in [CommonAppDataFolder], for this post lets call it [CommonAppDataFolder]\MyProduct and I need to give everyone full control of this folder (read,write,delete), it is where we store the calibration data for our external hardware, and the data can not be stored in the user profiles. The calibration data is updated is updated reegularly by the general users.

Does anyone know of a way to set the folder permissions through 2009 Pro?

Thanks.
Kevin
Labels (1)
0 Kudos
(5) Replies
JesseBearden
Level 5

There are a few different places you'll want to look to get started.

Easy:
Under "Files and Folders" right click on your directory and select "Properties"
Click the "Permissions" button.


If this doesn't work for you, then you probably want to look in to making a custom action that calls "CACLS". You can search for more info on how to do that.
0 Kudos
grparsec
Level 7

JesseBearden wrote:
There are a few different places you'll want to look to get started.

Easy:
Under "Files and Folders" right click on your directory and select "Properties"
Click the "Permissions" button.


If this doesn't work for you, then you probably want to look in to making a custom action that calls "CACLS". You can search for more info on how to do that.


I ran to the same problem sometime ago. I used CACLS, it worked grat on english operating systems. However since we had to hard code the word "everyone" in the command line, we had problems running our software on non-english operating systems. I am now trying to use "SetACL.exe" instead.
0 Kudos
kflanagan
Level 3

grparsec wrote:
I ran to the same problem sometime ago. I used CACLS, it worked grat on english operating systems. However since we had to hard code the word "everyone" in the command line, we had problems running our software on non-english operating systems. I am now trying to use "SetACL.exe" instead.



Any luck with SetACL.exe? A good percentage of our hardware sales are overseas, so I really do need an international solution. We are having no luck with this on our end. The solutions work great under XP, but under Vista, not so much.

Thanks...
0 Kudos
JesseBearden
Level 5

The way we get around this issue is with a little C++. I didn't write the code, but it appears to use the function:

ConvertStringSidToSid

Along with the "Well known sids" listed here:

http://support.microsoft.com/kb/243330

We actually use this for "Net Share", not for file permissions, but I think it would probably work.
0 Kudos
grparsec
Level 7

kevin-rf wrote:
Any luck with SetACL.exe? A good percentage of our hardware sales are overseas, so I really do need an international solution. We are having no luck with this on our end. The solutions work great under XP, but under Vista, not so much.

Thanks...


SetACL worked for me on XP and Win2K3. Haven't tried it on Vista based machines.
0 Kudos