We help IT Professionals succeed at work.

Deploy my_app.mdb by Inno Setup¿

Hi:
Each time I install my ms access program On windows vista or windows 7 , using Inno setup
I get this worning
The databese "Myapp.mdb" is read-only
You won't be able to save changes made to data or object definitions in this database
Thin
I have to give the full control on security tab at the properties of the folder contains my program?
i use Inoo setup with windows xp several years ago, it is performing very will
Please help

1.JPG
Comment
Watch Question

Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
Where are you installing the application on the Vista or Wind7 machines? If you're installing to the Program Files directory, that directory is now read-only. You should instead be installing the app to one of the Users folders, like Users/AllUsers.

jkr
Top Expert 2012

Commented:
How are you including the .mdb file in your installation?
Mohammad Alsolaimanapplication programmer

Author

Commented:
LSMConsulting:
" If you're installing to the Program Files directory, that directory is now read-only. You should instead be installing the app to one of the Users folders, like Users/AllUsers. "
Thanks for the new information to me.
I feel tired of Microsoft
I think they Embarrass there clients with these fool changes on there operating system versions
When you have a ms product works properly on a particular OS
You will be Surprised with some features will not work properly on a new version of MS OS!
So many time I feel ashamed of my customers, when thy upgrade to new OS.
Take Microsoft scanner and camera wizard
I was able to control it via ms access in windows XP, but not in vista nor 2007!
jkr:
see the attach Inno code

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=InOut_app
AppVerName=InOut_app 7.2.0
AppPublisher=MS Office Small and Medium business co, Inc.
AppPublisherURL=http://www.solaimanms.com/
AppSupportURL=http://www.solaimanms.com/
AppUpdatesURL=http://www.solaimanms.com/
DefaultDirName={pf}\InOut_app 7.2.0
DisableDirPage=yes
DefaultGroupName=InOut_app
DisableProgramGroupPage=yes
LicenseFile=C:\AutoFeed_InOut_appInstall\ÍãÇíÉ ÍÞæÞ ÇáãáßíÉ.txt
InfoBeforeFile=C:\AutoFeed_InOut_appInstall\ÅÞÑÃäí.txt
InfoAfterFile=C:\AutoFeed_InOut_appInstall\ÊåäÆÉ ÈÇÎÊíÇÑ ÇáãäÊÌ.txt
OutputDir=C:\AutoFeed_InOut_appInstall
OutputBaseFilename=InOut_appSetup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\AutoFeed_InOut_appInstall\InOut_app.mdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\InOut_db.mdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\InOutHelp.doc"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\InOutDocuments\main_1232.jpg"; DestDir: "c:\InOutDocuments"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\ArabicRptHead.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\EnglishRptHead.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\Head.bmp"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\AutoFeed_InOut_appInstall\Logo.bmp"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\InOut_app"; Filename: "{app}\InOut_app.mdb"
Name: "{group}\{cm:ProgramOnTheWeb,InOut_app}"; Filename: "http://www.solaimanms.com/"
Name: "{group}\{cm:UninstallProgram,InOut_app}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\InOut_app"; Filename: "{app}\InOut_app.mdb"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\InOut_app"; Filename: "{app}\InOut_app.mdb"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\InOut_app.mdb"; Description: "{cm:LaunchProgram,InOut_app}"; Flags: shellexec postinstall skipifsilent

Open in new window

jkr
Top Expert 2012
Commented:
If the .mdb file is distributed on a CD or DVD, that might be the reason for the 'readonly' attribute - you could add the following:
[Run]
Filename: "cmd.exe"; Parameters: "/c attrib.exe -R {app}\*.mdb"

Open in new window

Mohammad Alsolaimanapplication programmer

Author

Commented:
jkr:
I try "
[Run]
Filename: "cmd.exe"; Parameters: "/c attrib.exe -R {app}\*.mdb"
"
it dose not work
But you Know what?
Always when I install it . it works for the first time
Then if I close Myaccess.mdb, and open it again, I receive this warning!
I raise up the security property photo for my file "PalaceGarage 1.0.4"
I found out that there are two users
One is Administrator(amna-TOSH\Administrators)
Look at the full control he has.
When I install the program, I use install as an Administrator
May be that’s why it is work always for the very first time

