How can I make a click link to two files???

Sunday, March 21, 2004 by GreyFusion | Discussion: Stardock Software

I want to start two programs, by clickong one link. How would I go by doing this?
crofttk
Reply #1 Monday, March 22, 2004 9:39 PM
With a batch file that the link targets.



Powered by SkinBrowser!
paxx
Reply #2 Tuesday, March 23, 2004 11:25 PM

In case you dont know how to make a batch file, just create a new text file and write the following:

start notepad.exe
start calc.exe

Of course, replace notepad.exe and calc.exe with the program you want. Then save your text file with a .BAT extension (ex: launcher.bat). When you'll double-click it, it will execute the commands and launch your programs.  From there you can create a shortcut linking to the batch file.

CerebroJD
Reply #3 Wednesday, March 24, 2004 2:18 PM
Do you have to specify the path to the file? C:\folder\folder\foler\file.extension for example?
GreyFusion
Reply #4 Wednesday, March 24, 2004 3:35 PM
Ok, thanks guys. And yes, you would have to specify the path, unless the batch file is in the same directory as the two files.

crofttk
Reply #5 Wednesday, March 24, 2004 8:00 PM
Or, of course, unless the two files are in a directory or (separate) directories which are included in your "PATH" environment variable.



Powered by SkinBrowser!
Sput
Reply #6 Wednesday, March 24, 2004 8:51 PM
or...you could invoke 2 programs from one command line using the form:

cmd /c "start notepad & start notepad"

In DesktopX, create a URL object pointing to :

C:\WINDOWS\system32\cmd.exe

(or wherever on your system cmd.exe can be found - assuming windows NT/2k/XP)

Then set the arguments to:

/c "start notepad & start notepad"

and Show to Iconic.

This works by invoking an instance of the command processor, telling it to execute the command string on the line after it. The ampersand (&) allows the execution of multiple commands on a single line.

The apps etc can of course be changed, but you'll need to include the full path (or have the command on your PATH) as with comment #5.

The only advantage of this way is to avoid the need for a separate batch file. The principle is applicable to almost any application using shortcuts.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01