Forum Discussion

Access_Jim's avatar
Access_Jim
Copper Contributor
Jan 31, 2025
Solved

Start Access from .bat file as specific user?

Hi,

           I need to run an Access macro from a .bat file as a different user.   Is there a way to use the start command and the runas command at the same time?    I want to do something like this:

 runas /user:Me start /b "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.exe" "\\Data\MyDatabase.mdb" /x TheMacro

 

           Anyone know a good way to do this?

  • This runs here:

    RunAs /user:"domain\username" "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE d:\folder\application.mdb /x TheMacro" 

     

  • Gustav_Brock's avatar
    Gustav_Brock
    Iron Contributor

    This runs here:

    RunAs /user:"domain\username" "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE d:\folder\application.mdb /x TheMacro" 

     

Resources