Advertisement
Guest User

FF4 AppID by danielkza

a guest
Jan 18th, 2011
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.63 KB | None | 0 0
  1. Global Const $PrefsPath = @ScriptDir & "\data\profile\prefs.js"
  2. Global Const $PrefsContent = FileRead($PrefsPath)
  3. If @error Then Exit 1
  4.  
  5. Func GetAppID($prefs)
  6.     Local Const $RegexMatch = StringRegExp($PrefsContent, 'user_pref\("browser.taskbar.lastgroupid",\s*"([^"]+)"\);', 1)
  7.     If @error Then Return SetError(1, 0, "")
  8.  
  9.     Return $RegexMatch[0]
  10. EndFunc
  11.  
  12. Global Const $AppID = GetAppID($PrefsContent)
  13. If @error Then Exit 1
  14.  
  15. Run(StringFormat('"%s\mkshortcut.exe" -output "%s\Mozilla Firefox.lnk" -target "%s\FirefoxPortable.exe" -appid "%s"', _
  16.     @ScriptDir, @ScriptDir, @ScriptDir, $AppID), "", @SW_HIDE)
  17. If @error Then Exit 1
  18.  
  19. Exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement