/pwd command line option

J

Jonathan

Hello,
I have a password-secured database. I want to use the /pwd option on a
command line that I will execute in a VB program with the Shell function. I
can't seem to get this to work. What I have is:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"\\server\db-path\db1.mdb" /pwd password

Access launches but I'm being prompted for a userid and password. How can I
get around this?

Thanks
Jonathan
 
R

Rick Brandt

Jonathan said:
Hello,
I have a password-secured database. I want to use the /pwd option on a
command line that I will execute in a VB program with the Shell function. I
can't seem to get this to work. What I have is:

"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
"\\server\db-path\db1.mdb" /pwd password

Access launches but I'm being prompted for a userid and password. How can I
get around this?

The /pwd parameter is for User Level Security, not a file-level password.
 
J

Jonathan

Rick:
I take it that you are telling me that I can't pass the file-level password
as a parameter on the command-line.

-Jonathan
 
R

Rick Brandt

Jonathan said:
Rick:
I take it that you are telling me that I can't pass the file-level password
as a parameter on the command-line.

That's right, you cannot.
 
D

david epsom dot com dot au

The file association registration for .MDB files discards
command line parameters (any command line parameters) before
passing the file name to MSACCESS.EXE.

Three possible suggestions are:
1) Change the registry settings for .MDB files, so that
the command line parameters are not discarded
2) Use a different file extension, and make your own registry
settings, or

3) Create a shortcut directly to MSACCESS.EXE with whatever
command line parameters you want, including the name of a
database and /PWD /USER /WRKGRP parameters as desired.

(david)
 
J

Joan Wild

Hi David,

He's trying to pass the database password on a command line, not
username/password.

Can't be done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top