Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

security & /compact command line 1

Status
Not open for further replies.

votegop

Technical User
Feb 22, 2002
127
US
Is there any way to compact a secured .mdb via a desktop shortcut using /compact without the user having to log in?
 
You can use jetcomp.exe but you will still need to supply a user id and a password if you want to compact a secured database. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Thanks for the reply. I was afraid that was the answer. [sad]
 
You can use the shell command to open the database in exclusive mode and compact it. Just specify the username and password in the command line.

I do this every night on my system to compact a database after it updates. I don't have the exact command line options with me right now, but you can find it if you search the help file for command line options.

I also have all my desktop shortcuts include my username and password, so I don't have to type them in.
 
Thanks GDGarth.

At first I didn't like this idea because I assumed you'd have to use the username/password of a member of ADMINS to do the compact (and I wouldn't want that username & password sitting in a shortcut command line for prying eyes to see).

Suprisingly, you don't have to be a member of ADMINS. Any user will do just fine.

For future readers of this post, the command line I use is:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\MyDirectory\MyProgramFE.mdb" /user"anyuser" /pwd"thatuserspassword" /wrkgrp "C:\MyDirectory\MyMDW.mdw" /excl /compact

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top