Discussion:
how to change Target or command line for each file name extension
(too old to reply)
micky
2015-10-03 03:42:11 UTC
Permalink
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..

IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.

All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.

Is there a screen or a hack that will let me change these things?

(In a hardware emergency I had to move from XP and start using a Vista
computer. Hoping to upgrade to 7 when another computer is ready.)
. . .winston
2015-10-03 04:31:43 UTC
Permalink
Post by micky
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..
IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.
All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.
Is there a screen or a hack that will let me change these things?
(In a hardware emergency I had to move from XP and start using a Vista
computer. Hoping to upgrade to 7 when another computer is ready.)
The Target path in a shortcut is found on the shortcut's Properties
'Shortcut' tab

Vista through Win10 'Default Programs' allows one to choose the default
program, use all or selectively the programs file extension defaults, or
select a file type and use the default program and/or selectively change
the default program.

You also have the option when choosing a file (with a given extension)
in Windows Explorer to use cursor right click/Open With (Note: not all
file types will have the Open With option).
--
...winston
msft mvp windows experience
Ralph Fox
2015-10-03 09:12:47 UTC
Permalink
Post by micky
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..
IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.
All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.
Is there a screen or a hack that will let me change these things?
The Windows Registry Editor -- but you may have to learn more than you
want to know about how this is organized in the Windows Registry.

To take an example -- .pps

1) Run regedit.exe, the Windows Registry Editor

2) In the left pane of the Registry Editor, expand
HKEY_CLASSES_ROOT\.pps
and select the ".pps"

3) In the right pane, there are one or more rows with columns
name, type and data.
Look at the row with name = "(Default)", and note what this
row has in the data column.

Let us say the data column has "OpenOffice.Pps"

4) Now, In the left pane of the Registry Editor, expand
HKEY_CLASSES_ROOT\OpenOffice.Pps\shell\open\command
where the "OpenOffice.Pps" is the same as in #3 above.
Select the "command".

5) In the right pane, look at the row with name = "(Default)".
The 'data' column has the command line you are looking for.

There is a bit more to it, but that should get you started.


NOTE: If you have ever used this to change the program
(right-click on file) >> Open with >> Choose default
that sets up different registry settings which...
(1) Take priority when launching from within Windows Explorer
(2) Don't have the same options to set the command line
--
Kind regards
Ralph
micky
2015-10-03 20:26:10 UTC
Permalink
In alt.windows7.general, on Sat, 03 Oct 2015 22:12:47 +1300, Ralph Fox
Post by Ralph Fox
Post by micky
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..
IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.
All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.
Is there a screen or a hack that will let me change these things?
The Windows Registry Editor -- but you may have to learn more than you
want to know about how this is organized in the Windows Registry.
To take an example -- .pps
1) Run regedit.exe, the Windows Registry Editor
2) In the left pane of the Registry Editor, expand
HKEY_CLASSES_ROOT\.pps
and select the ".pps"
3) In the right pane, there are one or more rows with columns
name, type and data.
Look at the row with name = "(Default)", and note what this
row has in the data column.
Let us say the data column has "OpenOffice.Pps"
4) Now, In the left pane of the Registry Editor, expand
HKEY_CLASSES_ROOT\OpenOffice.Pps\shell\open\command
where the "OpenOffice.Pps" is the same as in #3 above.
Select the "command".
5) In the right pane, look at the row with name = "(Default)".
The 'data' column has the command line you are looking for.
This is perfect. Thanks a lot. This will be very useful.

I've used regedit before, a little.
Post by Ralph Fox
There is a bit more to it, but that should get you started.
You wouldn't know how to make a program opened this way open
*maximized*, would you? (I"ve installed Autosizer and MaxAll and
neither seem so far to make every program open maximized.)


