We have a batch file that generates new users in W2K. When the file is
run,the command window shows the share is created and the line:
"Command completed successfully" appears 4 times.
Then the line
" Are you sure (Y/N)" Appears.
This means we manually have to accept each new user.

Can anyone suggest and auto switch or command to automate the process.

Thanks in advance.

:: Script starts here
if "%4" == "" goto usage

:: Set Variables
set username=%1
set fullname=%2 %3
set yearlevel=%4
set groupdir=Year%4
set userdir=E:\Students\%4\%username%
REM set skeldir=c:\Admin\%groupdir%
set loginscript=logon%6.bat
set password=%5
set pdc=\\default

:: Confirm account details
rem echo The current details for the account to be created are as
rem echo.
rem echo username: %username%
rem echo fullname: %fullname%
rem echo yearlevel: %yearlevel%
rem echo userdir: %userdir%
REM echo skeldir: %skeldir%
rem echo loginscript: %loginscript%
rem echo password: %password%
rem echo pdc: %pdc%
rem echo.
rem echo Is this correct? Press Ctrl-C to abort or
rem pause

REM :: Error conditions (some very primitive)
rem Skeleton directory doesn't exist
REM if not exist %skeldir%\nul goto skeldirfail

rem Userdirectory already exists
if exist %userdir%\nul goto userdirfail

rem Group directory doesn't exist - you may want to remove this part.
REM ::if not exist c:\admin\%yearlevel%\nul goto groupdirfail

rem Check that there is a login.bat file
REM if not exist c:\winnt\system32\repl\import\scripts\%loginscript %
goto loginscriptfail

:: Here is the fun stuff...
mkdir %userdir%
REM xcopy %skeldir% %userdir% /e /i /q /h
REM move %userdir%\base.bat %userdir%\%username%.bat
net share %username%$=%userdir% /users:4 /remark:"Home directory of
net user %username% %password% /fullname:"%fullname%"
/profilepath:%LOGONSERVER%\PROFILES\yr%6.man /scriptpath:%loginscript%
/time:M-F,06:00-18:00 /comment:"%yearlevel%" /add /domain
if errorlevel 1 goto create_error
net group "%yearlevel%" %username% /add /domain
net group "Students" %username% /add /domain
net group "Proxy_Student" %username% /add /domain
cacls %userdir% /t /g %username%:c "Domain Admins":f
echo Account created.
goto end

echo Adduser.bat - Add user to NT 4 domain
echo Usage: adduser username firstname surname Yearlevel Password
echo e.g. adduser fsmith Fred Smith Sales adg4a3(1 7
goto end