Jump to content
Sign in to follow this  
AZJIO

shortcut, find the object, for WinXP

Recommended Posts

AZJIO

http://pastebin.com/SNbAhSK0

#NoTrayIcon
If $CmdLine[0] Then
    $aLnk = FileGetShortcut($CmdLine[1])
    Run('Explorer.exe /select,"' & $aLnk[0] & '"')
Else
    Switch @OSVersion
        Case "WIN_XP", "WIN_XPe", "WIN_2000"
            $LngName = 'Find object'
            If @OSLang = 0419 Then $LngName = 'Найти объект'
            RegWrite("HKCR\lnkfile\shell\folder", "", "REG_SZ", $LngName)
            If @Compiled Then
                RegWrite("HKCR\lnkfile\shell\folder\command", "", "REG_SZ", '"' & @SystemDir & '\lnk.exe" "%1"')
                If Not FileExists(@SystemDir & '\lnk.exe') Then FileCopy(@ScriptFullPath, @SystemDir & '\lnk.exe', 1)
            Else
                RegWrite("HKCR\lnkfile\shell\folder\command", "", "REG_SZ", @AutoItExe & ' "' & @SystemDir & '\lnk.au3" "%1"')
                If Not FileExists(@SystemDir & '\lnk.au3') Then FileCopy(@ScriptFullPath, @SystemDir & '\lnk.au3', 1)
            EndIf
        Case Else
            MsgBox(0, 'Error', 'This system is not supported')
    EndSwitch
EndIf

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  

×