Nice Easy One for You!

openmind's picture

He has: 945 posts

Joined: Aug 2001

Right,

To save on system resources I have my ColdFusion Server and RDS service on my desktop as a shortcut rather than in the startup folder. When I need them I just double click and bobs your uncle.

What I would like to do is have a single shortcut to launch these and other applications with one click. Can this be done?

Busy's picture

He has: 6,151 posts

Joined: May 2001

how about having a .bat file with commands in it so when double clicked the contents are run/open

openmind's picture

He has: 945 posts

Joined: Aug 2001

That'll do it!!! I sorta remember what a bat file is and how it works but could you remind me of how it works?

Thanks Busy

Busy's picture

He has: 6,151 posts

Joined: May 2001

I just suggested it because thats how my Apache/MySQL is set up Laughing out loud

the contents of the .bat file is:

start c:\php\mysql\mysqld-opt.exe
cd c:\php\apache
apache.exe -k start

openmind's picture

He has: 945 posts

Joined: Aug 2001

Ok, I figured out how to strat the apps that I want, is there anyway to close the command window once it has finished running or am I asking for the earth now Wink

openmind's picture

He has: 945 posts

Joined: Aug 2001

Ignore that last post, I figured it. Thanks Busy Smiling

taff's picture

They have: 956 posts

Joined: Jun 2001

Quote: Originally posted by flipper
Ignore that last post, I figured it. Thanks Busy Smiling

how?

openmind's picture

He has: 945 posts

Joined: Aug 2001

Quote: Originally posted by taff
how?

I just right clicked the .bat file and selected properties. Clicked the "Program" Tab and checked "Close on Exit".

I have hit another snag though. When it tries run the following line

C:\Program Files\Macromedia\Dreamweaver UltraDev 4\UltraDev.exe

it chokes and say it can't find the file with the following error:

Cannot find file 'C:\Program' (or one of its components). Check to ensure the path and filename are correct and that all required libaries are avaliable

Now I know the file and path are OK so I'm assuming its falling over on the space between Program and Files. How do I get round this?

Busy's picture

He has: 6,151 posts

Joined: May 2001

tried %20 in the .bat file as the space?

C:\Program%20Files\Macromedia\Dreamweaver%20UltraDev%204\UltraDev

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

This is DOS, right?

The paths then become something like this:

C:\PROGRA~1\MACROM~1\DREAMW~1\ULTRADEV.EXE

By using
C:\Program Files\Macromedia\Dreamweaver UltraDev 4\UltraDev.exe
the computer reads up to where the space is, then considers the first part as the whole string and the rest as other command parameters.

Busy, isn't %20 only for URLs?

Busy's picture

He has: 6,151 posts

Joined: May 2001

true, I forgot about DOS only being so many digits for filenames.

I know the %20 works in url and file/image names, not sure if it works in DOS or not.

openmind's picture

He has: 945 posts

Joined: Aug 2001

Quote: Originally posted by Abhishek Reddy
This is DOS, right?

The paths then become something like this:

C:\PROGRA~1\MACROM~1\DREAMW~1\ULTRADEV.EXE

By using
C:\Program Files\Macromedia\Dreamweaver UltraDev 4\UltraDev.exe
the computer reads up to where the space is, then considers the first part as the whole string and the rest as other command parameters.

That nailed it! Thankyou Abhishek and Busy. My knowledge of DOS is limited to changing directories and deleting stuff so I hadn't thought of that!

Thanks again!

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Glad to be of assistance, Phil. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.