dcsimg
Results 1 to 5 of 5

Thread: Windows or Inno Setup keeps same Access 2000 file when installing my VB6 application?

  1. #1

    Thread Starter
    Addicted Member kutlesh's Avatar
    Join Date
    Jun 2018
    Location
    Skopje, Macedonia
    Posts
    189

    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.

  2. #2

    Thread Starter
    Addicted Member kutlesh's Avatar
    Join Date
    Jun 2018
    Location
    Skopje, Macedonia
    Posts
    189

    Re: Windows or Inno Setup keeps same Access 2000 file when installing my VB6 applicat

    Could somehow the Windows 7 32 bit virtual machine interferes when compiling?
    Last edited by kutlesh; Dec 5th, 2019 at 11:04 AM.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,860

    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.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,860

    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.
    Attached Files Attached Files
    Last edited by dilettante; Dec 5th, 2019 at 02:17 PM.

  5. #5

    Thread Starter
    Addicted Member kutlesh's Avatar
    Join Date
    Jun 2018
    Location
    Skopje, Macedonia
    Posts
    189

    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" ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width