?
Solved

Open Password Protected Access Database via Command Line or Batch File

Posted on 2009-05-08
12
Medium Priority
?
2,403 Views
Last Modified: 2012-05-06
Description pretty much says it all.. Here's what I am trying.. While it opens up the database the login dialog box still appears..
"C:\Program Files (x86)\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" /pwd PASSWORD /user USERNAME /wrkgrp "\\QARCdb\users\database\QARC.mdw" "C:\Data\Max\Live\QARC2003.mde"

Open in new window

0
Comment
Question by:kpurchase
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 4
12 Comments
 
LVL 75
ID: 24339286
try this:

"C:\Program Files (x86)\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" /pwd="PASSWORD" /user= "USERNAME" /wrkgrp "\\QARCdb\users\database\QARC.mdw" "C:\Data\Max\Live\QARC2003.mde"

mx
0
 

Author Comment

by:kpurchase
ID: 24339345
That makes

="USERNAME"

appear in the Name: text box of the logon dialog box interestingly enough.
0
 
LVL 75
ID: 24339431
Well ... this is an example I have that came from a Q here at some point.

Open with User Name and Password with Workgroup

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" /wrkgrp \\cotserver\vol1\departments\fire\databases\cityfire.mdw "\\cotserver\vol1\departments\fire\databases\cityfire personnel.mdb" /user="jammer" /pwd="pass"

Also, see these links:

http://support.microsoft.com/kb/209207

http://www.vb123.com/workbench/help/commandline.htm

http://office.microsoft.com/en-us/access/HP051883001033.aspx
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 85
ID: 24340900
If this is a database protected ONLY by a database password, then you cannot use a commandline parameter to do this.

if this is secured by ULS, then you can use the command line parameters as mx suggests.
0
 
LVL 75
ID: 24340921
I was assuming ULS since the original post showed

/wrkgrp "\\QARCdb\users\database\QARC.mdw" "C:\Data\Max\Live\QARC2003.mde"

 ^^^^^^^

mx
0
 

Author Comment

by:kpurchase
ID: 24354078
Hey guys it is not a database password but a password protected database with an associated (and required) mdw.. And using the code stated above gives me the same result where no password is placed into the password logon box and the username box has "=Brandon" (including the quotes). So I am not sure what I am doing wrong.. Here is what I am using now...

"C:\Program Files\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" /wrkgrp "\\QARCdb\users\database\QARC.mdw" "C:\Data\Max\Live\QARC2003.mdb" /user="Brandon" /pwd="123"
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 24354244
You don't use the "=" with these parameters; do this:

"C:\Program Files\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" /wrkgrp "\\QARCdb\users\database\QARC.mdw" "C:\Data\Max\Live\QARC2003.mdb" /user "Brandon" /pwd "123"

You also have your arguments in the wrong order. Should be:

"C:\Program Files\Microsoft Office 2003\OFFICE11\MSACCESS.EXE" "C:\Data\Max\Live\QARC2003.mdb" /wrkgrp "\\QARCdb\users\database\QARC.mdw" /user "Brandon" /pwd "123"
0
 
LVL 85
ID: 24354259
Also: You were presented with the login box since Access couldn't find a user name "=Brandon" ... if the Brandon user exists with a password of "123", then you won't see the login box.
0
 

Author Comment

by:kpurchase
ID: 24354277
That gets the username correctly entered but leaves the password entry blank still..
0
 

Author Closing Comment

by:kpurchase
ID: 31579598
Tried it with a different username and password and it worked perfectly... thanks.
0
 
LVL 75
ID: 24356339
"You don't use the "=" with these parameters; "

Scott ... I realized that example I posted was something you posted quite some time ago (I'm pretty sure). It had "=Scott" ... which I changed to "jammer"

mx
0
 
LVL 85
ID: 24357035
That doesn't surprise me <g> ....

If you're still getting the password prompt, then it would seem the Password you're passing in is incorrect.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question