Jump to content
Sign in to follow this  
d3mon

How to lock folder

Recommended Posts

d3mon

Hello,

Can I lock folder with password ?

For example when I click on folder with explorer and try to enter script forbiden access to it and ask password

Thanks for anyhelp !


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites
TehWhale

I would also like to know this. If that bribes anyone! ;)

Share this post


Link to post
Share on other sites
DW1

Just food for though (may be way off... in the middle of pulling the carbs off my bike), couldn't you run an app as a system ran service, and then have the system account lock down the permissions on a folder, meaning that only the system account can change the permissions back?

Share this post


Link to post
Share on other sites
ChromeFan

i don't know how to do it but i created a software which used this idea, create a desktop.ini file inside the folder with this

[.ShellClassInfo]

CLSID={645FF040-5081-101B-9F08-00AA002F954E}

and set folder and it's attribs to System+Hidden, now create another exe to change it back using a password. by this method you can lock and unlock any folder (Not Really). remember to disable "Show System files" using registry.

and in autoit you can try a very easy way!

Opt("WinTitleMatchMode", 2)
While 1
    If WinExists("My Folder Name") Then
        WinSetState("My Folder NAme", "", @SW_HIDE)
        MsgBox(0, "Folder locked", "Press ok to give the pass and enter into folder.")
; ask for the password here and set the window state again to @SW_SHOW
    EndIf
    Sleep(500)
WEnd

i know this is not a perfect way but i am just giving you the idea not a full working code!, i also want to know more about it. please let me know by PM if your problem got resolved 100%.

Edited by ChromeFan

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel

Share this post


Link to post
Share on other sites
ChromeFan

have you tried this DOS command?

CACLS c:\program files\{whatever} /E /T /C /G "Domain Users":F

AutoIt Code

RunWait(@ComSpec & ' /c CACLS "c:\program files\{whatever}" /E /T /C /G "Domain Users":F','',@sw_hide)

Another One is

_RunDOS("cacls " & '"d:\" & @UserName' & " /T /G " & @UserName & ":F /G Admin:F")

for more information about these commands "Help"

Edited by ChromeFan

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.