I have VB.NET System ;
I wanna to make setup (.exe) for the program.
The Program depend on SQL Server Database.
How I can make it exe file with the database, and to install all the configuration on any PC.
What I shall do according to the connection string ; since the server name will change?
I don't have background in that ; any helpful articles or information ?

2 Years
Discussion Span
Last Post by basit_3

Typically in a program you find something called "Preferences" or "Option" or "Settings" this is the user section, the user own choice of inputs. use this in your program so you can get for example the access file path and password to use it in your connection string. so you need to save these inputs, how to do so?
there are two ways, the old way which you can save them in a .ini file or the new one that i recommand its my.settings
in your project properties go to settings and name a couple of settings like access and password. in your program when the user hit the save button for the option run this

'let's say you have 2 textboxes(dbfile and pass)
my.settings.access = dbfile.text
my.settings.password = pass.text

therfore your connection string should be like this

"Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source='" & my.settings.access & "';" & "Persist Security Info=False;" & "Jet OLEDB:Database Password=" & my.settings.pass & ";"

now you can make the installer for your "EXE" program
go to your project properties >> publish >> publish wizard..

but before there are 2 thing to take care of:
1) when the user install your application the "application files" and "prerequisites" in the publish section will be automatically installed on the user machine
so make sure you include everything in the application files
2) the user machine platform
if the targeted machine is 64bit platform,you should assign your app to 64bit
but if its a 32bit platform dont do anything
if you want both platform(64bit and 32bit) assign your app to X86bit
go to Build - Configuration Manager - Active Solution platform - new - new platform select X86 or X64bit

good luck


On the File menu, point to Add Project, and then click New Project..
In the Add New Project dialog box, click Setup and Deployment Projects under Project Type, and then click Setup Project under Templates
then cheak primary output from source file ,
after editing your installer build it

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.