How does TextPad "find" cmd.exe and/or command.com
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 7
- Joined: Sat Dec 06, 2003 11:54 pm
- Location: Duluth, GA USA
How does TextPad "find" cmd.exe and/or command.com
I found a poll that asks how important is the ability to configure the command processor that TextPad uses to execute user (or built-in) tools, but I did not see an explanation on how TextPad goes about executing cmd.exe/command.com.
Does it:
1. Determine the OS and launch the command, assuming that it exists in a PATH directory?
2. Determine the OS and launch the full path to the command based on the known location?
3. Use an environment variable? (I believe that I have ruled this one out, but thought I would mention it anyhoo)
4. Black magic!?!
I am asking, because I would very much like to use 4NT as the command processor for a couple of VSS-related tools that I have defined. The rub is that the Microsoft command processor does not support UNC paths as current directories.
I could write a batch file or Perl script that accepts $FileDir as an argument and changes the directory within the context of the script. I could even map the UNC paths to network drives ... but that does not answer my question, does it?
Thanks!
-Chris
Does it:
1. Determine the OS and launch the command, assuming that it exists in a PATH directory?
2. Determine the OS and launch the full path to the command based on the known location?
3. Use an environment variable? (I believe that I have ruled this one out, but thought I would mention it anyhoo)
4. Black magic!?!
I am asking, because I would very much like to use 4NT as the command processor for a couple of VSS-related tools that I have defined. The rub is that the Microsoft command processor does not support UNC paths as current directories.
I could write a batch file or Perl script that accepts $FileDir as an argument and changes the directory within the context of the script. I could even map the UNC paths to network drives ... but that does not answer my question, does it?
Thanks!
-Chris
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 7
- Joined: Sat Dec 06, 2003 11:54 pm
- Location: Duluth, GA USA
I have tried that with unsatisfactory results. Regardless of which command you "define" in the Tools menu, TextPad creates a temporary batch file, in $FileDir that contains the command you ultimately want to execute, its parameters, etc. The batch file is always executed by cmd.exe/command.com. Which does not support UNC paths.
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
-
- Posts: 7
- Joined: Sat Dec 06, 2003 11:54 pm
- Location: Duluth, GA USA
It appears that I was partially mistaken in that TextPad does not always create a batch file. If "Close DOS window on exit" option is NOT checked, TextPad will create a batch file that uses the PAUSE command to keep the Tool from finishing.
So, I've gotten TextPad to execute 4NT directly ... which solves part of the problem. Now I have to figure out how to get the current project in VSS changed to $FileDir before the VSS checkout command is executed.
P.S. I'd still like to know how TextPad "finds" cmd.exe/command.com.
Thanks for your responses Ben!
So, I've gotten TextPad to execute 4NT directly ... which solves part of the problem. Now I have to figure out how to get the current project in VSS changed to $FileDir before the VSS checkout command is executed.
P.S. I'd still like to know how TextPad "finds" cmd.exe/command.com.
Thanks for your responses Ben!
-
- Posts: 7
- Joined: Sat Dec 06, 2003 11:54 pm
- Location: Duluth, GA USA
-
- Posts: 7
- Joined: Sat Dec 06, 2003 11:54 pm
- Location: Duluth, GA USA