3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Create a program to run .bat files?


Hello,

I want to run a .bat file when my computer starts up automatically..
I made a script in wordpad, saved as .bat to try and open the file, but I recieved weird error messages when trying to open the file, the script worked on other things such as opening microsoft word ( I did this to check if it was working)
I would like to know if there is any simple program I could write or download that could open this file (like your clicking it)

Many thanks

Oscar

7 answers
sort by: active | newest | oldest
Sep 2, 2011. 12:17 AMverence says:
Assuming, you're using Windows (TM)(R) 95/98/ME/2000/NT/XP/Vista/7, just put the Batchfile/Script in the 'Startup'-Folder. Anything in this folder will be executed on system start and Windows knows how to start .bat files. (Technically, the program to 'run' .bat files is cmd.exe (or command.exe depending on the Windows version) but .bat files are already connected to cmd.exe in the Registry).

Try your batch by simply double clicking on it. It should not produce any (unwanted) error messages.

You shouldn't use Wordpad to edit the batch, it might introduce unwanted formatting characters that can't be processed. Use Notepad instead.
Sep 2, 2011. 12:24 PMverence says:
In that case, don't put the .bat file itself in the Startup folder, but a link to it and use the properties of the link to make sure, it is executed in the target path.

- You can open the Startup folder by right clicking on the Start button and selecting 'Open' or 'Open all users'. If you select 'Open', it will start only, when you log on, if you select '..all users', it will start for anyone.

- Navigate to 'Program files\Startup'

- Open the an Explorer window with your .bat file.

- Drag your .bat file to the Startup folder with the right mouse button. On release, select 'Create shortcut here'*.

- Right-click the new shortcut and select 'Properties'. Make sure, the 'Execute in' is set to the folder of your .bat file

- Double click the shortcut to test it

- Reboot to test it live.

* The texts may be a bit off, as I translate from my German Windows.
Sep 4, 2011. 8:59 PMthegeeke says:
You can also google. Bat to. Exe converters or. Bat compilers... they also come in handy sometimes! :)
Sep 1, 2011. 10:57 PMlemonie says:

Autoexec.bat - look it up.

L

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!