Hi all,
I've compiled a couple of batch files using the %MYFILES% feature without problems, but the latest doesn't seem to work.
Can anyone help? please!
The script;
@echo off
CLS
net user XXXX xxxxxx (unmasked in batch)
cls
ECHO.
echo Local Machine Renamer !!
echo.
echo !!! This must be run on the local machine !!!
FOR /F "tokens=5* delims= " %%A IN ('VOL C: ^| FIND "drive C"') DO SET OLDLABEL=%%B
ECHO Enter Username:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET user=%%?
@ SET user > nul
echo.
echo.
echo.
LABEL C: %OLDLABEL%
FOR /F "tokens=5* delims= " %%A IN ('VOL C: ^| FIND "drive C"') DO SET OLDLABEL=%%B
ECHO Enter Domain Password:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET userp=%%?
@ SET userp > nul
echo.
echo.
echo.
LABEL C: %OLDLABEL%
FOR /F "tokens=5* delims= " %%A IN ('VOL C: ^| FIND "drive C"') DO SET OLDLABEL=%%B
ECHO Enter New Computername:
FOR /F "TOKENS=*" %%? IN ('LABEL C: 2^>NUL') DO SET CNAME=%%?
@ SET cname > nul
echo.
echo.
echo.
LABEL C: %OLDLABEL%
%MYFILES%\netdom.exe renamecomputer %COMPUTERNAME% /newname:%CNAME% /userD:MYDOMAIN\%user% /passwordD:* /userO:XXXX /passwordO:xxxxxx /force /reboot:3
The error that is returned is;
The parameter \DOCUME~1\71767\LOCALS~1\APPLIC~1\netdom.exe was unexpected.
Try "NETDOM HELP" for more information.
It looks like it's running netdom but without the correct arguments!?
Anyone?