Click to See Complete Forum and Search --> : Creating set up using the Inno setup
gautamshaw
Jan 15th, 2010, 12:27 PM
i really worked hard to write these on the inno script to create the setup:
[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputDir=d:\output
[Files]
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Final_Etech.exe"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Etech.mdb"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\
though it worked but in the program files the database files can be seen as well as opened directly after the program gets installed.......
i dont want the .mdb files to appear in the program files after the installation is completed........
how to do this?
please help
gautamshaw
Jan 15th, 2010, 12:46 PM
75641
also you can see the 0.0.0.0 in the attachment.....how to change this?
gautamshaw
Jan 15th, 2010, 08:36 PM
So i am trying to make a setup file of my project that i made in vb.net.....vs2005.My project contains of two .mdb database.
I modified my earlier script and came to this bit of script....
[Setup]
AppName=eTech Online
AppVerName=eTech Online version 0.7
DefaultDirName={pf}\eTech Online
DefaultGroupName=eTech Online
OutputDir=d:\eTech Online
Compression=lzma
SolidCompression=yes
[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
Name: de; MessagesFile: "compiler:Languages\German.isl"
[Messages]
en.BeveledLabel=English
nl.BeveledLabel=Nederlands
de.BeveledLabel=Deutsch
[Files]
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Final_Etech.exe"; DestDir: "{app}";
Source: "E:\Softy\DOT_NET\.NETFramework_2.0_Installer\dotnetfx.exe"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Etech.mdb"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\AdminLogin.mdb"; DestDir: "{app}";
Source: "d:\Readme.txt"; DestDir: "{app}"; Flags: isreadme
[Icons]
Name: "{group}\eTech Online"; Filename: "{app}\Final_Etech.exe"; WorkingDir: "{app}"
this bit of script is creating the setup.exe well but i have a few problems with this:
after installing the setup,i get these files in the eTech Online folder of the program files:
75648
but i dont want the database to be exposed here in the program files after installation.......since the user can directly use the database by opening it with a double click:o
and the second problem lies with my post#2....
please solve these two problems.....thank you
gautamshaw
Jan 16th, 2010, 09:19 AM
i have solved the #2 problem but the #3 problem with the database is still unsolved
Pradeep1210
Jan 16th, 2010, 09:26 AM
1. Since you would be using the mdb file in your application, you would need to copy the file there anyways. The only way I can think of is to put a password in the mdb file and use that password inside your application to open it.
2. I'm not too proficient at InnoSetup. But in the [Setup] section, look for some variable to define the setup version. I'm sure there must be one.
gautamshaw
Jan 16th, 2010, 09:29 AM
please have a look at this sir:
http://agiletracksoftware.com/blog.html?id=4
they are talking about dome .dat file.....
do i need to convert my .mdb into .dat format?
Pradeep1210
Jan 16th, 2010, 09:35 AM
Whether you name it as .mdb or .dat, you would need to copy it somewhere for your program to use it, Isn't it?
gautamshaw
Jan 16th, 2010, 09:38 AM
i did this much.......
[Setup]
AppName=eTech Online
AppVersion=0.7
AppVerName=eTech Online version 0.7
AppCopyright=Copyright © eTechOnline 2007-2009
VersionInfoVersion=0.7
VersionInfoCompany=eTechOnline
DefaultDirName={pf}\eTech Online
DefaultGroupName=eTech Online
LanguageDetectionMethod=uilanguage
OutputDir=d:\eTech Online
Compression=lzma/fast
SolidCompression=yes
LicenseFile=d:\license.txt
[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: nl; MessagesFile: "compiler:Languages\Dutch.isl"
Name: de; MessagesFile: "compiler:Languages\German.isl"
[Messages]
en.BeveledLabel=English
nl.BeveledLabel=Nederlands
de.BeveledLabel=Deutsch
[Files]
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Final_Etech.exe"; DestDir: "{app}";
Source: "E:\Softy\DOT_NET\.NETFramework_2.0_Installer\dotnetfx.exe"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Etech.mdb"; DestDir: "{app}";
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\AdminLogin.mdb"; DestDir: "{app}";
Source: "d:\Readme.txt"; DestDir: "{app}"; Flags: isreadme
[Run]
Filename: "{app}\Final_Etech.exe"; Description: "{cm:LaunchProgram,MyProgram}"; Flags: nowait postinstall skipifsilent
[Icons]
Name: "{group}\eTech Online"; Filename: "{app}\Final_Etech.exe"; WorkingDir: "{app}"
cant go further......need some help :(
gautamshaw
Jan 16th, 2010, 09:41 AM
The only way I can think of is to put a password in the mdb file and use that password inside your application to open it.
how to do this sir?
Pradeep1210
Jan 16th, 2010, 09:54 AM
1. Open your mdb file in Ms-Access in Exclusive mode.
2. On the menubar, click Tools > Security > Database Password
3. Enter a password of your choice.
4. Save and close the file.
Now whenever you try to open the file, password would be required.
This means your program must also provide the password to access the file.
You should pass the UserId=Admin and password=your password in the connection string to open the file in your program.
gautamshaw
Jan 16th, 2010, 10:04 AM
but sir when we install something in our pc then after installation the database does not appears in the program files............
what is the logic behind this sir........how do they do this?
if i use a setup an deployment project,create a setup and give it to my client then along with my projects setup,i also need to provide the .net framework setup(if it is not installed then)
i am using inno to compactly bind all the setups needed into a single setup and then giving it to the client only a single setup.......thats why i ve been going through this hard path.......
please suggest ........
Pradeep1210
Jan 16th, 2010, 11:32 AM
Obviously those programs are not using any mdb files. Otherwise how would you make that file available to your program??
gautamshaw
Jan 16th, 2010, 11:44 AM
may be that they used to integrate the database into their setup...........
i think that it is very much possible to do the same using the inno.........may be sir but i am not sure about this.....
can you please collect this bit of information for me.....
gautamshaw
Jan 16th, 2010, 12:00 PM
ok pradeep i tried the concept that you gave with password protecting the database and then creating the setup using the inno........i tried it out and it worked..........now the .mdb files created in the program files after the setup installation cant be opened by the users since they are asking for password..........
thanks for the idea for password protecting the database.......
but still i would like to know how to do the #13?
please give some more helpful ideas pradeep :)
Pradeep1210
Jan 16th, 2010, 12:04 PM
Usually they don't rely on ms-access databases and its security for their work. They usually have their own custom databases and custom classes to use them.
gautamshaw
Jan 16th, 2010, 10:45 PM
good morning pradeep,
may i know where do you live in india?
what do you mean by the term "custom database" in your last post?
gautamshaw
Jan 17th, 2010, 12:25 AM
after a lots of trouble i did this:
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\Etech.mdb"; DestDir: "{app}";Attribs: hidden
Source: "C:\Users\Gautam\Documents\Visual Studio 2005\Projects\Final_Etech(Submit)\Final_Etech\bin\Debug\AdminLogin.mdb"; DestDir: "{app}";Attribs: hidden
and got it working......
you can see an extra thing: the attribute of the database is set to hidden.....
though it fulfils my requirement but is it the right way to hide the database?
it is working fine on my machine but i dont know how it will react in the users machine and thats the main thing behind all these hard work :)
Pradeep1210
Jan 17th, 2010, 12:55 AM
what do you mean by the term "custom database" in your last post?
A flat file in which you manage the records yourself. Data is usually kept encrypted for security reasons.
you can see an extra thing: the attribute of the database is set to hidden.....
though it fulfils my requirement but is it the right way to hide the database?
it is working fine on my machine but i dont know how it will react in the users machine and thats the main thing behind all these hard work :)
I think setting the hidden attribute on a file to secure it is the most unprofessional and unreliable solution to it. What's the use of putting your mdb file as hidden? It is even weaker way than putting a password on it, since it will be shown by just a setting change in Windows Explorer. And it may also raise a suspision to the user why the file is hidden - malacious intents etc.?`
gautamshaw
Jan 17th, 2010, 01:43 AM
thats really a very very good logic pradeep.......
at the same time i just checked the set up that i created in the inno......
Is it possible that when the user clicks the setup file(that i made by he inno) then along with the setup installation,one more file gets automatically installed-the .net framework installer(i already included this .net framework installer while creating the setup of inno).....
how to do this sir?
:(
Pradeep1210
Jan 17th, 2010, 01:52 AM
I think you would need to add it under the [Run] section (with appropriate options passed to the dotnetfx.exe to check that it is not already installed).
gautamshaw
Jan 17th, 2010, 03:39 AM
ok i did it....it was indeed in the [Run] section pradeep....
so all the problems are solved except the database one(though it is solved if i put a password to the database)
but frankly speaking pradeep i dont like the database to be present in the program files after the setup installation completes....and one very very important idea that you have given is not to HIDE the database since it may come into the users mind that its some kind of virus or malecious program of his machine........
is it possible to make the database invisible?
if i make the database invisible then is there any problem pradeep?
please suggest
Pradeep1210
Jan 17th, 2010, 07:49 AM
No.. It is an access database file so it is an access database file. Whatever you do, it will remain the same. And your program must use it. So the file must necessarily be present.
Some of the tricks people use are:
1. Hide the file (set hidden attribute)
2. Change the file extension so that it doesn't open in access by default on double clicking.
3. Password protect the file.
4. Leave access altogether and build your own database system.
Everything except the last one (4th point) is unreliable. Hidden files can be shown, file extension doesn't matter for a clever user, passwords can be broken etc.
The 4th method is your only way if you are too concerned about your data. But that too depends on how good/bad coder you are. :)
HowTo
Jan 17th, 2010, 07:59 AM
i have got another concept :)
first i will create the setup of my project using the setup and deployment project,then i will bind both te setup.exe and the .net framework exe into the inno script and finally run both of them in the [Run] script.......and thus completing my installation........
doing this will definitely hide my .mdb in the program files after the setup installation.....
how about this?
Suggest about this.....
gautamshaw
Jan 17th, 2010, 08:10 AM
sounds good........have you tried it?
suggest about this pradeep.....
Pradeep1210
Jan 17th, 2010, 11:31 AM
Unless you have done something wrong, the mdb file should already be inside the setup.
I guess the problem was how to make it unavailable once the application has been installed (in Program Files) and the mdb file along with the other application files have been created there, isn't it?
gautamshaw
Jan 17th, 2010, 12:23 PM
by the term "build your own database system" are you trying to mean that i need to use the custom database(flat/text) files for storing the data of my application and the contents of the file should be in encrypted format?
Is this all what i need to do to create a custom database?
one more thing : does the flat and text file the same?
Pradeep1210
Jan 17th, 2010, 12:54 PM
by the term "build your own database system" are you trying to mean that i need to use the custom database(flat/text) files for storing the data of my application and the contents of the file should be in encrypted format?
Is this all what i need to do to create a custom database?
one more thing : does the flat and text file the same?
Yes exactly.
But a database system is not just sorting. And it's not easy creating one. All depends on your needs.
You would have to develop methods to extract data from it and extract it in an efficient manner. e.g. Ms-Access/other standard database systems support the SQL language to extract data from them and they support Indexes on tables for fast retrival etc.
gautamshaw
Jan 17th, 2010, 01:12 PM
though i am a student right now and dont know about the professionals......but may i know does the professional programmers dont use the database and they find it comfortable and secured working with the text files for storing information rather than using the database?
Pradeep1210
Jan 17th, 2010, 01:32 PM
Just as I said, it depends on what level of data security required. If suppose the cost of your entire application is just $50 or $100 would you like to spend that much amount of time coding a DBMS system??
In most practical cases Ms-Access, Sql Server, Oracle, MySQL etc. (I mean already existing databases - tried and tested) are used.
gautamshaw
Jan 17th, 2010, 01:39 PM
which of the above four database that you mention is free of license.......ie,can be used free of cost?
mysql is free and oracle is not......this much i know but what about the other two?
Pradeep1210
Jan 17th, 2010, 01:44 PM
Ms Access is paid, but you can distribute .mdb files free.
SQL Server has a free version - Sql Server express edition
Oracle - Paid
MySQL - free
Be aware that in all of them (except Ms-Access) your database can be opened and data read freely. Ms-Access is an exception in the sense that it supports a password put on the database.
gautamshaw
Jan 17th, 2010, 01:50 PM
if i want to encrypt the contents of a file then what are the possile procedures for this?
how to encrypt the file contents?
Pradeep1210
Jan 17th, 2010, 02:02 PM
You are repeating the same question again and again.
If you encrypt your file (by any means), how will your program read the data from it?? You will then have to decrypt it on the fly when the application is running. And that just adds another extra unnecessary burden as the file would be created for application to read the data anyways.
gautamshaw
Jan 17th, 2010, 02:11 PM
you cant understand what i tried to ask pradeep....
what are the means to encrypt the contents of a file?
dilettante
Jan 17th, 2010, 02:25 PM
You don't need MS Access at all. Access just happens to use the Jet database engine, and Jet 4.0 has been part of Windows for a long time now.
It is possible to use Jet directly from VB6 without ever having a copy of MS Access (both for development and deployment). A VB6 program can readily create an MDB file out of thin air when required.
If you require security the Jet security model is actually pretty good. The problem is that it can be complex, and to make it simple for MS Access users a lot of things default to a pretty insecure state. The Microsoft Access Security Apparatus (http://www.grahamwideman.com/gw/tech/access/accesssec/index.htm) provides a nice overview.
An alternative might be the ACE database engine introduced with MS Access 12.0 (2007). ACE can be acquired from Microsoft for free and appears to be redistributable. ACE can handle both .MDB and .ACCDB databases and can be used much like Jet 4.0 can. ACCDBs do not support the Jet MDB security model, but they do offer more advanced data encryption than Jet does.
Data encryption does indeed add overhead. This may not be a problem for your application though unless it makes very heavy use of the data.
Many applications use Jet MDBs with no encryption or security. Often they'll use an alternate file extension as already described (store.bin instead of store.mdb for example).
Another thing they'll sometimes do is install the MDB file into a folder under COMMONAPPDATA. The installer needs to create this folder, set its security to allow it to be read/write for Everyone, and copy the initial MDB file into it (or let the program create one there on first run if need be). Most users will never go hunting there anyway.
You never put an MDB file or other data file that requires updating by the program into Program Files anyway. On most systems that is a location secured against writing by users, and starting with Vista even "admin" users don't have write access without elevation.
What's so secret anyway?
dilettante
Jan 17th, 2010, 02:27 PM
One way you might encrypt data yourself is to use the crypto API (CAPI) or its COM wrapper (CAPICOM) which is less work in VB6.
gautamshaw
Jan 17th, 2010, 02:34 PM
One way you might encrypt data yourself is to use the crypto API (CAPI) or its COM wrapper (CAPICOM) which is less work in VB6.
is it posible to encrypt the data using these in vb.net?
can you refer me a site or some ebooks wherefrom i can learn these encryption as well as decryption methods?
gautamshaw
Jan 17th, 2010, 02:35 PM
"You never put an MDB file or other data file that requires updating by the program into Program Files anyway. " :
why?Please explain......
gautamshaw
Jan 17th, 2010, 02:42 PM
when i create a setup and deployment project in .net,then the setup that is finally created is basically an integration of the exe and the .mdb file,is not it?
and when we install the setup then an installation file appears in the program files,is not it?
dilettante
Jan 17th, 2010, 03:48 PM
"You never put an MDB file or other data file that requires updating by the program into Program Files anyway. " :
why?Please explain......
Program Files folders are meant to be read-only for users. This helps avoid the users accidentally deleting critical files or altering them. It also prevents malware infection because the EXEs, DLLs, etc. can't be overwritten by malicious code.
Installers can place individual files wherever they need to go.
The .Net Framework has encryption namespaces that wrap the crypto API.
gautamshaw
Jan 18th, 2010, 10:32 PM
Many applications use Jet MDBs with no encryption or security. Often they'll use an alternate file extension as already described (store.bin instead of store.mdb for example).
how can i change the extension of a database from .mdb to .bin?
after all my program has a connection string that will look for a database with an extension .mdb......so if i change this .mdb to .bin then my program cant find the database.......
please suggest how to go for this:)
dilettante
Jan 19th, 2010, 12:04 PM
You just change the connection string in the program to use BIN, XYZ, or whatever instead of MDB. The actual value of the extension used isn't important to the Jet OLEDB Provider, it accepts whatever file name you tell it to open.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.