Jump to content

File Security Permissions


Recommended Posts

Hi,

Another question, I need to add security permissions to 3 .ini files that I am using.

Basically with my install file I and using, below example:

FileInstall ( "C:\Temp\myApp\MyINI1.ini", $Inst_Message & "\MyINI1.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI2.ini", $Inst_Message & "\MyINI2.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI3.ini", $Inst_Message & "\MyINI3.ini",1)

The files are installing fine but they only seem to have "Read" access for user, I want the user to have full control, and what would be even better is if I can add everyone to have full control to these 3 .ini files.

I have tried the:

_FileCreate($Inst_Message &"\MyINI1.ini")

FileSetAttrib($Inst_Message &"\MyINI1.ini", "-RASHNOT")

With a number of diffrent combinations of the RASHNOT Attribute.

Please can someone point me in the right direction as I think I am barking up the wrong tree.

Thanks,

Craig

Link to comment
Share on other sites

  • Developers

Hi,

Another question, I need to add security permissions to 3 .ini files that I am using.

Basically with my install file I and using, below example:

FileInstall ( "C:\Temp\myApp\MyINI1.ini", $Inst_Message & "\MyINI1.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI2.ini", $Inst_Message & "\MyINI2.ini",1)

FileInstall ( "C:\Temp\myApp\MyINI3.ini", $Inst_Message & "\MyINI3.ini",1)

The files are installing fine but they only seem to have "Read" access for user, I want the user to have full control, and what would be even better is if I can add everyone to have full control to these 3 .ini files.

I have tried the:

_FileCreate($Inst_Message &"\MyINI1.ini")

FileSetAttrib($Inst_Message &"\MyINI1.ini", "-RASHNOT")

With a number of diffrent combinations of the RASHNOT Attribute.

Please can someone point me in the right direction as I think I am barking up the wrong tree.

Thanks,

Craig

Do you mean the Read-Only Attribute or actual Security settings ?

File security can be changed by running CACLS, but you will require the rights to update it

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Do you mean the Read-Only Attribute or actual Security settings ?

File security can be changed by running CACLS, but you will require the rights to update it

The actual security settings, what if I use the RunAsSet() after the file have been extracted, then use the CACLS.

Link to comment
Share on other sites

  • Developers

The actual security settings, what if I use the RunAsSet() after the file have been extracted, then use the CACLS.

Thats what i would do if it need changing ..

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thats what i would do if it need changing ..

Thanks Guys,

I will try the RunAsSet() and then the CACLS.

JPM, yes I am using XP Pro and Server 2003,

So what you are saying is if I use the RunAsSet() and give the full controle access to the folder I extract all my files into then all the files/folders in that folder will have full controle? Am I right at saying that?

Thanks again,

Craig

Link to comment
Share on other sites

  • Developers

Thanks Guys,

I will try the RunAsSet() and then the CACLS.

JPM, yes I am using XP Pro and Server 2003,

So what you are saying is if I use the RunAsSet() and give the full controle access to the folder I extract all my files into then all the files/folders in that folder will have full controle? Am I right at saying that?

Thanks again,

Craig

The file permissions are inherited from the directory.....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...