Regedit for Vista has the advantage, I see, that it remembers what I was
looking at the last time I closed it. But it has the big disadvantage
that the icons for the "folder" that is open at the moment looks the
same as all the others. In XP it looked like an open book or something
when all the others looked like a closed whatever. Now I have to
look at the bottom line to see which "folder"'s contents the right pane
is displaying.
Post by Ralph Fox
NOTE: If you have ever used this to change the program
(right-click on file) >> Open with >> Choose default
that sets up different registry settings which...
(1) Take priority when launching from within Windows Explorer
(2) Don't have the same options to set the command line
Interesting. I use Open With / Always quite a bit. At least I have
in the past. Now I'll consider possible interactions.
Ralph Fox
2015-10-04 02:35:53 UTC
Permalink
Post by micky
You wouldn't know how to make a program opened this way open
*maximized*, would you? (I"ve installed Autosizer and MaxAll and
neither seem so far to make every program open maximized.)
Let's say the registry command line for opening .pps files looks like this

"C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"

What you can do is this

1) Create a batch file "pps_maximized.bat" which contains the following four lines

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START /MAX "C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
IF NOT ERRORLEVEL 1 GOTO DONE
PAUSE
:DONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The first line is the same as the original command line, with START /MAX added
at the beginning.


2) Change the registry command line for opening .pps files to look like this

"C:\...yadda...\pps_maximized.bat" "%1"

where "C:\...yadda...\pps_maximized.bat" is the full path to the batch file
"pps_maximized.bat".


It doesn't work if you simply put the START /MAX directly into the registry.
--
Kind regards
Ralph
micky
2015-10-04 09:42:59 UTC
Permalink
In alt.windows7.general, on Sun, 04 Oct 2015 15:35:53 +1300, Ralph Fox
Post by Ralph Fox
Post by micky
You wouldn't know how to make a program opened this way open
*maximized*, would you? (I"ve installed Autosizer and MaxAll and
neither seem so far to make every program open maximized.)
Let's say the registry command line for opening .pps files looks like this
"C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
What you can do is this
1) Create a batch file "pps_maximized.bat" which contains the following four lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START /MAX "C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
IF NOT ERRORLEVEL 1 GOTO DONE
PAUSE
:DONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first line is the same as the original command line, with START /MAX added
at the beginning.
2) Change the registry command line for opening .pps files to look like this
"C:\...yadda...\pps_maximized.bat" "%1"
where "C:\...yadda...\pps_maximized.bat" is the full path to the batch file
"pps_maximized.bat".
It doesn't work if you simply put the START /MAX directly into the registry.
Wow, Ralph, you did know.

I will do one of these. Thanks a lot.
micky
2015-10-12 17:20:43 UTC
Permalink
In alt.windows7.general, on Sun, 04 Oct 2015 15:35:53 +1300, Ralph Fox
Post by Ralph Fox
Post by micky
You wouldn't know how to make a program opened this way open
*maximized*, would you? (I"ve installed Autosizer and MaxAll and
neither seem so far to make every program open maximized.)
Let's say the registry command line for opening .pps files looks like this
"C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
What you can do is this
1) Create a batch file "pps_maximized.bat" which contains the following four lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START /MAX "C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
IF NOT ERRORLEVEL 1 GOTO DONE
PAUSE
:DONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first line is the same as the original command line, with START /MAX added
at the beginning.
2) Change the registry command line for opening .pps files to look like this
"C:\...yadda...\pps_maximized.bat" "%1"
where "C:\...yadda...\pps_maximized.bat" is the full path to the batch file
"pps_maximized.bat".
It doesn't work if you simply put the START /MAX directly into the registry.
Darn, I wrote the whole post below, and did all the things it describes,
only now to see that I misread your last line, even though it's
perfectly clear. I read it as, "If it doesn't work, you simply...."
Same words, different order.

This accounts for why you didn't make your last line the preferred
option. I wondered about that, but didn't reread the sentence. ;-(

Risky to inject politics, but still: This reminds me of Jeb Bush
agreeing that: "Knowing what you know now", he still would have invaded
Iraq. He heard that is, Knowing what you knew then. Still a
mistake, but not the level some in the press made it out to be. (I'm
speaking neutrally, not as a supporter of his. Risky to inject
politics, but I think few people hate or love him, so less risky.)


I just wanted to report back:

No great success but I am not deterred.

Your option 2 seemed simpler, so I searched the registry for occurrences
of "notepad".

Some started with @, as in @%SystemRoot%\System32\NOTEPAD.EXE %1

