Links to Batch Files sent via Outlook

G

Guest

Hi All

I have an email which is written in HTML, which includes a graphical link to
a batch file that resides on a shared network drive. Pretty basic stuff,
you'd think, but it's not working.

It sees the batch file and actually seems to run it (the black DOS box pops
up), but the actual program that should install as part of the batch file
doesn't install (it works perfectly if you actually browse to the batch file
and run it). I'm wondering if it's some sort of block in Outlook that would
cause it? I'm running out of ideas, and any help would be appreciated!

Cheers!
 
C

CMM

This is probably because the batch file is starting up in a "Working
Directory" other than the one that you expect. Use *explicit* paths in the
code of your batch file. xcopy somefile.ext doesn't necessarily mean the
batch file interpreter will assume that somefile.ext exists in the same
directory as the batch file... but rather is in the Working Directory passed
to the command environment (which is sometimes unpredictable).

Alternatively you can do
cd %~dp0
in the batch file to change the Working Directory to the directory the batch
file resides in (this only works on NT/2000/XP).

Also, make sure the link to the batch file is a file:/// link (example:
file:///\\share\bla\bla.bat). Yes, IE (and this Outlook) will try to be
smart and recognize a regular ol' file share link that looks like
\\share\bla\bla.bat but the file:/// protocol removes all doubt of your
intention.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top