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

  • Thread starter Thread starter AAaron123
  • Start date Start date
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?
 
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.
 
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
 
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.
 
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
 
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%
 
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
 
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"
 
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
 
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
 
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
 
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
 
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
 
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
 
Back
Top