Short-cut creator

  • Thread starter Thread starter JimmyJam
  • Start date Start date
J

JimmyJam

I know how to put a shortcut for a program on the desktop (DUH!), and I
know how to build a shortcut so it opens a program and a specific file
Sometimes the file's extension with fire up the correct app, but other
times or when a specific parameter is needed, I have to assemble the
properties of the shortcut.

Is there a program that will do the building for me so that the properties
of the shortcut reads

c:\program files\programx\programx.exe -edit c:\my documents\work for
spring\to-do-list for this week.xxx

Any such utility?

Notice the "-edit" parameter in my example -- which is what
Netscape/Mozilla requires to enter edit mode so the file can be edited
rather than simply displayed.
 
Is there a program that will do the building for me so that the properties
of the shortcut reads

c:\program files\programx\programx.exe -edit c:\my documents\work for
spring\to-do-list for this week.xxx

Any such utility?

Prolly not. However, clever use of the SendTo folder could help...
especially if parts of your shortcuts are repetitive. You still may have to
manually insert command line switches or run options.

Bob

Remove "kins" from address to reply.
 
Bob,

That's an idea. I really dont have that many different progs I'd want to
stipulate -- instead of letting the file association take care of it. Got
to break out the books on getting fancy with SentTo. Thanks for the
suggestion.
 
I'm not sure if this helps, but you can find at least two cmdline
utilities that create shortcuts at

<http://www.esil.univ-mrs.fr/~lafirme/Softs/Windows/utils_nt4/>
<http://www.optimumx.com/download/>

/luigi


I know how to put a shortcut for a program on the desktop (DUH!), and
I know how to build a shortcut so it opens a program and a specific
file Sometimes the file's extension with fire up the correct app, but
other times or when a specific parameter is needed, I have to assemble
the properties of the shortcut.

Is there a program that will do the building for me so that the
properties of the shortcut reads

c:\program files\programx\programx.exe -edit c:\my documents\work for
spring\to-do-list for this week.xxx

Any such utility?

Notice the "-edit" parameter in my example -- which is what
Netscape/Mozilla requires to enter edit mode so the file can be edited
rather than simply displayed.



--
Luigi M Bianchi
Science and Technology Studies
Room 2048 TEL Building
York University, 4700 Keele St, Toronto, Ontario, Canada M3J-1P3
phone: +1 (416) 736-2100 x-30104 fax: +1 (416) 736-5188
mail: lbianchi at yorku dot ca http://www.yorku.ca/sasit/sts/
 
JimmyJam said:
I know how to put a shortcut for a program on the desktop (DUH!), and I
know how to build a shortcut so it opens a program and a specific file
Sometimes the file's extension with fire up the correct app, but other
times or when a specific parameter is needed, I have to assemble the
properties of the shortcut.

Is there a program that will do the building for me so that the properties
of the shortcut reads

c:\program files\programx\programx.exe -edit c:\my documents\work for
spring\to-do-list for this week.xxx

Any such utility?

Notice the "-edit" parameter in my example -- which is what
Netscape/Mozilla requires to enter edit mode so the file can be edited
rather than simply displayed.

Make one shortcut for the program with the parameters, and put it in your
sendto. Add a "%1" at the end of the commandline in the shortcut.