I wasn't sure what that meant or where to put start /max, before or
after the @, so I kept going until

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command

Plainly, this was the instruction that right clicking gives for editing
a batfile. I added START /MAX and tried it, and it gave me a list of
programs to use. Apparently I had screwed it up. I put it back the
way it was. I never closed regedit, but even if I had, one
advantage of Vista over XP, or maybe over 98 is that when re-opening,
regedit goes to the previous location. Also, I'm sure if I left it
screwed up but chose Notepad, it would have reset it as it is now.

It will take longer to try option 1, though once I get it for one file
type, it will take very little time for the others.
"Start /max notepad" works fine from a tcc/le (cmd-style) window.

I want almost all programs to open maximized, but two of the most common
are notepad and editpad lite. So for the time being, I just pulled the
borders of those two as far to the maximum as I could, and it seems to
be holding. Past experience tells me it won't hold forever, or there
are more than one way to call such a program, but I don't plan to be in
this box long anyhow. Either going back to XP or to 7.

No promises but I'll report back again later!

Now I see I was chasing an imaginary fox, but at least I found the right
line in the registry, for later.
micky
2015-10-12 17:26:25 UTC
Permalink
In alt.windows7.general, on Sun, 04 Oct 2015 15:35:53 +1300, Ralph Fox
Post by Ralph Fox
Post by micky
You wouldn't know how to make a program opened this way open
*maximized*, would you? (I"ve installed Autosizer and MaxAll and
neither seem so far to make every program open maximized.)
Let's say the registry command line for opening .pps files looks like this
"C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
What you can do is this
1) Create a batch file "pps_maximized.bat" which contains the following four lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START /MAX "C:\Program Files (x86)\OpenOffice 4\program\simpress.exe" -o "%1"
IF NOT ERRORLEVEL 1 GOTO DONE
PAUSE
:DONE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The first line is the same as the original command line, with START /MAX added
at the beginning.
2) Change the registry command line for opening .pps files to look like this
"C:\...yadda...\pps_maximized.bat" "%1"
where "C:\...yadda...\pps_maximized.bat" is the full path to the batch file
"pps_maximized.bat".
This time I did it this way, the way you told me to, and it worked on
the first try. Beginner's luck. Next time I'll make typos.

Interesting that I saw a dosbox open for a split second. I saw that
once recently in Vista on something that I might have installed but I
didn't fiddle with, though I forget what.

This depends on my not messing up my bat file or bat directory, but if I
do, it will still give me the menu of choices, and I'll be back where I
started.

Thanks a lot. Ralph

I'll do any other instances of this and the other programs as I notice
them.
Post by Ralph Fox
It doesn't work if you simply put the START /MAX directly into the registry.
You got that right!

JJ
2015-10-04 10:10:43 UTC
Permalink
Post by micky
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..
IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.
All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.
Is there a screen or a hack that will let me change these things?
(In a hardware emergency I had to move from XP and start using a Vista
computer. Hoping to upgrade to 7 when another computer is ready.)
Somewhat end-user-friendly-but-powerful way, use Nirsoft FileTypesMan.

<http://www.nirsoft.net/utils/file_types_manager.html>

Otherwise, use the ASSOC and FTYPE command line programs included in Windows
(since Win2K, AFAIK) as pointed by John K.Eason. Click "Assoc" at left nav
pane for the ASSOC program guide.

In short:

- ASSOC manages the ID of the file types - where an ID (also a file type) is
associated to one or more file extensions. e.g. ID=txtfile, and
EXT=txt,text,lst,tex

