I have a DOS file that I would like to run by simply clicking a short cut.

A

AAaron123

I have a DOS file that I would like to run by simply clicking a short cut.
The shortcut needs to open a command window and run the exe there.

Is that possible?

Thanks

PS
I guess it is not really a DOS file.
What is the current nomenclature?
 
S

Shenan Stanley

AAaron123 said:
I have a DOS file that I would like to run by simply clicking a
short cut. The shortcut needs to open a command window and run the
exe there.
Is that possible?

Thanks

PS
I guess it is not really a DOS file.
What is the current nomenclature?

Same as it ever was - executable. You are giving it a name based off the
platform it was likely created to run on.

What is it?

The following:

cmd /k

in a batch script and in front of the path/executable name itself might get
you what you desire.
 
A

AAaron123

Shenan said:
Same as it ever was - executable. You are giving it a name based off
the platform it was likely created to run on.

What is it?

trid.exe
A utility designed to identify file types from their binary
signatures.
The following:

cmd /k

in a batch script and in front of the path/executable name itself
might get you what you desire.

It gives me what I asked for but I now know that it is not what I desire.

What would be nice is for the command window to open with trid.exe at the
prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot
 
P

Pegasus [MVP]

AAaron123 said:
trid.exe
A utility designed to identify file types from their binary
signatures.


It gives me what I asked for but I now know that it is not what I desire.

What would be nice is for the command window to open with trid.exe at the
prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot

You can create a shortcut with the following command:

J:\Program Files\trid.exe

Does trid.exe prompt you for a file name? Post again if it doesn't - perhaps
piping the file name into trid.exe will work. It all depends on how the
program was written.
 
A

AAaron123

Pegasus said:
You can create a shortcut with the following command:

J:\Program Files\trid.exe

Does trid.exe prompt you for a file name? Post again if it doesn't -
perhaps piping the file name into trid.exe will work. It all depends
on how the program was written.

No it does not.
It expects me to type at the DOS prompt:

J:\Program Files\trid.exe filename.gif

and then hit Enter

thanks
 
P

Pegasus [MVP]

AAaron123 said:
No it does not.
It expects me to type at the DOS prompt:

J:\Program Files\trid.exe filename.gif

and then hit Enter

thanks

In this case you can do it with this batch file:

@echo off
set /p FName=Please enter the file name:
if "%FName%"=="" goto :eof
"J:\Program Files\trid.exe" %FName%

or, if the file is located in some specific folder:
@echo off
set /p FName=Please enter the file name:
if "%FName%"=="" goto :eof
"J:\Program Files\trid.exe" J:\SomeFolder\%FName%
 
B

Bill Sharpe

AAaron123 said:
No it does not.
It expects me to type at the DOS prompt:

J:\Program Files\trid.exe filename.gif

and then hit Enter

thanks
Try this in the short cut:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe" filename.gif
or possibly this:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe filename.gif"

Sometimes the cmd file hiccups over spaces unless there are quote marks
around them.

Bill
 
P

Pegasus [MVP]

Bill Sharpe said:
Try this in the short cut:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe" filename.gif
or possibly this:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe filename.gif"

Sometimes the cmd file hiccups over spaces unless there are quote marks
around them.

Bill

I think there is some mix-up here between the prompt (I:\My Documents\My
Pictures) and the program name (J:\Program Files\trid.exe). You probably
wanted to suggest putting this string into the shortcut:

"J:\Program Files\trid.exe" "filename.gif"
 
J

ju.c

Create a right-click command to launch trid.

1. Copy below and paste into Notepad.

----------copy-inside-only----------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\trid]
[HKEY_CLASSES_ROOT\*\shell\trid\command]
@="C:\\Windows\\System32\\cmd.exe /k C:\\PROGRA~1\\Tools\\trid.exe \"%1\""

----------copy-inside-only----------

2. Replace C:\\PROGRA~1\\TRID\\trid.exe with the path to trid.exe.
(Note that it must be the short path, and double backslashes)
(Check the cmd.exe path)

3. Save-as TRID.reg (or any name + .reg)

4. Double-click or right-click and merge into the registry.

Now you can right-click on any file and see the results.


ju.c


AAaron123 said:
Shenan said:
Same as it ever was - executable. You are giving it a name based off
the platform it was likely created to run on.

What is it?

trid.exe
A utility designed to identify file types from their binary
signatures.
The following:

cmd /k

in a batch script and in front of the path/executable name itself
might get you what you desire.

It gives me what I asked for but I now know that it is not what I desire.

What would be nice is for the command window to open with trid.exe at the
prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot
 
A

AAaron123

Pegasus said:
In this case you can do it with this batch file:

@echo off
set /p FName=Please enter the file name:
if "%FName%"=="" goto :eof
"J:\Program Files\trid.exe" %FName%

or, if the file is located in some specific folder:
@echo off
set /p FName=Please enter the file name:
if "%FName%"=="" goto :eof
"J:\Program Files\trid.exe" J:\SomeFolder\%FName%

Just what I needed


thanks
 
A

AAaron123

Bill said:
Try this in the short cut:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe" filename.gif
or possibly this:
"I:\My Documents\My Pictures>J:\Program Files\trid.exe filename.gif"

Sometimes the cmd file hiccups over spaces unless there are quote
marks around them.

Bill

thanks
 
A

AAaron123

Will that keep the command window open so I can see the results?
When I did a similar thing using a shortcut it opened a cmd window and then
the window terminated faster than I could see the results.

You think this would have that problem?

Thanks

