Toon posts:

Vbscript machtigingen instellen op bestand

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallo

Is het mogelijk om via een vbscript machtigingen in te stellen op een bestand. Zodat b.v. alle gebruikers machtigingen hebben om het bestand te wijzigen.

We hebben hier namelijk software waarvan een bepaald bestand moet vervangen worden als wijze van update. Alleen moet de gebruiker machtigingen hebben om dit bestand te wijzigen. Bij het kopieren van het bestand via een script worden de machtigingen van de bovenliggende map overgenomen en kan het bestand dus enkel gelezen worden.

De script moet uitgevoerd worden op windows XP pc's binnen een Windows 2000 domein. De script wordt dan toegepast via Group Policy op de verschillende pc's.

Alvast bedankt

Verwijderd

Hallo

cacls.exe
This executable comes with Windows XP and Windows Server 2003 as far as I know. This executable allows you to set file security from command line. It comes handy when you have automated batch process. Here is the output of the Help for the executable.

Displays or modifies access control lists (ACLs) of files
CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]

[/P user:perm [...]] [/D user [...]]

filename Displays ACLs.
/T Changes ACLs of specified files in
the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights.
Perm can be: R Read
W Write
C Change (write)
F Full control
/R user Revoke specified user's access rights (only valid with /E).
/P user:perm Replace specified user's access rights.
Perm can be: N None
R Read
W Write
C Change (write)
F Full control
/D user Deny specified user access.
Wildcards can be used to specify more that one file in a command.
You can specify more than one user in a command.

Abbreviations:
CI - Container Inherit.
The ACE will be inherited by directories.
OI - Object Inherit.
The ACE will be inherited by files.
IO - Inherit Only.
The ACE does not apply to the current file/directory.


Succes

Verwijderd

Topicstarter
Hartelijk bedankt

Ik probeer het zo meteen eens uit.

Groeten

Verwijderd

Denk wel je kan comand line commandos enkel uitvoeren via een shell in vbscript.

Groetjes