Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8949687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:16:34+00:00 2026-06-15T13:16:34+00:00

I am making a simple script for a network where ever a homefolder is

  • 0

I am making a simple script for a network where ever a homefolder is created for every user. Making the users + putting them in the correct group works perfectly but as soon as I add the homefolder part it only executes once.
This script is called 9 times in another script but it only works once.

rem ****** %1 username
rem ****** %2 password
rem ****** %3 group



net user %1 %2 /ADD 
net user %1 /logonpasswordchg:no 
net user %1 /active:yes 
net user %1 /expires:NEVER 
net user %1 /times:M-F,8-18
net user %1 /passwordchg:no

net group %3 %1 /add


C:
cd \School\Homefolders\Leerlingen
md %1
echo Y| cacls C:\School\Homefolders\Leerlingen\%1 /G %1:C administrators:F
cd..
cd..
cd..
cd..
C:
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:16:35+00:00Added an answer on June 15, 2026 at 1:16 pm

    I just created a similar example and had the same problem caused by changing the directories. You also have an extra “cd ..” statement. Try just using the following:

    md C:\School\Homefolders\Leerlingen\%1
    echo Y| cacls C:\School\Homefolders\Leerlingen\%1 /G %1:C administrators:F
    

    I’m also assuming as it otherwise gets called multiple times that you’ve remembered to use a call statement in the batch file that calls that one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a simple script that allows a user to post a message, question
I'm making a simple download script, where my users can download their own images
I'm making a simple PHP script which lets the user upload an image. These
I created a simple bubblesorting script here that takes in arrays and sorts them,
I'm making a simple script that works on Jinja2 templates. Right now it's just
I am making a simple website and am writing a gradle build script that
I am making simple connection between two table - first one called users has
Making a simple application, so when the user logs out of Windows, it of
I'm making a simple jQuery script that will allow you to change something on
I am making a simple text and script editor with code highlighting. For that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.