If it's a program you use often, give it a promotion. That is, put the
entry in your explorer context-menu for that filetype. Such that, for
example, you right-click on an .htm file and choose "Moz Edit" (or however
you've named the entry). If you don't have experience with adding actions
for a filetype, post back, and I can outline the steps.

Here is something else. For your quick access to particular documents.
Put that whole line, such as the one you used in your example, into
the "RUN..." dialog of the start menu.

Just make sure to surround things in quotes, because of the spaces. All
one line (but use full paths):

RUN...
: "c:\program files\...\moz.exe" -nosplash -edit "c:\my documents\...\file.htm"

The startmenu's RUN dialog will keep this in its history. So you can use
its drop-menu to select it and re-use it.

There is also the advantage that it only keeps X items in its history,
which can be seen as self-cleaning, reduces leftover entries to documents
you've stopped using.

If the RUN dialog on the startmenu has an inadequate recent history for
your use, or perhaps you are already using it for more important entries,
and don't want it cluttered with a lot of these document shortcuts, then
you can add an additional Run utility to the root of your startmenu. I've
found about 4-5 or so that work adequately for this purpose. If you're
interested, I can look up their URLs.
 
Hi Karen,

Interesting discussion!
Make one shortcut for the program with the parameters, and put it in
your sendto. Add a "%1" at the end of the commandline in the shortcut.

I'm a total newbie when it comes to command switches, so I'm not sure what
the syntax would be. I tried the following, but it just brought me into
Moz browser mode:

"C:\Program Files\mozilla.org\Mozilla\mozilla.exe" -nosplash -edit "%1"

So, I must be off somewhere in the quotes or spacing.
If it's a program you use often, give it a promotion. That is, put the
entry in your explorer context-menu for that filetype. Such that, for
example, you right-click on an .htm file and choose "Moz Edit" (or
however you've named the entry). If you don't have experience with
adding actions for a filetype, post back, and I can outline the steps.

I have experience in adding actions for a filetype, but again, I've never
used command switches. So given the location of my Mozilla.exe file as
listed above, what should it read? I'm guessing it should be the same
answer as the sendto?
 
jason said:
I'm a total newbie when it comes to command switches, so I'm not sure what
the syntax would be.

On command switches, they're non-guessable, vary between each program,
and when a program supports them, a matter of copying whatever string(s)
mentioned in its docs.

The only universal principle is that "%1" at the end (which is called a
placeholder, says to the program "this file that I handed you"). Not
every programs need it. And perhaps only a minority these days need it
in quotes (the quotes are in case the program is confused by being handed
a file whose name has spaces). Yet it is extremely unusual for a program
to mind it being there. So handiest to have a standing habit of using it.

(Btw. DOS programs and commands are different. My pifs I add in a "%1 %2
%3 %4 %5 %6 %7 %8 %9" to the end. And some of the DOS progs I've set up
in sendto seem to like that, too. That's the outer scope of my current
knowledge in that realm, though.)
I tried the following, but it just brought me into
Moz browser mode:

"C:\Program Files\mozilla.org\Mozilla\mozilla.exe" -nosplash -edit "%1"

So, I must be off somewhere in the quotes or spacing.

I have experience in adding actions for a filetype, but again, I've never
used command switches. So given the location of my Mozilla.exe file as
listed above, what should it read? I'm guessing it should be the same
answer as the sendto?

You're right. Something's up. I don't know what.

When I'd tested the shortcut before posting, Moz opened up in edit mode
here. Just now, looking things over, I realized I had Moz settings to open
with a profile that was already telling it to start up in edit mode. So I
changed to a profile that said start up in navigator mode. With that done,
then the -edit switch didn't work.

I used to use these standard command switches regularly, with Netscape.
And the Moz document I downloaded a year ago had basically the same
switches. Yet, here we have something new involved...Mozilla preferences
overriding the command switch.

I need to read the docs, and see if I can learn how thing now work with
Mozilla. I'm posting in advance of having any clue, in case someone gets
to this thread early with some answers.
 
[correction on a tangential subject]
(Btw. DOS programs and commands are different. My pifs I add in a "%1 %2
%3 %4 %5 %6 %7 %8 %9" to the end.
I meant in my bats. I can't say to remember having ever tested adding
anything to the command in pifs.
 
Do you use profiles? I have now got success, instead of my previous fail, by
specifiying one of my user profiles to Mozilla.

mozilla.exe -p "Profile_Name" -edit "%1"

I didn't test without profiles. This is a very wild guess, but maybe Mozilla
might in that case still want a profile switch there, like this:

-p "default"
 
Netscape/Mozilla has an unusually big set of commandline switches. As to
those choices, this is the ref doc that I've used:

http://www.mozilla.org/docs/command-line-args.html

There is another doc over there, haven't read for whether it has any
additional information for Windows or not:

http://www.mozilla.org/quality/browser/front-end/testcases/cmd-line/

As to things not working until I added the specific profile switch, I don't
know how that is explained. It is true that I tended to always hand Netscape
and Moz a profile name in my shortcuts, but it never occurred to me that not
doing so would cause a problem such as it ignoring a startup command switch.

For now, I'll have to file the experience into the dunnowhy folder.
 
omega said:
Do you use profiles? I have now got success, instead of my previous
fail, by specifiying one of my user profiles to Mozilla.

mozilla.exe -p "Profile_Name" -edit "%1"

I didn't test without profiles. This is a very wild guess, but maybe
Mozilla might in that case still want a profile switch there, like
this:

-p "default"


Okay, my profile is "default", so I tried it with default, but no luck:

"C:\Program Files\mozilla.org\Mozilla\mozilla.exe" -p "default" -nosplash -
edit "%1"

Thanks for trying.
 
Okay, my profile is "default", so I tried it with default,
but no luck:

"C:\Program Files\mozilla.org\Mozilla\mozilla.exe" -p
"default" -nosplash - edit "%1"

Thanks for trying.

(I'm very late to this, so if this is not that to which y'all
refer, 'scuse me.)

I opened mozilla.exe with Resource Hacker and deleted the splash
screen bitmap.

Have a backup, of course.
 
Why aren't these switches more widely known, I wonder; would've save me from
"manually" removing the splash-screen....
(I'm very late to this, so if this is not that to which y'all
refer, 'scuse me.)

I opened mozilla.exe with Resource Hacker

Gotta love 'Resource Hacker'
( said:
and deleted the splash
screen bitmap.

Have a backup, of course.

I use Saltine's "CrkBak" v1.01 (copies dll/exe's to 'filename.extension.BAK')
for backing-up the original "Mozilla.exe", then lose the Moz splash-screen, &
delete R-H's backup-file.
 
(I'm very late to this, so if this is not that to which y'all
refer, 'scuse me.)

I opened mozilla.exe with Resource Hacker and deleted the splash
screen bitmap.

Sounds interesting. I'll have to look into that.

But, actually what the OP and I are trying to do is make a shortcut for the
sendto menu that will allow an html file to be opened in edit mode. I
tried the -edit switch, but it opens in browser mode. Karen said adding
the profile to the string would make it work, but it doesn't work with the
"default" profile (which is what I have).

So if anyone has any suggestions, let's hear them!
 
Why aren't these switches more widely known, I wonder; would've save me from
"manually" removing the splash-screen....

http://www.mozilla.org/projects/seamonkey/release-notes/m16-detail.html


--

....malcolm

Malcolm Reeves BSc CEng MIEE MIRSE, Full Circuit Ltd, Chippenham, UK
([email protected], (e-mail address removed) or (e-mail address removed)).
Design Service for Analogue/Digital H/W & S/W Railway Signalling and Power
electronics. More details plus freeware, Win95/98 DUN and Pspice tips, see:

http://www.fullcircuit.com or http://www.fullcircuit.co.uk

NEW - Desktop ToDo/Reminder program (free)
 
Sounds interesting. I'll have to look into that.

But, actually what the OP and I are trying to do is make a
shortcut for the sendto menu that will allow an html file
to be opened in edit mode. I tried the -edit switch, but
it opens in browser mode. Karen said adding the profile to
the string would make it work, but it doesn't work with the
"default" profile (which is what I have).

So if anyone has any suggestions, let's hear them!

Ok, what I do is goto folder options.
Edit the file type, .html, or whatever.
Add a new action, "Edit", or modify an exisisting edit action.
"&Edit" if you want an underlined hotkey on your right click
menu. Browse to the app you want to edit html files with. Might
need to add an "%1" to the end of the path. There is a space in
front of the first quote. You should now be able to edit html
files by right clicking and selecting, edit, to open with your
default editor. Maybe, this'll help.
 
Trying it again now, I cannot get the results I thought to have seen when
using profile switches. (So maybe, didn't even kill the cat. Instead turned
my back from even observing cat's state too quickly, in haste to write
results down in the lab logbook.) So might be best erase what I said about
profiles.

All sorts of weird complexities, in the working with just the simple
switches.

Works fine:

mozilla.exe -nosplash -edit
mozilla.exe -nopslash -browser

Works fine:

mozilla.exe -nosplash -edit "d:\somefile.htm"
mozilla.exe -nopslash -browser "d:\somefile.htm"

Now the rules as I have always seen them in every other damn case in the
world, it says I can use a placeholder for that file.

mozilla.exe -nosplash -edit "%1"
mozilla.exe -nopslash -browser "%1"

Yet, when I drop a file onto the above shortcuts, or use sendto to hand them
the file, things fall apart. Mozilla accepts the document, but ignores all
and any of those commandline switches.

That is totally strange, and I can't come up with any clue at all why this
broken result.
Edit the file type, .html, or whatever.
Add a new action, "Edit", or modify an exisisting edit action.

Now. As to using sendto, or using the context menu, I am continuously
promoting and demoting programs between the two places. I use the same
string for either one. Since the same string works for either one, I'd
think the same string that fails would fail equally in both places.

Yet, here things get weirder yet. This does in fact work in the exmplorer
context menu:

mozilla.exe -nosplash -edit "%1"

That breaks down all the laws of gravity etc for me. Why it would work
there, and not the other place.

Oh, but not done yet. The other one in explorer context menu, it explodes,
falls all apart.

mozilla.exe -nosplash -browser "%1"

Mozilla gets lost, unable to do anything, and says to me: "d is not a
registered protocol." D is the drive letter where the file that I handed
it was located. All of a sudden, with the same command that works normally
(eg mozilla.exe -browser file.htm OR mozilla.exe -browser www.site.com),
Mozilla expects that the argument be preceded by protocol type (eg file://
or http://)

So I submit. I change the explore action to this:

mozilla.exe -nosplash -browser "file://%1"

What do I get? Mozilla now takes the file, loads it. In a kiosk mode! Full
screen, no menus of any kind. I didn't say anything to about it about kiosk!

I have never witnessed such a bizarre web of inconsistencies. In something
that is normally basically simple: putting an open command in various
places.

Except this. I am right now trying to remember what GUI programs I've set
up in sendto, which supported various extra commandline parameters, as does
Mozilla. I'm having trouble, at least offhand, comming up with examples.

The times I usually hand a string of switches, it in a batch. So no I've
typed a .bat file that has this line:

mozilla.exe -nosplash -edit %1 %2 %3 %4 %5 %6 %7 %8 %9

I put a .pif shortcut to that bat in my sendto. And it seems to work. Send
an htm there and mozilla opens it in composer mode.

Next, I try the same approach with the -browser switch. Same mess as when
the explorer context menu. Expects to be told what protocol. And that told
the file protocol, I assume again I'd get that weird result of kiosk mode.

Tres complique!!! And my original post was about how straightforward and
simple this kind of thing is. That accursed lizard, it's inhuman.
 
My Name said:
I opened mozilla.exe with Resource Hacker and deleted the splash
screen bitmap.

Have a backup, of course.

Good tip, thanks.

Plus, it's one of those nice moments where we get to talk about Resource
Hacker in public -- Moz being open source. (Various other cleanings, menu
rearrangments, and similar, on more restrictively licensed progs, we'd have
to say were done by a friend's neighbors's relative's friend. <g> )
 
Except this. I am right now trying to remember what GUI programs I've set
up in sendto, which supported various extra commandline parameters, as does
Mozilla. I'm having trouble, at least offhand, comming up with examples.

After thinking about it, I can come up with examples. The msie -nohome
switch in explorer context menu. Or msiexec.exe (for .msi) it does extra
switches, such as /i "%1" %* . Sure I could now come up with a list.
Point of correction being, no generalization possible about not being
able to set up GUI progs with their extra switches.

Just, for this =particular= situration, it became necessary to treat it
the same way as a DOS/CLI thing. I do not understand =why= that approach
was needed here.
mozilla.exe -nosplash -edit %1 %2 %3 %4 %5 %6 %7 %8 %9

I put a .pif shortcut to that bat in my sendto. And it seems to work. Send
an htm there and mozilla opens it in composer mode.

Jason, I know that's a big hassle, to do the above. But if you're willing,
can you tell me if you get the same results I do?
 
omega said:
Now the rules as I have always seen them in every other damn case in
the world, it says I can use a placeholder for that file.

mozilla.exe -nosplash -edit "%1"
mozilla.exe -nopslash -browser "%1"

Yet, when I drop a file onto the above shortcuts, or use sendto to
hand them the file, things fall apart. Mozilla accepts the document,
but ignores all and any of those commandline switches.

That is totally strange, and I can't come up with any clue at all why
this broken result.


Now. As to using sendto, or using the context menu, I am continuously
promoting and demoting programs between the two places. I use the same
string for either one. Since the same string works for either one, I'd
think the same string that fails would fail equally in both places.

Yet, here things get weirder yet. This does in fact work in the
exmplorer context menu:

mozilla.exe -nosplash -edit "%1"

Way to go Karen!!! I'd rather have an entry in my Explorer context menu
than use the sendto menu anyway. So this is the perfect solution for me.
That breaks down all the laws of gravity etc for me. Why it would work
there, and not the other place.

Oh, but not done yet. The other one in explorer context menu, it
explodes, falls all apart.

mozilla.exe -nosplash -browser "%1"

Mozilla gets lost, unable to do anything, and says to me: "d is not a
registered protocol." D is the drive letter where the file that I
handed it was located. All of a sudden, with the same command that
works normally (eg mozilla.exe -browser file.htm OR mozilla.exe
-browser www.site.com), Mozilla expects that the argument be preceded
by protocol type (eg file:// or http://)

So I submit. I change the explore action to this:

mozilla.exe -nosplash -browser "file://%1"

What do I get? Mozilla now takes the file, loads it. In a kiosk mode!
Full screen, no menus of any kind. I didn't say anything to about it
about kiosk!

LOL! That is bizarre. Fortunately I don't need a browser switch, but
this is very interesting!
I have never witnessed such a bizarre web of inconsistencies. In
something that is normally basically simple: putting an open command
in various places.

Except this. I am right now trying to remember what GUI programs I've
set up in sendto, which supported various extra commandline
parameters, as does Mozilla. I'm having trouble, at least offhand,
comming up with examples.

The times I usually hand a string of switches, it in a batch. So no
I've typed a .bat file that has this line:

mozilla.exe -nosplash -edit %1 %2 %3 %4 %5 %6 %7 %8 %9

I put a .pif shortcut to that bat in my sendto. And it seems to work.
Send an htm there and mozilla opens it in composer mode.

I'd have to process what you're doing here since I don't use bat files
very often, but I'll definitely save this post. Never know when I'll
have to use this.:)
Next, I try the same approach with the -browser switch. Same mess as
when the explorer context menu. Expects to be told what protocol. And
that told the file protocol, I assume again I'd get that weird result
of kiosk mode.

Tres complique!!! And my original post was about how straightforward
and simple this kind of thing is. That accursed lizard, it's inhuman.

As always, Karen, you went above and beyond the call of duty .I'm not not
the only one who wants an "Edit with Composer" in the Explorer context
menu. Now we know how to do it. Thanks so much for your time.
 
Back
Top