Adding Batch Files to VB Program Installer

February 2, 2012 at 21:05:31
Specs: Windows 7
I wrote some batch files that do simple commands to back up several files in a minecraft folder. But a friend of mine suggested making a GUI for it in VB. With the GUI made and all the batch files doing what they need to do, I need to know how to include the batch files into the installer for the GUI.

"setup.exe" So when I call a file such as this;

' Starts the process to copy files to the correct folder.

Private Sub BtnInstall_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnInstall.Click

it can find "Initial_Run.bat" for now though even if I have that batch file the application folder after "publishing" the vb code it gives an exception "System.Diagnostics.Process.Start() cannot find the file necessary"

Initial_Run.bat copies other batch files and creates folders under C:\MCBackup\, if you run that batch file the program still doesn't call the other batch files correctly, they also give the "System.Diagnostics.Process.Start() cannot find the file necessary"

I'm not the greatest with VB, I had one class in college for it 3 years ago and my book from that class doesn't help at all.

I'm using Visual Studio 2010 Ultimate

Review -

-Need to know how to include a batch file with the vb program so it can correctly call it.

See More: Adding Batch Files to VB Program Installer

Report •

February 2, 2012 at 22:18:14
I found it, have to right click the resource then under Build you make it "Content" and the next thing down "Always copy"

Report •
Related Solutions

Ask Question