- FTYPE manages the actions and descriptions of the file types - where an
action is the command line of the program to execute for the current file
being acted on including the action name (e.g. Open, Print, Play). The
description is the description of the file type (duh; e.g.: Text file, JPEG
image, ThatApp document).
Big Al
2015-10-04 13:50:56 UTC
Permalink
Post by JJ
Post by micky
This is a Vista question, but since those groups are very quiet, I was
hoping 7 people would know the answer and would help me..
IIRC, XP, 98, and 3.1 had a utility screen, a tab on Folder Options,
that let me define details about what happened when I click on a file
with a particular filename extension.
All Vista has on the Control Panel is Default Programs, and it lets me
change the program but not change the command line associated with the
extension. What would be the Target in a shortcut.
Is there a screen or a hack that will let me change these things?
(In a hardware emergency I had to move from XP and start using a Vista
computer. Hoping to upgrade to 7 when another computer is ready.)
Somewhat end-user-friendly-but-powerful way, use Nirsoft FileTypesMan.
<http://www.nirsoft.net/utils/file_types_manager.html>
Otherwise, use the ASSOC and FTYPE command line programs included in Windows
(since Win2K, AFAIK) as pointed by John K.Eason. Click "Assoc" at left nav
pane for the ASSOC program guide.
- ASSOC manages the ID of the file types - where an ID (also a file type) is
associated to one or more file extensions. e.g. ID=txtfile, and
EXT=txt,text,lst,tex
- FTYPE manages the actions and descriptions of the file types - where an
action is the command line of the program to execute for the current file
being acted on including the action name (e.g. Open, Print, Play). The
description is the description of the file type (duh; e.g.: Text file, JPEG
image, ThatApp document).
I've used File Types Manager and found it doesn't work for all the things I want.
ie. For PNG I like the default to be preview in the default windows photo viewer but right-click edit should open in
photoshop. I found http://defaultprogramseditor.com/ Default Programs Editor to work out much better.

NOTE: Both programs have the ability to jump to regedit to the point where the change is, and I find it great to
export the change after testing. Now I have a folder of .reg files that fix everything in a few clicks.
JJ
2015-10-04 16:24:46 UTC
Permalink
Post by Big Al
I've used File Types Manager and found it doesn't work for all the things I want.
ie. For PNG I like the default to be preview in the default windows photo viewer but right-click edit should open in
photoshop. I found http://defaultprogramseditor.com/ Default Programs Editor to work out much better.
NOTE: Both programs have the ability to jump to regedit to the point where the change is, and I find it great to
export the change after testing. Now I have a folder of .reg files that fix everything in a few clicks.
That's indeed better. In a way, IMO.

The only missing function is the manager for the file type itself.
e.g. add and remove the file type. Not just edit an existing one.
Or change the file type description, and add new file extension(s) into a
file type.

But thanks. It'll be in my collection of tools, that's for sure.
Big Al
2015-10-04 16:50:12 UTC
Permalink
Post by JJ
Post by Big Al
I've used File Types Manager and found it doesn't work for all the things I want.
ie. For PNG I like the default to be preview in the default windows photo viewer but right-click edit should open in
photoshop. I found http://defaultprogramseditor.com/ Default Programs Editor to work out much better.
NOTE: Both programs have the ability to jump to regedit to the point where the change is, and I find it great to
export the change after testing. Now I have a folder of .reg files that fix everything in a few clicks.
That's indeed better. In a way, IMO.
The only missing function is the manager for the file type itself.
e.g. add and remove the file type. Not just edit an existing one.
Or change the file type description, and add new file extension(s) into a
file type.
But thanks. It'll be in my collection of tools, that's for sure.
I have both loaded too. You never know when one fills that little niche.
micky
2015-10-04 22:36:53 UTC
Permalink
In alt.windows7.general, on Sun, 4 Oct 2015 12:50:12 -0400, Big Al
Post by Big Al
Post by JJ
Post by Big Al
I've used File Types Manager and found it doesn't work for all the things I want.
ie. For PNG I like the default to be preview in the default windows photo viewer but right-click edit should open in
photoshop. I found http://defaultprogramseditor.com/ Default Programs Editor to work out much better.
NOTE: Both programs have the ability to jump to regedit to the point where the change is, and I find it great to
export the change after testing. Now I have a folder of .reg files that fix everything in a few clicks.
That's indeed better. In a way, IMO.
The only missing function is the manager for the file type itself.
e.g. add and remove the file type. Not just edit an existing one.
Or change the file type description, and add new file extension(s) into a
file type.
But thanks. It'll be in my collection of tools, that's for sure.
I have both loaded too. You never know when one fills that little niche.
Thanks, guys. I will look at both of them after dinner. They sound
good.
Loading...