| View previous topic :: View next topic |
| Author |
Message |
smiley1244
Joined: 11 May 2007 Posts: 3
|
Posted: Fri May 11, 2007 7:37 am Post subject: %MYFILES% Problem 2.1.6.0 |
|
|
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? |
|
| Back to top |
|
 |
|
|
support Site Admin
Joined: 13 Feb 2004 Posts: 299
|
Posted: Fri May 11, 2007 8:05 pm Post subject: |
|
|
Please use CALL command to execute embedded files:
CALL %MYFILES%\netdom.exe ................... |
|
| Back to top |
|
 |
|