Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:27 PM
SkySea@aol.com
Guest
 
Posts: n/a
Default Running a batch file

Hi! Any help on this would be appreciated...

In an HTML document that lists instructions on installing some
software, there's a point where a DOS batch file needs to be run in
order to copy files from the CD to the hard drive. Given that CD
drives can have various names, I wanted to run the batch file using
relative paths.

The problem is, the DOS window that opens to run the batch file can
leave the command prompt at any location . So even though the batch
file can be called with a relative path, the batch runs from whatever
the current directory is when the DOS window opened, and "file not
found" is the predictable error.

Is it possible to use just the one HTML file to have the batch file
run from its own location (or is some scripting language required)?

=======

Folder/file tree:

/install.html
/<Patches>
/copier.bat
/MFC42.DLL

HTML entry:
<a href="Patches/copier.bat">Click here</a> to copy the MFC42.dll
file to "C:\program&nbsp;files\pathfinder&nbsp;office" .

Batch file:
copy MFC42.DLL C:\progra~1\pathfi~1
exit

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles