View Full Version : access control
Unregistered
02-17-2012, 02:55 AM
hello,
in my setup i create a new ini file.
i want to set the access control of this ini file
(a normaly user must change this file)
how can i do this?
linder
02-17-2012, 03:08 AM
Hello,
If you create the .INI in the correct location then limited (NT/XP) or standard (Vista+) users can modify the .INI without any problem. Never create these .INI files in protected locations (e.g. the Windows folder tree, the Program Files tree, etc.).
Do not (never ever!) manipulate the ACL of an INI to give write access in a protected location. You can do it (using the "Set Access Control..." script function) but it is against all rules and very bad practice.
Does this help?
Friedrich
Unregistered
02-17-2012, 03:14 AM
Hello,
If you create the .INI in the correct location then limited (NT/XP) or standard (Vista+) users can modify the .INI without any problem. Never create these .INI files in protected locations (e.g. the Windows folder tree, the Program Files tree, etc.).
Do not (never ever!) manipulate the ACL of an INI to give write access in a protected location. You can do it (using the "Set Access Control..." script function) but it is against all rules and very bad practice.
Does this help?
Friedrich
hello,
i create my ini file in the folder "c:\programdata\myfolder\mysubfolder"
i use the "set access control" with the following properties:
operation: grant file access
object: %_CSIDL_COMMON_APPDATA%\myfolder\mysubfolder\Updat e\update.ini
Domains/Users:
Domain ""
User: Users
Permissons:
Generic Write
Generic Read
BUT THIS DOSNT WORK :-(
please help
linder
02-17-2012, 04:24 AM
Hello,
As I understand it, you're not using the function correctly. I would suggest to check the "SetupBuilder and SIDs - Setting Permissions" topic in the Learning SetupBuilder Part I manual (see attached screenshot).
BTW, here are some Microsoft guidelines for use of CSIDL_COMMON_APPDATA:
http://msdn2.microsoft.com/en-us/library/ms995853.aspx
Your application's installer needs to set ACLs on your subdirectory of CSIDL_COMMON_APPDATA to allow users to access that directory as required by your application.
CSIDL_COMMON_APPDATA: This folder should be used for application data that is not user specific. For example, an application may store a spell check dictionary, a database of clip-art or a log file in the CSIDL_COMMON_APPDATA folder. This information will not roam and is available to anyone using the computer. By default, this location is read-only for normal (non-admin, non-power) Users. If an application requires normal Users to have write access to an application specific subdirectory of CSIDL_COMMON_APPDATA, then the application must explicitly modify the security on that sub-directory during application setup. The modified security must be documented in the Vendor Questionnaire.
Friedrich
Unregistered
02-17-2012, 04:42 AM
hello,
i need a global directory for all users
all users must read and write some data in this directory
is this directory collectly? (i think)
>you're not using the function correctly
can you give me a example?
linder
02-17-2012, 05:18 AM
Hello,
See my previous reply ;) CSIDL_COMMON_APPDATA should be used for application data that is not user specific. For example, an application may store a spell check dictionary, a database of clip-art or a log file in the CSIDL_COMMON_APPDATA folder.
And there is another CSIDL_COMMON_DOCUMENTS. This file system directory can be used to store documents that are common to all users.
A step-by-step example can be found in the free "Learning SetupBuilder Part I" help file.
By the way, here are some interesting threads:
http://www.lindersoft.com/forums/showthread.php?p=25491
http://www.lindersoft.com/forums/showthread.php?p=9103
Friedrich
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.