Invalid parameter to SHIFT command
-
- Posts: 9
- Joined: Tue Feb 06, 2007 4:37 pm
Invalid parameter to SHIFT command
Hi,
I am trying to run a compiled batch file (containing included files) under Windows 2003 Server. The first line after the command is the error above.
Is this related to QBC?
Thanks,
Al
I am trying to run a compiled batch file (containing included files) under Windows 2003 Server. The first line after the command is the error above.
Is this related to QBC?
Thanks,
Al
-
- Posts: 9
- Joined: Tue Feb 06, 2007 4:37 pm
It seems to be QBC
I ran the same command file both as EXE and as CMD and it seems that the problem is QBC. Below are the two scripts:
--------------------
If you look at the list line of each script you will notice that it has shifted.
Any help at solving this problem would be greatly appreciated.
Regards,
Al
Code: Select all
C:\Program Files\TestBk>TestBackup.exe "D:\Directory" 12345M
Invalid parameter to SHIFT command
C:\Program Files\TestBk>TITLE Test Backup
C:\Program Files\TestBk>SETLOCAL
C:\Program Files\TestBk>IF NOT Windows_NT == Windows_NT GOTO :EOF
C:\Program Files\TestBk>SET rm_Version=1.1.3.0
C:\Program Files\TestBk>REM Set HOMEPATH values
C:\Program Files\TestBk>SET HOMEDRIVE=C:
C:\Program Files\TestBk>SET HOMEPATH=Program Files\TestBk
C:\Program Files\TestBk>REM Backup Directory
C:\Program Files\TestBk>IF [TestBackup.exe] == [] GOTO Help
Code: Select all
C:\Program Files\TestBk>TestBackup.cmd "D:\Directory" 12345M
C:\Program Files\TestBk>TITLE Test Backup
C:\Program Files\TestBk>SETLOCAL
C:\Program Files\TestBk>IF NOT Windows_NT == Windows_NT GOTO :EOF
C:\Program Files\TestBk>SET rm_Version=1.1.3.0
C:\Program Files\TestBk>REM Set HOMEPATH values
C:\Program Files\TestBk>SET HOMEDRIVE=C:
C:\Program Files\TestBk>SET HOMEPATH=Program Files\TestBk
C:\Program Files\TestBk>REM Backup Directory
C:\Program Files\TestBk>IF ["D:\Directory"] == [] GOTO Help
Any help at solving this problem would be greatly appreciated.
Regards,
Al
-
- Posts: 9
- Joined: Tue Feb 06, 2007 4:37 pm
The Problem
I'm still trying to shed light on the problem and create a way to reproduce the error.
I created this simple CMD file which I compiled using QBC.
ECHO %0
ECHO %1
ECHO %2
ECHO %3
Runing it under Windows XP returns
D:\Temp>test 12345
D:\Temp>ECHO test
test
D:\Temp>ECHO 12345
12345
D:\Temp>ECHO
ECHO is on.
D:\Temp>ECHO
ECHO is on.
while running it under Windows 2003 gives
C:\Temp>test.exe 12345
Invalid parameter to SHIFT command
C:\Temp>ECHO C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\Temp>ECHO test.exe
test.exe
C:\Temp>ECHO 12345
12345
C:\Temp>ECHO
ECHO is on.
C:\Temp>
Hope this helps.
I created this simple CMD file which I compiled using QBC.
ECHO %0
ECHO %1
ECHO %2
ECHO %3
Runing it under Windows XP returns
D:\Temp>test 12345
D:\Temp>ECHO test
test
D:\Temp>ECHO 12345
12345
D:\Temp>ECHO
ECHO is on.
D:\Temp>ECHO
ECHO is on.
while running it under Windows 2003 gives
C:\Temp>test.exe 12345
Invalid parameter to SHIFT command
C:\Temp>ECHO C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\bt3037.bat
C:\Temp>ECHO test.exe
test.exe
C:\Temp>ECHO 12345
12345
C:\Temp>ECHO
ECHO is on.
C:\Temp>
Hope this helps.
-
- Posts: 12
- Joined: Thu Jan 04, 2007 11:19 pm
- Location: Cleveland, Ohio
I already started a post about this:
https://www.abyssmedia.com/forum/windows ... t-t66.html
It's a compiler issue but it still happens even when I compile it under Win2K3.
https://www.abyssmedia.com/forum/windows ... t-t66.html
It's a compiler issue but it still happens even when I compile it under Win2K3.
-
- Posts: 9
- Joined: Tue Feb 06, 2007 4:37 pm
-
- Posts: 1
- Joined: Tue Aug 07, 2007 12:10 pm
-
- Site Admin
- Posts: 484
- Joined: Fri Feb 13, 2004 1:05 pm
-
- Posts: 1
- Joined: Thu Aug 09, 2007 9:01 pm