Recent

Author Topic: Change the permissions of a folder  (Read 4941 times)

meulinux

  • Guest
Change the permissions of a folder
« on: August 17, 2011, 01:40:25 am »
How to change the permissions of a folder in Windows 7 using code in Lazarus?

I need to give full permission to a folder.

Example: c:\lazarus

jamhitz

  • Jr. Member
  • **
  • Posts: 83
Re: Change the permissions of a folder
« Reply #1 on: August 17, 2011, 12:19:14 pm »
In Windows you can change file permissions from the command line using the CACLS command:

Code: [Select]
ECHO Y| CACLS /g <username>:<permission>
Have a look here http://ss64.com/nt/cacls.html

Use a TProcess (or such) to "shell" out the command.

meulinux

  • Guest
Re: Change the permissions of a folder
« Reply #2 on: August 17, 2011, 07:00:13 pm »
----------------------------------
... Thanks ...
----------------------------------

 

TinyPortal © 2005-2018