Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 16 to 24 of 24
  1. #16
    Join Date
    Sep 2004
    Posts
    89
    Well it seems that the "revoke" command is illegal, so I removed that line and just ran with...

    Code:
    Folder.SetPermissions(foldername, "Authenticated Users", "Grant", "Full", true);
    The log reports...

    icacls.exe foldername /T /grant User:F /Q

    Regardles of whether I set for Modify or Full, it only sets "Special permissions" which are of no use to me. Dunno what the "/Q" at the end is.

  2. #17
    Join Date
    Sep 2004
    Posts
    89
    The script is sort of working... when the permissions are applied by the script to the database folder, the permissions set on the database are ok, but it's the permissions set on the folder that may be the problem... only as "Special permissions" instead of "Full".

    Where it causes a problem is that when the app calls the database it creates a .ldb file. Unless I have permissions on the folder for 'Full", not running as admin causes a database read error. I can set the permissions manually and everything works ok, but I cannot set the permissions on the folder by script or commandline.

    Perhaps the command is missing something.

  3. #18
    Join Date
    Dec 2010
    Posts
    10
    I'm having problems with this script/addon. I follow the instructions provided and the user/group is added to the list for that folder (if not previously there), however the actual permissions are not there. If the code applies to a user/group that already exists on that folder, then no change is made at all.

    Code:
    Folder.SetPermissions(AppFolder, "Users", "Grant", "Full", true);
    I'm using Setup Factory 8 on Windows 7 Ultimate.

    Am I doing something wrong? Thanks.
    Last edited by Epoch18; 12-14-2010 at 10:08 AM.

  4. #19
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    What is the actual command that is executed, as written into the log file?

    Ulrich

  5. #20
    Join Date
    Dec 2010
    Posts
    10
    Log files states:
    Code:
    C:\Windows\system32\icacls.exe  "C:\TestApp1" /T /grant "Users":F /Q
    But shouldn't it be...?:
    Code:
    C:\Windows\system32\icacls.exe "C:\TestApp1" /grant:r "Users":(OI)(CI)F
    If I type that second line into a command prompt manually, it works. Is this a difference in Windows 7 or something? I really don't know.

  6. #21
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    The ":r" will cause the current access rights to be replaced with the new setting, instead of adding the new right to the current ones. You can add the "(OI)(CI)" to the parameters by editing the script, if you wish to set the inheritance rights.

    Ulrich

  7. #22
    Join Date
    Dec 2010
    Posts
    10
    Well, the two lines are different enough to make me believe that I've done something wrong with the first one. Also because one works and the other doesn't. Any idea why the first line (which is from the GUI that you made) isn't working?

    Also, how would I manually apply a command myself? I tried this (below) but it did not work.
    Code:
    File.Run("ICACLS.exe", "/grant:r \"Users\":(OI)(CI)F", "C:\\Windows\\System32", SW_MINIMIZE, true);

  8. #23
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    You need to inform the full path to the program, not just it's name. You can see in the script how it should be done.

    Ulrich

  9. #24
    Join Date
    Dec 2010
    Posts
    10
    Got it. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts