You may recall, at the beginning of the course, I briefly introduced you to batch files.
This was when you clicked on an icon on your desktop and your browser opened up with the corresponding
websites or websites you specified within the batch file itself.
But what I would like to do now is to go into a little bit more detail with batch files, and I'd like
to show you how you can start applications with a batch file on your computer.
Now, once you've created this batch file, I'll show you how you can get this batch file to start automatically
when you start your computer.
OK, so like I said, I want to start applications with a batch file, so to do this, you have to get
the target information.
So one way to do is I'm just going to show my icons on my desktop.
And the application I want my batch file to start is going to be Photoshop, but I can see I don't think
I actually have a shortcut on my desktop.
So what I'm going to do is I'm just going to go to the magnifying glass here.
And just right click on Photoshop here.
I'll open its file location.
I'm going to right click on it.
I'm just going to create a shortcut.
OK, so this recommending I put it on the desktop, so I'll just say yes to that, and I think I'm also
going to do this with Illustrator as well.
Another program that I use quite a lot, so I'll come to show more options.
I'll create another shortcut, and I'll just click on, yes.
OK, so here's Illustrator, and here's Photoshop.
So, like I said, you need the target information so you can just right click on the application.
I go to properties and it's this information here.
So just click inside of there and hold down control and a to select all of it, our right click and
then click on copy.
And they can just get rid of this next thing now is to open up the notepad, so goes magnifying glass
and I'll open up my notepad.
Now, just like in the first batch file we created.
The code is pretty much the same.
There's just a few differences.
In fact, I think there's only one difference that we have to make.
So it starts with at ECHO.
Then type of.
Start and this is the big difference here.
You put in to double quotes.
Move along, put in two double quotes again.
And then in between these two quotes is where the target information goes.
So just hold down control and press V and I can see I've ended up with too many quotes yet, so I'll
just get rid of the extra ones.
Then I'll go to file save as and I'm going to go to my desk top.
I just remember that you have to give the dot bat extension and set this to all files and then click
Save.
So now I'll get rid of this, and if I were to double click on this now, hopefully Photoshop should
start up.
OK, so that works, okay, so I'll just get rid of this.
Now, if I want to add Illustrator as well, I could just right click go to properties and this is already
selected, so I'll just right click, go to copy.
Get rid of this here.
I'll go to my application.
Sorry, my batch file, and I'll go to show more options.
And I'll click on Edit.
Now, unlike when we created the batch file to open up the various websites within your Chrome browser,
you can't just put another two quotes in here at the end and then add your other target information,
but rather you have to go underneath type and start.
Put another two quotes in, and I'm going to go ahead and hit control plus v because I remember the
last time the double quotes were already there, a whole down control press asked to save this.
And remember, it's already saved us a batch file.
So we already have that dot bat extension and I can get rid of this now.
And if I double click on this, Photoshop and Illustrator should start now.
One thing to be aware of with this is you don't want to overload your computer.
So, for instance, Photoshop and Illustrator are quite heavy programs in terms of the amount of processing
power they use, but my computer's quite up-to-date so it can handle it.
But that's definitely something you want to be aware of.
All right, so the next thing now is to show you how you can get this batch file to start automatically
when you turn on your computer.
Now one thing to be aware of here, and I've kind of just touched on it a second ago.
This type of batch file can use quite a lot of processing power.
And when you first turn on your computer, it already has quite a few things to think about.
Now, usually, Windows has got quite a good management system, and it just does things well, I suppose
one step at a time.
But you will find that your boot up will be quite slow.
If you're asking it to open up maybe various batch files with different websites and applications and
things like that.
So it's good to just be aware of that.
All right.
So how do we do this?
Well, let's be honest with you, it's really straightforward.
You can hold down the windows key and press are on your keyboard, and this will open up the run command.
You can also just go to the magnifying glass here and then go to search and type in run command or just
run.
But this is already open.
And all you want to do is just type in Shell.
Colon.
Start up, then click OK.
This will open up, all you have to do is just select the batch file you want, start up to open for
you, right click and will copy it.
And then just paste it into here.
Now you could do the exact same thing with the batch file that opens up the various websites within
your Chrome browser.
But with regard to using shall start up to start applications, there's no point in actually creating
a batch file.
All you would have to do.
Just go to the application, right click go to copy and just paste in the application here.
And that's all you have to do to get these applications to start up.
But I don't need Photoshop start up when I turn on my computer, so I'm going to press delete.
OK, so that's what I wanted to show you with regard to batch files.
Just two things to take away from this.
Just remember, if you want to edit your batch file, you can just go to the batch file itself.
Right click Go to show more options and then go to edit.
And also the other thing was, if you're not particularly good at remembering your code or what is known
as syntax, then just keep these two batch files on your computer for future use.