Jump to content

Rightclick set attrib --->Hide,readonly


Ibrahim
 Share

Recommended Posts

come on bert i don't need an english lessons i just need to get started and chech this script by Someone i don't remember his name but was from the examples section----and it creates a right click item for shortcuts to get it's target

And why are u answering for Smashly????????

#NoTrayIcon

    $s_HKCRlnk = RegRead('HKCR\*', '')
    $slnkFile = RegRead('HKCR\' & $s_HKCRlnk & '\shell\Hide', '')
    If @error Then
        $i_Res = MsgBox(4+32+256, 'Hide', 'Add "Hide" item to shortcut context menus?')
        If $i_Res = 6 Then
            If Not RegWrite('HKCR\' & $s_HKCRlnk & '\shell\Hide', '', 'REG_SZ', '&Hide') Then
                MsgBox(16, 'Error', 'Error writing to registry')
                Exit
            EndIf
            RegWrite('HKCR\' & $s_HKCRlnk & '\shell\Hide\Command', '', 'REG_SZ', '"' & @ScriptFullPath & '" "%1"')
        EndIf
    Else
        $i_Res = MsgBox(4+32+256, 'Hide', 'Remove "Hide" item from shortcut context menus?')
        If $i_Res = 6 Then
            RegDelete('HKCR\' & $s_HKCRlnk & '\shell\Hide')
        EndIf
    EndIf

    $a_ShortcutInfo = FileGetShortcut($CmdLine[1])
    If @error Then
        MsgBox(16, 'Error', 'Invalid shortcut file.')
        Exit
    EndIf
    If $a_ShortcutInfo[0] <> '' Then
        FileSetAttrib (Chr(34) & $CmdLine[1] & Chr(34),"+H")
        
    Else
        MsgBox(16, 'Error', 'Could not read shortcut file.')
Link to comment
Share on other sites

To do what you requested in post 16 is not currently possible with AutoIt.

There was a reason I asked you to look up a compiled language. Because AutoIt is an interpreted language.

Link to comment
Share on other sites

You want to add something to the menu? Look up the registry codes. It is fully described somewhere in the MSDN.

If you want to add a menu set that dynamically changes depending on the file? You need to write a SHELL EXTENSION. This must be COMPILED and contain specific functions to be exported. Then you have to install it to the operating system.

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...