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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell Multiple 2003.mdbs With Password 1

Status
Not open for further replies.

Du2good

Technical User
May 9, 2005
41
US
Need suggestions on best method to open and logon to multiple db's automatically, at any time of day, that have user level security applied which requires a name and password be supplied at open.

Five different mdbs open at different times automatically. The dbs are started between 3:00 AM to 7:00 AM, and they close automatically when their process is completed. The run time for the individual dbs varies between 5 minutes and 1.5 hours. The Windows Task Scheduler is used to control their start time. Everything is working correctly.

We are applying user level security the dbs. After user level security is applied the dbs will open and the Logon window will pre-fill with my name, but a password is required for the db to run. So somehow I will need to pass the password, when opening the db automatically between 3 and 7 AM.

My thought is the best method would be to discontinue using the Task Scheduler and create a ControlStart.mdb that will be left open 24 hours a day and would start any db at any time without regard of what may or may not already be running.

Currently user name is pre-filled…but I still require the password. It would be best to pass both the user name and the password when Shell is used. This is what I've got so far.

Retval = Shell("MSACCESS.EXE " & dbPath & "db1.mdb", 1)

Can the user name and the password be supplied using shell?
Should I stick with the Windows Task Scheduler and supply the user name and password in this method?
Suggestions?
 
OK, I've decided to continue using the Windows Task Scheduler. The article looks like it has the info I need.
I've added the switches /nostartup /user /pwd but something is wrong.
Below is the format used in the Run box of the Windows Task Scheduler and I've tried the same command line in the Run dialog box.

"J:\CCS\Recov\Import.mdb" /nostartup /user brain guru/pwd mypassword
When it executes the logon box appears with my name pre-filled in the name box, and the password box is empty. When I enter the password manually, the correct db opens and runs just fine.

I've tried using only the switch user and the name 'test' but the logon window still has my name instead of 'test'. This format doesn't change the name of the user in the logon window.
"J:\CCS \Recov\Import.mdb" /user test

I tried the above examples in the Run dialog box but the switches are still being ignored. When I enter the password manually the correct db opens and runs fine.

What am I missing here?
 
You have to launch the msaccess.exe program.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
So simple, yes, that was the missing part. Got it working with the task scheduler and Run.

Thank you so very much for your help PHV.

I hope next year is better for you than what 2008 was. All of your posts have been very helpful to me.

Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top