Use Shell API commands within VBA to manage Windows environment. I have very little knowledge of Shell commands. I use Shell to copy file into zip folder and to copy the frontend down to user computers.
Maybe Shell has what you need.
Use Shell API commands within VBA to manage Windows environment. I have very little knowledge of Shell commands. I use Shell to copy file into zip folder and to copy the frontend down to user computers.
Maybe Shell has what you need.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Why don't you just create different user profiles on your computer? Whatever password you were going to use with your batch file you could assign to a single Administrator. The administrator could be named whatever you choose. Place important stuff in the Admin's User Docs or a folder/drive partition that is owned only by the Admin. Additional users could be anything from Power Users to Special profiles.
I am going to take a wild guess that a power user could access a DB in a folder owned by Admin. I would imagine they will get a prompt to access the folder and the Power user's right to execute will allow enough permissions for the DB to run. Other permissions required to run script and stuff will be managed through the machine's rights to the folder. Just a guess on my part, but sounds more simple that writing script to adjust permissions of a folder back and forth. You may ultimately find out that you have to toggle Read rights back and forth via PowerShell or something.
First let's start using the correct terminology. Much time has already been wasted (from what I can tell) just trying to figure out what you mean by "locking" a file or folder. Using precise terms in computer-discussions is extremely important.
Do you mean setting a file's attributes to read-only? Hidden? Etc?
Do you realize that in Windows, setting a file to read-only (for example) will successfully make it read only, but also anyone can toggle it to NOT read only, so the attribute is virtually useless to prevent deliberate, intentional hacking etc.
You may want to look into hiding things inside Winzip encrypted files, or else talking to the IT department at your company about setting active directory permissions to solve your need.