The second user as you can see in the second photo is
Users(amna-TOSH\Users)
Look at the read only access he has.

1.PNG
2.PNG
Mohammad Alsolaimanapplication programmer

Author

Commented:
when i open it again i receive this warning
then i change the security to full control for that user, and then it works properly
jkr
Top Expert 2012

Commented:
Have you tried the following then?
[Files]
Source: "C:\AutoFeed_InOut_appInstall\InOut_app.mdb"; DestDir: "{app}"; Flags: ignoreversion; Permissions: everyone-modify
Source: "C:\AutoFeed_InOut_appInstall\InOut_db.mdb"; DestDir: "{app}"; Flags: ignoreversion; Permissions: everyone-modify

Open in new window

Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
You cannot get around UAC using methods such as that. I believe jkr was referring to running that command IF you're installing from a CD/DVD, but not via a download file.

MS has long recommended you NOT install writeable files to the Program Files directory, so you really cannot blame MS for that.

IMO, you should install your application to the Users folder or the My Documents folder, depending on your platform.
Mohammad Alsolaimanapplication programmer

Author

Commented:
1- i do not installing from a CD/DVD
2- my point was (it was doing well in windows XP!), thats why i,m wondering
3- i change my inno setup to Users/allusers file , and it was the same problem
when lunching program after installation, it works good, may be becouse of i run the installation file as an administrator, but when i close ms access and reopen it again, i recieve this worning. then when i give the (Users(amna-TOSH\Users)) full cotrol to that folder(any ware, even if it is in pogram files or in users folder) it works good. and no more worning messags comes again!
4- is there any proper way you advice me to follow, when deploying ms access apps to customers.
please
do you know what? when i copy and past my files to program files, it works properly!
thanks to all of you, i feel very happy. i learn much of you
i am "one man show service" but i feel i am a powerful company becouse of your advices
my best regards
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
<when i copy and past my files to program files, it works properly>

When you do it on YOUR machine, or when you do it on another machine?

< i change my inno setup to Users/allusers file , and it was the same problem>

Can you tell us EXACTLY which folder you installed your app to?

As to advice, I would encourage you to review the material here: http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=ee2a1d38-88a9-43b3-95bc-7e962f0b6030&displayLang=en



Mohammad Alsolaimanapplication programmer

Author

Commented:
i install it on windows 7 (Arabic version)
i found out Arabic folder with the name "c:\Users\ComonUsers" but this my translation to that folder because it is written in Arabic
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
But when testing, did you install this on YOUR machine, or on someone else's machine?

You would need to test your application on a machine running Windows 7, while logged in as a typical (i.e. non-Admin) user. This would tell you what sort of troubles you can expect. MS (nor any other company that supplies developer's tools) can determine what you need to do with your program, so it's impossible for them exactly determine the best location for your application, the correct settings, etc etc. That's up to you to decide.

Access has a long and noted history of being somewhat difficult to deploy, but IMO a lot of that is because it seems so simple to deploy an Access application when compared to a VB or .NET application with many dependencies. One of the greatest strength of Access - it's ease of use - is also one of it's biggest downfalls, at least in my opinion.
jkr
Top Expert 2012
Commented:
Have ypu tried adding "Permissions: everyone-modify" like above?
Mohammad Alsolaimanapplication programmer

Author

Commented:
Have ypu tried adding "Permissions: everyone-modify" like above?
yes i had. but nothing actually
here is my setup
after install please send me the hard disk number, to resend the license
PalaceGarageSetup.exe
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
I think you misunderstand: YOU should install it on a testbed environment running Windows7 (or whatever environment you need to emulate). If you're going to distribut software professionally it is incumbent on YOU to setup some sort of testing environment where you can do these sorts of things. You can use virutal machines software (like vmWare or Virtual PC, for example), partitioning, "ghosting" software, or even setup different physical machines. Whatever the method, you must do this so that you can support your customers. It's very, very difficult to track down a bug that ONLY appears on Windows7 boxes with MDAC 2.8 and the runtime version of Access if you cannot exactly emulate that environment.

An MSDN subscription is invaluable for things like this. They are expensive, but that's just the cost of doing business, at least in my opinion.
Mohammad Alsolaimanapplication programmer

Author

Commented:
thanks to every body