Windows or Inno Setup keeps same Access 2000 file when installing my VB6 application?
I am using Inno Setup to create installer for my VB6 application.
The installation consist of only MyApp.exe, and the Access 2000 mdb file where the links to tables reside.
I keep compiling with newer mdb file with old links removed and new added. It keeps installing the same mdd file with old links to tables from several builds before.
Cannot resolve where is the problem. Is somehow Windows 7/10 caching the mdb file and copies the same file over and over again from builds before?
Or Inno Setup is caching the same file and puts it again in the installer?
I know this is not the right forum for this sort of question but I had to ask. Move it to appropriate forum section if needed.
Last edited by kutlesh; Dec 5th, 2019 at 05:36 AM.
Re: Windows or Inno Setup keeps same Access 2000 file when installing my VB6 applicat
I'd guess your No No Setup script is dumping the database into some protected filesystem location. Then when programs run they see a virtualized copy created the first time somebody ran one of your programs against it.
Re: Windows or Inno Setup keeps same Access 2000 file when installing my VB6 applicat
Your installer should create an appropriate folder, set security on it as required, then copy the database there.
Example in VB6 that punts and just gives Everyone Full Control with inheritance:
Code:
Option Explicit
Private Sub Main()
Const ssfCOMMONAPPDATA = &H23& 'Now also known as ProgramData.
Dim Path As String
With CreateObject("Shell.Application").NameSpace(ssfCOMMONAPPDATA).Self
Path = .Path
End With
Path = Path & "\SomeCompanyName"
On Error Resume Next
MkDir Path
Err.Clear
Path = Path & "\SomeProductName"
MkDir Path
On Error GoTo 0
'Grant Full Control to Everyone:
SyncShell.Shell "ICACLS """ & Path & """ /grant *S-1-1-0:(OI)(CI)F /T /Q", vbHide
MsgBox "Done"
End Sub
Typically you'd want to grant just the permissions required, perhaps even file by file.
BTW: icacls.exe wasn't available until Vista. See the CodeBank for examples of doing the same thing via API calls in VB6.
Last edited by dilettante; Dec 5th, 2019 at 02:17 PM.
Re: Windows or Inno Setup keeps same Access 2000 file when installing my VB6 applicat
I found a workaround by just making a folder in Documents and copying those two files and then making a shortcut to desktop.
I have full control over the mdb so I can change whatever I like inside of it.
However, if I ever need to work with VB6 on Windows 10, I might need to check those lines of code.
Also maybe check options in Inno Setup.
By the way, why do you call it "No No Setup script" ?