Advertisement
AZJIO

Найти объект ярлыка

Mar 19th, 2013
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.88 KB | None | 0 0
  1. #NoTrayIcon
  2. If $CmdLine[0] Then
  3.     $aLnk = FileGetShortcut($CmdLine[1])
  4.     Run('Explorer.exe /select,"' & $aLnk[0] & '"')
  5. Else
  6.     Switch @OSVersion
  7.         Case "WIN_XP", "WIN_XPe", "WIN_2000"
  8.             $LngName = 'Find object'
  9.             If @OSLang = 0419 Then $LngName = 'Найти объект'
  10.             RegWrite("HKCR\lnkfile\shell\folder", "", "REG_SZ", $LngName)
  11.             If @Compiled Then
  12.                 RegWrite("HKCR\lnkfile\shell\folder\command", "", "REG_SZ", '"' & @SystemDir & '\lnk.exe" "%1"')
  13.                 If Not FileExists(@SystemDir & '\lnk.exe') Then FileCopy(@ScriptFullPath, @SystemDir & '\lnk.exe', 1)
  14.             Else
  15.                 RegWrite("HKCR\lnkfile\shell\folder\command", "", "REG_SZ", @AutoItExe & ' "' & @SystemDir & '\lnk.au3" "%1"')
  16.                 If Not FileExists(@SystemDir & '\lnk.au3') Then FileCopy(@ScriptFullPath, @SystemDir & '\lnk.au3', 1)
  17.             EndIf
  18.         Case Else
  19.             MsgBox(0, 'Error', 'This system is not supported')
  20.     EndSwitch
  21. EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement