Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Mapkey Pointing to Batch File

G

Guest

Guest
I am trying to create a mapkey that opens an external application. In the Record Mapkey > OS Script dialog box, I have the command:



D:\proefiles\toolbox\purgedrive.bat



This runs a batch file that opens a program called purgedrive.exe. Here are the contents of the batch file:



@echo off

REM *** Start Purge Drive

set D:\Program Files\PurgeDrive

start purgedrive.exe

exit



When I run the mapkey, I get the following error in the DOS window that pops up:



Environment variable D:\Program not defined



I've played around with the batch file, such as using D:\Progra~1\PurgeDrive and adding to my PATH environment variable the path to the directory, but to no avail.



Any suggestions on how this might be solved?



Thanks!
 
SET is for setting environment variables. CD changes directories. If you aren't sure of the DOS commands, type help at the command prompt for a list of commands. Type help <command name> to get a detailed description of any specific command.
 
Ah, you are right! I changed set d:\... to cd d:\... and it works now.



Thanks for the help!
 

Sponsor

Articles From 3DCAD World

Back
Top