Results 1 to 13 of 13
  1. #1
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110

    Installation batch file

    OK, I've completed the Home Budget Management application and I can now switch the back-end between my production back-end, test back-end, and distribution back-end. Now I need to develop a process to install it on another computer. Back in the days when I was working on operating systems (a looooooong time ago) there was a thing called a bat file that contained all the commands to copy files and do set-up sorts of things. How is it done today?

    I want to copy files with the front-end and back-end in one directory and create other directories for storing back-up files, icon files, and help files. I also want to have an icon installed on the desktop that will start-up the database app. If someone can point me to information on how to do this I would greatly appreciate it. I have a number of people who want to test out the application and I want to be able to give them a flash drive and have them run a single command file to do all this.



    Any help will be greatly appreciated!

  2. #2
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    I think what you want is a Windows setup file creator. There are a bunch out there and the newer ones are GUI driven so you don't need to write any scripts. There are a good many that are also free so download a few and find one you like. I have not done this in years so I can't really recommend anything, but I should probably look into this myself as well.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You can still use a bat file, though they tend to be called .cmd files these days.
    You can also use VBS scropt which is a little like VBA

    Then you can buy an installer program with lots of bells and whistles.

    I just used a VBS script when I was using Access in work.

    Here is one I found, though I am not sure if I ever used it, as I used Bob Larsen's code, but it should give you an idea?

    Code:
    Option Explicit
    Dim strLocal, strRemote,strDBPath
    Dim oAccess
    Dim objFSO, objLocal, objRemote
    
    
    strlocal = "C:\DB\Employee.accde"
    strremote = "S:\DB\Employee.accde"
    strDBPath = LEFT(strLocal,InstrRev(strLocal,"\"))
    
    
    SET objFSO = CREATEOBJECT("Scripting.FileSystemObject")
    SET objLocal = objFSO.GetFile(strlocal)
    set objRemote = objFSO.GetFile(strremote)
    if objRemote.DateLastModified > objLocal.DateLastModified Then
        'objFSO.DeleteFile strLocal
        objFSO.CopyFile strRemote,strDBPath,True
        wscript.echo "Latest version installed"
    end if
    
    
    Set oAccess = CreateObject("Access.Application")
    oAccess.Visible = True
    oAccess.UserControl = true
    oAccess.OpenCurrentDatabase("C:\DB\Employee.accde") 
    
    
    Set objFSO = Nothing
    Set objLOcal = Nothing
    Set objRemote = Nothing
    Set oAccess = Nothing
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    moke123's Avatar
    moke123 is online now Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    It's been a while, but I've used SSE SetUp in the past. Pretty easy if I recall correctly.

    https://www.ssesetup.com/access.html
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by moke123 View Post
    It's been a while, but I've used SSE SetUp in the past. Pretty easy if I recall correctly.

    https://www.ssesetup.com/access.html
    Nice catch Moke
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    It's been a while, but I've used SSE SetUp in the past. Pretty easy if I recall correctly.

    https://www.ssesetup.com/access.html
    Excellent....Bookmarked for later use.

  7. #7
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110
    Thanks Moke123,
    This looks like exactly what I was looking for. I'll try it out and let you know what I think.

  8. #8
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110
    I downloaded SSE Setup and created a set-up file. It is pretty straight-forward. I used the set-up pgm to install my app on an older laptop. The set-up is running very slooooooow. It may be due to a slow internet connection, a slow laptop, or just a slow process. I'll update later after it finishes.

    I think I've done something wrong because the installation process has been going on for about 2 hours (kinda excessive, huh). It appears to have downloaded the Access 2013 runtime and now says "Running installation program. Please wait ..."

    I'm going to stop it and review the SSE Set-up set-up.

  9. #9
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110
    I stopped the process and restarted it. This time it only took30 seconds or so. When I tried to execute it I received an error message that said that the app was originally created in 32 bit Access. The problem is that I don't have any 32 bit machines. Now what do I do? I am so close yet so far away!

    willkr

  10. #10
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110
    Well, hush my mouth! I just discovered that my office installation is not a 64 bit install as I thought it was. i will have to install the 64 bit version tomorrow. Bummer!

  11. #11
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    It is not the bit of windows that matters, but the Office version.
    So if you have created it with 32bit Access, that is what is needed to run it, 32 bit runtime.

    You would need to conditional compile it to run it in both versions if there is a chance of doing that. Same with downloading correct bitness runtime.
    Most programs I have downloaded have been two separate programs, x86 or 64bit ?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  12. #12
    Join Date
    Apr 2017
    Posts
    1,681
    Quote Originally Posted by willkr View Post
    ... I want to copy files with the front-end and back-end in one directory ...
    Do you have a single user for this DB in future? Or are you having all front-ends for every user named differently? Or is front-end in this directory meant only for users making a copy of it in his/her own computer/network directory? Because every user must definitely have his/her own front-end!

  13. #13
    willkr is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2023
    Posts
    110
    This app is intended for home use only, so it will be in a single user environment on a single computer. However, it could be used in a multiuser mode. My wife and I both use it and they are both linked to the same be on the network.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Installation executable file
    By Vincent S in forum Access
    Replies: 6
    Last Post: 08-30-2019, 03:31 PM
  2. Cant run batch file from macro
    By tagteam in forum Access
    Replies: 1
    Last Post: 06-13-2019, 02:16 PM
  3. Replies: 4
    Last Post: 01-26-2012, 01:34 PM
  4. Run batch file
    By shay in forum Access
    Replies: 3
    Last Post: 12-15-2010, 09:47 AM
  5. Running Batch File
    By NoiCe in forum Programming
    Replies: 2
    Last Post: 03-21-2010, 07:05 AM

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
  •  
Other Forums: Microsoft Office Forums