%MYFILES% Problem 2.1.6.0

Convert your BATch files into EXEcutable format in one click.
Post Reply
smiley1244
Posts: 3
Joined: Fri May 11, 2007 7:14 am

%MYFILES% Problem 2.1.6.0

Post by smiley1244 » Fri May 11, 2007 7:37 am

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?

support
Site Admin
Posts: 399
Joined: Fri Feb 13, 2004 1:05 pm

Post by support » Fri May 11, 2007 8:05 pm

Please use CALL command to execute embedded files:

CALL %MYFILES%\netdom.exe ...................

Post Reply