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

Shell command to open secured db

Status
Not open for further replies.

MKH2001

Technical User
Jan 7, 2003
90
GB
I have a shell command to open regular non secured db using:
Code:
Call Shell("W:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe " & MyDb & Addit & dbName, 1)

However I have another db in the mix that I need to open which is secured I can force it open from a normal desktop shortcut:
Code:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\Program Files\PMNet\PMNet.mdb" /excl /user "PMNetUser" /ini "C:\Program Files\PMNet\PMNet.ini" /pwd "PMNetUser"/wrkgrp "C:\Program Files\PMNet\PMNet.mdw"/runtime

But need to be able to do it within application tried

Code:
Call Shell("W:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe " & MyDb & Addit & dbName /excl /User "PMNetUser" /ini MyDb & Addit & Init /pwd "PMNetUser" /wrkgrp = MyDb & Addit & UserGroup /runtime)

But that doesn't work.
My Syntax is obviously wrong somewhere (doesn't seem to get passed /pwd before hinting issue with "PMNetUser" and refers to requiring a list seperator or ).
Any pointers?

Basically need means similar to the desktop short cut opened from within the app, enforcing use of the ini and mwd files and forcing the appropriate User and Password.
 
-Bump-

Just incase noone been in over new year )
 
Try:

Code:
Call Shell("W:\Program Files\Microsoft Office\OFFICE11\MSACCESS.exe " & MyDb & Addit & dbName & " /excl /User ""PMNetUser"" /ini" & MyDb & Addit & Init & " /pwd ""PMNetUser"" /wrkgrp = " & MyDb & Addit & UserGroup & " /runtime")

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top