ju.c said:
Create a right-click command to launch trid.

1. Copy below and paste into Notepad.

----------copy-inside-only----------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\trid]
[HKEY_CLASSES_ROOT\*\shell\trid\command]
@="C:\\Windows\\System32\\cmd.exe /k C:\\PROGRA~1\\Tools\\trid.exe
\"%1\""
----------copy-inside-only----------

2. Replace C:\\PROGRA~1\\TRID\\trid.exe with the path to trid.exe.
(Note that it must be the short path, and double backslashes)
(Check the cmd.exe path)

3. Save-as TRID.reg (or any name + .reg)

4. Double-click or right-click and merge into the registry.

Now you can right-click on any file and see the results.


ju.c


AAaron123 said:
Shenan said:
AAaron123 wrote:
I have a DOS file that I would like to run by simply clicking a
short cut. The shortcut needs to open a command window and run the
exe there.
Is that possible?

Thanks

PS
I guess it is not really a DOS file.
What is the current nomenclature?

Same as it ever was - executable. You are giving it a name based
off the platform it was likely created to run on.

What is it?

trid.exe
A utility designed to identify file types from their binary
signatures.
The following:

cmd /k

in a batch script and in front of the path/executable name itself
might get you what you desire.

It gives me what I asked for but I now know that it is not what I
desire. What would be nice is for the command window to open with
trid.exe
at the prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot
 
J

ju.c

Th switch "/k" after cmd.exe makes the command window
stay open. To see all of the available options, type (in the
command window) "cmd.exe /?".

Also, you can rename the right-click option from trid to
anything else by adding it to the default entry here:

[HKEY_CLASSES_ROOT\*\shell\trid]
Default = Analyze with TrID

Take care.


ju.c


AAaron123 said:
Will that keep the command window open so I can see the results?
When I did a similar thing using a shortcut it opened a cmd window and then
the window terminated faster than I could see the results.

You think this would have that problem?

Thanks

ju.c said:
Create a right-click command to launch trid.

1. Copy below and paste into Notepad.

----------copy-inside-only----------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\trid]
[HKEY_CLASSES_ROOT\*\shell\trid\command]
@="C:\\Windows\\System32\\cmd.exe /k C:\\PROGRA~1\\Tools\\trid.exe
\"%1\""
----------copy-inside-only----------

2. Replace C:\\PROGRA~1\\TRID\\trid.exe with the path to trid.exe.
(Note that it must be the short path, and double backslashes)
(Check the cmd.exe path)

3. Save-as TRID.reg (or any name + .reg)

4. Double-click or right-click and merge into the registry.

Now you can right-click on any file and see the results.


ju.c


AAaron123 said:
Shenan Stanley wrote:
AAaron123 wrote:
I have a DOS file that I would like to run by simply clicking a
short cut. The shortcut needs to open a command window and run the
exe there.
Is that possible?

Thanks

PS
I guess it is not really a DOS file.
What is the current nomenclature?

Same as it ever was - executable. You are giving it a name based
off the platform it was likely created to run on.

What is it?

trid.exe
A utility designed to identify file types from their binary
signatures.


The following:

cmd /k

in a batch script and in front of the path/executable name itself
might get you what you desire.

It gives me what I asked for but I now know that it is not what I
desire. What would be nice is for the command window to open with
trid.exe
at the prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot
 
A

AAaron123

Thanks a lot

ju.c said:
Th switch "/k" after cmd.exe makes the command window
stay open. To see all of the available options, type (in the
command window) "cmd.exe /?".

Also, you can rename the right-click option from trid to
anything else by adding it to the default entry here:

[HKEY_CLASSES_ROOT\*\shell\trid]
Default = Analyze with TrID

Take care.


ju.c


AAaron123 said:
Will that keep the command window open so I can see the results?
When I did a similar thing using a shortcut it opened a cmd window
and then the window terminated faster than I could see the results.

You think this would have that problem?

Thanks

ju.c said:
Create a right-click command to launch trid.

1. Copy below and paste into Notepad.

----------copy-inside-only----------
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\trid]
[HKEY_CLASSES_ROOT\*\shell\trid\command]
@="C:\\Windows\\System32\\cmd.exe /k C:\\PROGRA~1\\Tools\\trid.exe
\"%1\""
----------copy-inside-only----------

2. Replace C:\\PROGRA~1\\TRID\\trid.exe with the path to trid.exe.
(Note that it must be the short path, and double backslashes)
(Check the cmd.exe path)

3. Save-as TRID.reg (or any name + .reg)

4. Double-click or right-click and merge into the registry.

Now you can right-click on any file and see the results.


ju.c


Shenan Stanley wrote:
AAaron123 wrote:
I have a DOS file that I would like to run by simply clicking a
short cut. The shortcut needs to open a command window and run
the exe there.
Is that possible?

Thanks

PS
I guess it is not really a DOS file.
What is the current nomenclature?

Same as it ever was - executable. You are giving it a name based
off the platform it was likely created to run on.

What is it?

trid.exe
A utility designed to identify file types from their binary
signatures.


The following:

cmd /k

in a batch script and in front of the path/executable name itself
might get you what you desire.

It gives me what I asked for but I now know that it is not what I
desire. What would be nice is for the command window to open with
trid.exe
at the prompt waiting for a file name.

Like so in the command window:

I:\My Documents\My Pictures>J:\Program Files\trid.exe

possible?

I know about "Start in" in the short cut.
I don't know how to write the Target to do the above.
Do I need a .bat file?

Thanks a lot
 

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