0

I have posted this issue on StackOverflow but I thought this question might be a little more VMWare\Windows2008 server specific. Here's my question:

I have two VMware instances of Windows 2003. I am trying to run a batch file that starts running another batch file within its folder path. The script runs fine on one VM but on the other VM it fails to execute with the error:

The System cannot find the file specified

The script I am trying to run is script.bat:

start /d FOLDERNAME /b /WAIT AnotherScript.bat %~n0%~x0

I have put both my files within the same folder structure under the C:\ drive on both machines. The file AnotherScript.bat resides within FOLDERNAME on both the VMs.

It is not a permissions issue(?) since I show up as an administrator on both VMs.

I was wondering why would I get an unable to resolve relative paths on one machine vs. the ability to resolve it on another machine.

Thanks

EDIT: Both the scripts are launching from the same directory and the %PATH% variables are the same and the cmd starts from C:\WINDOWS\system32\cmd.exe on both machines. None of this seems to be visibly different. Is there something else I should look into?

user9517
  • 115,471
  • 20
  • 215
  • 297
sc_ray
  • 107
  • 1
  • 6
  • Are these identical Windows 2003 versions, one isn't 64 bit perhaps? One thing you could try is to replace the start with echo on both systems to check that both systems are interpreting the parameters in exactly the same way. – Helvick Feb 03 '11 at 19:31
  • FOLDERNAME is not a path. Why block out the detail of that which could be vital in solving your problem? – JamesRyan Feb 03 '11 at 20:12
  • @Helvick - I followed your suggestion. Replacing the start with an echo gave me the same string on both machines. – sc_ray Feb 03 '11 at 20:25

1 Answers1

0

I would suggest put PAUSE commands in the script to check what command it can't find.

Vick Vega
  • 2,398
  • 16
  • 22
  • Thanks but it seems like the script is unable to traverse the relative path to get to the AnotherScript.bat file. – sc_ray Feb 03 '11 at 19:21