Open up encrypted FE with Command Prompt or Script not working (1 Viewer)

NauticalGent

Ignore List Poster Boy
Local time
Yesterday, 21:45
Joined
Apr 27, 2015
Messages
6,621
Good morning folks!

Playing around this morning, I did a quick db with a password. I can open it from file explorer with no issues - a quick prompt for the password and I'm in. However, when I try to do it from the command prompt: "C:\Program Files\Microsoft Office\root\Office16\MSAccess.exe" "C:\Users\18048\OneDrive\Documents\PassWordTest.accdb" /pwd PassWord

I get this:

1719410690884.png


No problem, I'll just type in the password, right? Wrong!
1719410774977.png


According to Google and ChatGPT, this is a known behavior and both sources have offered solutions. Before I go down those rabbit holes, I figured I would ask others who may have ventured down this road before...
 
I could be wrong, but I thought that /pwd switch was for ULS. No?

Sent from phone...

Edit: Yup, I thought so.
 
Found this on Colin's website:


1719412208540.png



Assuming he is right 🤓 , I guess you can't use a password switch with newer versions.

p.s. ULS?
 
So, what I was trying to do was set a password for the FE so that the users would have to use the application script (PowerShell) to open the FE. I have some savvy users who are going to their local copy and opening it up from there.
 
So, what I was trying to do was set a password for the FE so that the users would have to use the application script (PowerShell) to open the FE. I have some savvy users who are going to their local copy and opening it up from there.
If you're using PS, then you should be able to use an Access Application object to open the FE. I think. I'll have to search for some examples. I know it can be done with VBS though.
 
I have the script and everything works great. Every user has a FE copy on their PC in a specified folder: C:\Users\UserID\WMT_HSV\mydb.accdb.

Everything is fine except when there is an update. The PS script copies a fresh copy of the FE. If they bypass the script, no new copy - I am trying to force them to use the Application Shortcut that runs the script
 
I have the script and everything works great. Every user has a FE copy on their PC in a specified folder: C:\Users\UserID\WMT_HSV\mydb.accdb.

Everything is fine except when there is an update. The PS script copies a fresh copy of the FE. If they bypass the script, no new copy - I am trying to force them to use the Application Shortcut that runs the script
One way to do that is to use the /cmd switch. When the FE opens, you can check the Command function if it returns what you're expecting. Otherwise, simply quit the application and tell them to use the script instead. :)
 
That is one option I was thinking of as well, but thought it was a bit of a "kludge" so I abandoned it. But if the DBguy is doing it then it MUST be good! Thanks for your time!
 
That is one option I was thinking of as well, but thought it was a bit of a "kludge" so I abandoned it. But if the DBguy is doing it then it MUST be good! Thanks for your time!
LOL. Well, if I think of a more elegant solution, I will let you know. For example, you could also consider adding an empty table in the FE. When the app opens, check if this table is empty, if so, populate it with today's date, or something. If not, quit the application. Just a thought...
 
I have the script and everything works great. Every user has a FE copy on their PC in a specified folder: C:\Users\UserID\WMT_HSV\mydb.accdb.

Everything is fine except when there is an update. The PS script copies a fresh copy of the FE. If they bypass the script, no new copy - I am trying to force them to use the Application Shortcut that runs the script
I used to use Bob larsens's update, and that handled it beautifully.

There is also this version.
 

Users who are viewing this thread

Back
Top Bottom