Jump to content

How to lock folder


d3mon
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...