/pwd command line option

  • Thread starter Thread starter Jonathan
  • Start date Start date
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
 
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.
 
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
 
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.
 
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)
 
Hi David,

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

Can't be done.
 
Back
Top