Picture of How to make Batch files Install any file!
Ever want to give a download on an instructable, but it has to be in the correct folder? Here's how you can make a simple installer that can create multiple files, given you created it correctly. You will need

-a Windows NT (or higher) computer
-a file you want to install
-a place to put the file
Remove these adsRemove these ads by Signing Up

Step 1: The most basic of text editing

Picture of The most basic of text editing
Before we start programming we are going to have to open notepad.

Windows 95-2000

Windows XP-7

Start>All Programs>Acessories>Notepad

Then proceed to the next step.

Step 2: The Code

Picture of The Code
This time you have to create the code. But I will show you how. Make sure you write down the code in notepad.

Say you file has two lines that are

This is the best instructable ever!
Thanks to Super_Nerd

And you want to put it in the filepath

C:\Users\ Users name goes here\Desktop

You start the code with

@echo off

Otherwise every command would have a C:\Windows\System 32 in front of it.

Then for every line in the file put

echo data in the line>>filepath

For the filepath involving the username where the username has to be, put


So in our case the code would be

@echo off

echo This is the best instructable ever!>>C:\Users\%Username%\Desktop\file.txt
echo Thanks to Super_Nerd>>C:\Users\%Username%\Desktop\file.txt


Say you want to overwrite a file. To do so just make the >> to an >

> = Overwrite
>> = Add to file

Therefore to overwrite, make the first line have a > and the rest have >>.

See where the code says file.txt? That is the filename. Feel free to change it to whatever you want. If you don't add an extention it turns into a file. Confusing right? A file is a file with no extention, hence you have to choose what to open it with every time.

Step 3: Adding the 1s and 0s to the drive

Picture of Adding the 1s and 0s to the drive
AKA saving the file

Save it as something like installer.bat

It can be whatever you want as long as it ends in .bat or .cmd

Step 4: Fire it up!

Picture of Fire it up!
Now test your new creation by double clicking on the icon with the gears. As always comment any problems or ideas you had.

See Ya!
TamanbirS5 months ago

hey i want to install a specific file whenever my usb is inserted on a pc. ? is there any way to do. kindly revert back asap..

Super_Nerd (author)  TamanbirS5 months ago

I believe there is a way with a specific type of USB drive. I forget which brand, but there's one that interacts with the computer like a CD. Then you need to make an autorun file. I haven't ever done anything like that before, but I can remember seeing something like that before.

I have a sandisk pendrive and a windows 8.1. I have added a keylogger in my pendrive which can run on clicking on it but i want that the keylogger should automatically run on its own whenever pendrive is inserted and the second problem is the autorun file doesn't work for windows 8.1 because windows open the folder itself. Usually everyone have windows 8 so autorun isn't the solution to this thats why i wanted to run the keylogger itself whenever the usb is inserted. Kindly solve
Super_Nerd (author)  TamanbirS5 months ago

I'm sorry, but I don't know of any way to do that. That doesn't mean it's impossible, I just don't have much experience with Windows 8 to be able to help you. Good luck with your project though.

TamanbirS5 months ago

hey i want to install a specific file whenever my usb is inserted on a pc. ? is there any way to do. kindly revert back asap..

OwenH16 months ago

You can also download something I made. You can edit the code in the file and then copy and paste it into a batch file. Only 100 lines of code, enjoy:

If you have any problems you can email me at

Thanks, and I hope it works for you guys.

jakejakey1208 made it!11 months ago

I Have Created A Batch File That will let you create installer.exe files for free and very easily.
All you need is my InstallMaker.bat file and then it will say loading give it a second and then it will open the install maker.



This is 100% free and only 1 file must be downloaded.


bandicam 2014-06-11 21-21-28-395.jpg
Why did you put VBs in the starting image?

(Someone could get confused).
Super_Nerd (author)  Prof. Pickle2 years ago
Actually that is the WinXP image for a batch file. The image for a VBS file looks like this
Sorry, I meant the image at step 1

Sorry for the confusions
Super_Nerd (author)  Prof. Pickle2 years ago
Well the picture is more for the image of notepad than the code in it.
Fair enough.
Chad Baxter2 years ago
Why don't you join the Batch Homies Group and post your Batch Instructables?
Not really an installer... As far as I can see, it's writing strings to a file. Pree basic stuff, but good instructable :)
Super_Nerd (author)  threeflashes3 years ago
Well, it can be used to behave like an installer. Oh well, thanks for reading!