Smart Shortcut

Discussion in 'Software' started by Scousetechie, Jan 27, 2004.

  1. Scousetechie

    Scousetechie Specialist

    Does anyone know of a way to make a single shortcut that will open 2 applications at the same time in winxp? Or is there any software out there that will do it?

    Thanks in advance.
     
  2. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

  3. Wisewiz

    Wisewiz Apprentice's Sorcerer

    Scousetechie and Halo:
    Hey, guys! That link article is correct, Halo, but he goes a roundabout way to it. You don't want to make a new bat file from shortcuts that you already have in use.

    Here's a .bat that works perfectly, and any .bat modelled on it will work perfectly, too:

    start %SystemRoot%\editpad.exe
    start %SystemRoot%\system32\calc.exe

    It opens my text editor and my calculator with one shortcut.

    Just open your text editor and create the bat with the complete paths to the executables of the two programs you want to start -- on two lines.

    Put "start" and a space at the start of each line (see example above).

    Save that as a .bat file (.bat extension, not .txt extension).
    Now right-click your new bat file and Create a Shortcut to it. Right-click the shortcut and use Properties in the shortcut to set it to run Minimized, and to assign any icon you want to it.

    That'll do 'er.
     
    1 person likes this.
  4. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Cheers for the simplified steps Wise ;)


    I'm going to have a go at this one later as I use a few design apps and that .bat would come in handy in opeing the 3 apps I use.
     
  5. Wisewiz

    Wisewiz Apprentice's Sorcerer

    No probs, Mr. H!

    I use several of those. So long as you use the "start" word, and use the FULL path, and set the new shortcut to the .bat file to run Minimized, there shd be no problem.

    The start command keeps the bat from stopping after the first line is executed. A simple sequence of lines with paths to executables won't work. It'll stop after the first-line exe is launched. The Minimized switch keeps the Command Prompt window from popping up while the bat is starting the two exe files.

    Assigning an icon of your choice to the shortcut just makes it easier to FIND it the next time you need it.
     
    1 person likes this.
  6. alanc

    alanc MajorGeek

    Nice tip, Wisewiz. I'm gonna keep that one handy. :)

    It should be noted that in 2k/XP the batch file can also be named with a .cmd extension. Just an FYI.
     
  7. Scousetechie

    Scousetechie Specialist

    I knew I could count on you guys!

    Many Thanks Wiz!!!
     
  8. Wisewiz

    Wisewiz Apprentice's Sorcerer

    Welcome, techie. Sometimes a very simple solution does the trick.
     
  9. Scousetechie

    Scousetechie Specialist

    @Wisewiz. Seems to work fine until I try to start something that resides in C:\Program Files. i.e.

    start %SystemRoot%\Program Files\Windows Media Player\wmplayer.exe
    start %SystemRoot%\system32\calc.exe

    I get a message which says:

    "Cannot find the file 'C:\WINNT\Program' or one of it's components"

    If I OK the message the calc starts but not Media Player.

    Any suggestions?
     
  10. Wisewiz

    Wisewiz Apprentice's Sorcerer

    Yeah, I think your path is wrong for accessing wmplayer.exe.

    Program Files is not normally INSIDE "WINNT".

    %SystemRoot% takes you to the main drive, and to the folder on that drive that has the OS files in it.

    Try this (but check to make sure it makes sense with your layout of files):

    start C:\Program Files\Windows Media Player\wmplayer.exe
    start C:\WINNT\system32\calc.exe

    Check it out and let us know.

    EDIT: Y'know, it's entirely MY fault that you didn't get that path right the first time around. I posted a small sample bat
    start %SystemRoot%\editpad.exe
    start %SystemRoot%\system32\calc.exe
    and both of the lines began with start %SystemRoot%.
    My apologies for not making it clear that the %SystemRoot% part isn't in the bat path unless your target is an exe that's in the OS folder.
     
    Last edited: Jan 27, 2004
  11. Wisewiz

    Wisewiz Apprentice's Sorcerer

    One more thing, techie:

    It just occurred to me that batch files have problems with long file names and folder names with spaces in them.

    The workaround is the old DOS 8.3 naming system.

    If I have an exe called mininote.exe that I want to run from a batch, and it's in a folder called Mininote inside Program Files, then
    C:\Progra~1\Mininote\mininote.exe
    will run it.

    But there's a double problem with trying to launch WMplayer with a batch. Not only is the Program Files name a problem for batches, but the Windows Media Player folder name compounds the problem, AND using "Window~1" won't cut it if there is more than one folder in Program files that has a name beginning with "Windows."

    The batches work perfectly if there's only ONE spaced or long name in the path, but your very first example is problematic.

    (Thought about it and solved it easily. See my next post.)
     
    Last edited: Jan 27, 2004
  12. Wisewiz

    Wisewiz Apprentice's Sorcerer

    Turns out to be a snap. The solution to getting around
    1. long filenames and spaces in more than one part of the path, and
    2. ambiguous short foldernames in the path
    is as easy as Creating a new shortcut for your batch file.

    I have my WMPlayer.exe inside Windows Media Player, inside Program Files, too.

    I decided on a folder to store a new shortcut to wmplayer.exe. I chose (of course) a folder with a short foldername: C:\AATemp. (Well, actually, I created that one to use for the tests to help me get to the solution.)

    OK. I went to my wmplayer.exe in Explorer and right-clicked and chose Create Shortcut. Then I moved my shortcut to C:\AATemp. (And I renamed the shortcut "wmplayer", so that the name didn't have that exe extension anymore -- and of course I used a name that had no spaces in it.)

    I then used my new shortcut in a batch as follows:

    start C:\Progra~1\MiniNote\mininote.exe
    start C:\AAtemp\wmplayer

    I right-clicked my newly created .bat file (make sure it's a .bat and not a .txt) and created a shortcut to it.

    Then I opened the Properties of the shortcut and set it to run Minimized, and I gave it a nice icon while I was there.

    Then I double-clicked the shortcut, and my Mini-Note pad and my Windows Media Player launched. Hoo-hoo-hoo-rah!

    Hope this all helps you get that double-launch (from a single icon) worked out to your own satisfaction, Scousetechie. If not, come on back and we'll have another go at it.
     
  13. Scousetechie

    Scousetechie Specialist

    Thanks Wiz, I'll try that. I did think that it had something to do with the DOS 8.3 naming system but I couldn't figure out what I needed to do.

    I'll let you know how it goes.

    Thanks again!
     
  14. DavidGP

    DavidGP MajorGeeks Forum Administrator - Grand Pooh-Bah Staff Member

    Works like a treat Wise ;)
     
  15. Scousetechie

    Scousetechie Specialist

    Yeeesssssssssssssssssssssssssssssssssss!!!!!!!!!!!!!!!!!!!!!

    Thanks Wiz
     
  16. Wisewiz

    Wisewiz Apprentice's Sorcerer

    Glad it worked. Thanks for the support, Halo.
    Thanks for the patience, Scousetechie. Sorry it took so many tries and corrections. Next time I'll try harder to get it right the first time around.
     
    Last edited: Jan 27, 2004

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds