Bladerunner2019
Solid State Member
- Messages
- 7
Hi
Heres an example of the code im using at the moment:
rem
cd c:\
md Example
cd c:\Example
xcopy "C:\Documents and Settings\User\My Documents\Test\Example\SpaceMonger.exe" "C:\Example" /s
c:\Example\SpaceMonger.exe
As you can see, it creates an empty 'Example' folder on the root of C:, then copies the contents of 'Example' from the 'My Documents folder into the newly created folder on C:, and executes it.
I've created a shortcut to the Batch file, and this works fine using the above syntax.
However, once its burnt on CD (the shortcut to the Batch file is on an autorun html page with other shortcuts to other apps), I obviously cannot specify the path as C: in xcopy where its coming from (where its copying to will remain constant).
The problem is that CD Rom drive letters will vary, so is there a way to tell it to look in the "<CD Rom>\Test\Example" folder? I.E., some syntax that specifies the CD Rom on any machine, irrespective of its drive letter?
If anyone can help I would be most appreciative.
TIA
Heres an example of the code im using at the moment:
rem
cd c:\
md Example
cd c:\Example
xcopy "C:\Documents and Settings\User\My Documents\Test\Example\SpaceMonger.exe" "C:\Example" /s
c:\Example\SpaceMonger.exe
As you can see, it creates an empty 'Example' folder on the root of C:, then copies the contents of 'Example' from the 'My Documents folder into the newly created folder on C:, and executes it.
I've created a shortcut to the Batch file, and this works fine using the above syntax.
However, once its burnt on CD (the shortcut to the Batch file is on an autorun html page with other shortcuts to other apps), I obviously cannot specify the path as C: in xcopy where its coming from (where its copying to will remain constant).
The problem is that CD Rom drive letters will vary, so is there a way to tell it to look in the "<CD Rom>\Test\Example" folder? I.E., some syntax that specifies the CD Rom on any machine, irrespective of its drive letter?
If anyone can help I would be most appreciative.
TIA