2

The start command has been very handy, but I ran into a problem.

I was looking at an old Role Playing game (Questron II) and how to write maps for it. And it had a file called start.exe. And I have a utility that calls, to edit itself,

start "" "C:\Program Files (x86)\Notepad++\notepad++.exe" x.pl

So in this directory, it pulls the "start.exe" instead of the Windows start.

Running Search Everything didn't turn up a location for start.(extension).

Now, there are obvious workarounds for this instance, such as just pulling the map files I need to a separate directory.

But I'm more concerned with how I would find start.exe, or start.bat, or whatever its extension is, or if it is protected for a reason.

Thanks!

1
  • The standard start command is not a file, it is builtin to CMD like e.g. cd and set. If the 'utility that calls [start]' uses cmd then cmd should give the builtin start precedence over any file, and it does so for me (although I have 8.1 rather than 7). Otherwise the utility should just run notepad++ directly. Commented Feb 14, 2017 at 1:20

2 Answers 2

3

How I would find start.exe, or start.bat?

The Windows start command is an internal command (built into the cmd shell)


Further Reading

1
  • This gives me a lot to look for in the future. I never realized about internal commands. I really appreciate when answers open up more than just my direct question. I've used a lot of these commands but not all, so, lots to learn.
    – aschultz
    Commented Feb 14, 2017 at 1:09
2

Given that START is an internal command from CMD.EXE, you could execute it thru the later.

Reading from the CMD.EXE help, we find out that:

Starts a new instance of the Windows command interpreter

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
    [[/S] [/C | /K] string]

/C      Carries out the command specified by string and then terminates

So you can execute your program with:

CMD.EXE /C "START "" "C:\Program Files (x86)\Notepad++\notepad++.exe" x.pl"

This way you can assure that what is executed is CMD.EXE, and it executes it's START internal command with the parameters that you want it to have.

1
  • 1
    Thanks. I appreciate answers like this that help me revisit switches I kind of glossed over when I started.
    – aschultz
    Commented Mar 1, 2017 at 0:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .