Jump to content

Calmsoul

Member
  • Posts

    5
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

About Calmsoul

Profile Information

  • OS
    none specified

Calmsoul's Achievements

0

Reputation

  1. I will try that on monday at work and will give a feedback. Thx for the answers!
  2. Concerning the Owner rights: We were told to do this (and we were told why but I forgot the reason, have to ask again...^^) so take this as given I tried xcacls while I wrote the script because cacls can not set the owner, but xcacls did not do it correctly (in fact it did nothing) even though it gave an "succesfull" as answer to my command. So I used subinacl for that. For everything else cacls is enough for my purpose so it's one programm less on the server^^ (I know this is just a bad excuse^^). Now to the code you proposed: I'm not sure because I'm relatively new to this, but I thinke in your code is no check if the folder already exists, am I right? I want it in the script for the case there is a manually corrected right on the already existing folder so that it is not overwritten by the script. Aside from the your proposes: Any idea why my code isn't working in the first place?^^ I hope my english is understandable as I don't use it very often...
  3. Hello everyone! Right now I'm learning to administrate Windows Server 2003. I wrote a cmd script to create profile folders for my client users which I already created in Active Directory. The script creates the folder, changes some rights with cacls and sets the owner of the folder to the user account. The script reads the usernames from a txt file in the same folder so I don't have to enter every user manually. It searches the destination folder if there already is a folder with the intended name and if so skips this name and goes on to next. There's just one "problem": If the folder is created by the script I have to manually confirm the changes done by cacls. I figured out a solution that worked, but stopped working after I put the cacls command into the ELSE argument of an IF command. This is the code in question: Without the "echo y >" part the command works just fine inside the ELSE. Has anyone an idea why this is the case and knows a solution? Many thanks in advance!
×
×
  • Create New...