SHARE
TWEET

Portable Edge Updater

a guest Sep 20th, 2019 172 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoTrayIcon
  2. #Region
  3. #pragma compile(FileVersion, 1.0.0.0)
  4. #pragma compile(ProductVersion, 3.3.14.5)
  5. #pragma compile(ProductName, Portable Edge (Chromium)
  6. #pragma compile(Icon, Edge Updater.ico)
  7. #pragma compile(inputboxres, false)
  8. #pragma compile(Compression, 5)
  9. #pragma compile(CompanyName, Bens Rumpelkammer)
  10. #pragma compile(UPX, False)
  11. #AutoIt3Wrapper_Icon=system-software-update.ico
  12.     #AutoIt3Wrapper_OutFile=Updater.exe
  13.     #AutoIt3Wrapper_UseUpx=n
  14.     #AutoIt3Wrapper_UseX64=n
  15.     #AutoIt3Wrapper_Res_Comment=Updater for portable Microsoft Edge (Chromium)
  16.     #AutoIt3Wrapper_Res_Description=Updater for portable Microsoft Edge (Chromium)
  17.     #AutoIt3Wrapper_Res_Field=Developed by|Ben
  18.     #AutoIt3Wrapper_Res_Field=Productname|Portable Edge Updater
  19.     #AutoIt3Wrapper_Res_Field=Productversion|0.9.0
  20.     #AutoIt3Wrapper_Res_Field=Made by|Ben
  21. #EndRegion
  22. ;7zr.exe (https://www.7-zip.org/sdk.html)
  23. ;curl.exe (https://curl.haxx.se/download.html)
  24.  
  25. #include <misc.au3>
  26. #include <GUIConstants.au3>
  27. #include <StaticConstants.au3>
  28. #include <ColorConstants.au3>
  29. #include <Array.au3>
  30.  
  31. Opt("MustDeclareVars", 0)
  32. Global $update_can, $update_dev, $update_beta, $update_stable, $canaryversion, $developerversion, $betaversion, $stableversion
  33. Global $c643, $c863, $d643, $d863, $b643, $b863, $s643, $s863, $tcheck, $cxx3, $cxx4, $cxx9, $done2, $done ,$updall
  34. Global $edgeupdatedir, $edgedir, $edgechannel, $edgelink, $version, $appid, $edgearch, $sicon, $arinstversion, $arversion
  35. Global $UserAgent
  36.  
  37. If _singleton("Portable Edge Updater.exe", 0) = 0 Then
  38.     ProcessClose("Portable Edge Updater.exe")
  39. EndIf
  40. If ProcessExists("msedge.exe") Then
  41.     If @OSLang = 407 Then
  42.         $ask = MsgBox(4, "Edge Updater", "Laufender Edge muss beendet werden bevor das Update gestartet werden kann. Edge jetzt beenden?")
  43.     Else
  44.         $ask = MsgBox(4, "Edge Updater", "Existing Edge must be quit before update can start. Quit Edge now?")
  45.     EndIf
  46.     If $ask = 7 Then
  47.         If @OSLang = 407 Then
  48.             MsgBox(0, "Edge Updater", "Edge Updater beenden.")
  49.         Else
  50.             MsgBox(0, "Edge Updater", "Quit Edge updater.")
  51.         EndIf
  52.         Exit
  53.     Else
  54.         ProcessClose("msedge.exe")
  55.     EndIf
  56. EndIf
  57. $tcheck = "0"
  58. Global $arinstdir[9] = ["Edge Canary x64", "Edge Dev x64", "Edge Beta x64", "Edge Stable x64", "Edge Canary x86", "Edge Dev x86", "Edge Beta x86", "Edge Stable x86", "Edge"]
  59. Global $arappid[8] = ["msedge-canary-win-x64", "msedge-dev-win-x64", "msedge-beta-win-x64", "msedge-stable-win-x64", "msedge-canary-win-x86", "msedge-dev-win-x86", "msedge-beta-win-x86", "msedge-stable-win-x86"]
  60. Global $archannnel[8] = ["Canary", "Developer", "Beta", "Stable", "Canary", "Developer", "Beta", "Stable"]
  61. Global $arupdater[8] = [2, 6, 7, 8, 1, 3, 4, 5]
  62. Global $aricon[8] = ["4", "8", "9", "0", "4", "8", "9", "0"]
  63. _instversion()
  64. $udpall = ""
  65. GUICreate("Edge Updater", 330, 300)
  66. Opt("GUICoordMode", 0)
  67. $canaryversion = GUICtrlCreateLabel("", 15, 30, 200, 25)
  68. GUICtrlSetFont(-1, 12)
  69. If @OSArch = "x86" Then
  70.     $canary = GUICtrlCreateButton("x86", 226, -1, 50, 25)
  71.     If IsDeclared("c863") Then GUICtrlSetTip(-1, $c863)
  72. Else
  73.     $canary = GUICtrlCreateButton("x86", 201, -1, 50, 25)
  74.     If IsDeclared("c863") Then GUICtrlSetTip(-1, $c863)
  75.     $canary64 = GUICtrlCreateButton("x64", 51, -1, 50, 25)
  76.     If IsDeclared("c643") Then GUICtrlSetTip(-1, $c643)
  77. EndIf
  78. If @OSArch = "x86" Then
  79.     $developerversion = GUICtrlCreateLabel("", -226, 30, 200, 25)
  80.     GUICtrlSetFont(-1, 12)
  81.     $dev = GUICtrlCreateButton("x86", 226, 0, 50, 25)
  82.     If IsDeclared("d863") Then GUICtrlSetTip(-1, $d863)
  83. Else
  84.     $developerversion = GUICtrlCreateLabel("", -252, 30, 200, 25)
  85.     GUICtrlSetFont(-1, 12)
  86.     $dev = GUICtrlCreateButton("x86", 201, 0, 50, 25)
  87.     If IsDeclared("d863") Then GUICtrlSetTip(-1, $d863)
  88.     $dev64 = GUICtrlCreateButton("x64", 51, 0, 50, 25)
  89.     If IsDeclared("d643") Then GUICtrlSetTip(-1, $d643)
  90. EndIf
  91. If @OSArch = "x86" Then
  92.     $betaversion = GUICtrlCreateLabel("", -226, 30, 200, 25)
  93.     GUICtrlSetFont(-1, 12)
  94.     $beta = GUICtrlCreateButton("x86", 226, 0, 50, 25)
  95.     If IsDeclared("b863") Then GUICtrlSetTip(-1, $b863)
  96. Else
  97.     $betaversion = GUICtrlCreateLabel("", -252, 30, 200, 25)
  98.     GUICtrlSetFont(-1, 12)
  99.     $beta = GUICtrlCreateButton("x86", 201, 0, 50, 25)
  100.     If IsDeclared("b863") Then GUICtrlSetTip(-1, $b863)
  101.     $beta64 = GUICtrlCreateButton("x64", 51, 0, 50, 25)
  102.     If IsDeclared("b643") Then GUICtrlSetTip(-1, $b643)
  103. EndIf
  104. If @OSArch = "x86" Then
  105.     $stableversion = GUICtrlCreateLabel("", -226, 30, 200, 25)
  106.     GUICtrlSetFont(-1, 12)
  107.     $release = GUICtrlCreateButton("x86", 226, 0, 50, 25)
  108.     If IsDeclared("s863") Then GUICtrlSetTip(-1, $s863)
  109. Else
  110.     $stableversion = GUICtrlCreateLabel("", -252, 30, 200, 25)
  111.     GUICtrlSetFont(-1, 12)
  112.     $release = GUICtrlCreateButton("x86", 201, 0, 50, 25)
  113.     If IsDeclared("s863") Then GUICtrlSetTip(-1, $s863)
  114.     $release64 = GUICtrlCreateButton("x64", 51, 0, 50, 25)
  115.     If IsDeclared("s643") Then GUICtrlSetTip(-1, $s643)
  116. EndIf
  117. If @OSArch = "x86" Then
  118.     $allx64 = 4
  119.     $allx86 = 4
  120. EndIf
  121. If @OSArch = "x64" Then
  122.     If @OSLang = 407 Then
  123.         $allall = GUICtrlCreateLabel("Alle x86 oder x64 installieren", -252, 40, 149, 30)
  124.         $allver = GUICtrlCreateCheckbox("Alle", 150, -1, 50, 15)
  125.     Else
  126.         $allall = GUICtrlCreateLabel("Install all x86 or x64", -252, 40, 149, 30)
  127.         $allver = GUICtrlCreateCheckbox("All", 150, -1, 50, 15)
  128.     EndIf
  129.     $allx86 = GUICtrlCreateCheckbox("x86", 51, -1, 50, 15)
  130.     $allx64 = GUICtrlCreateCheckbox("x64", 51, -1, 50, 15)
  131.     GUICtrlSetState($allver, $gui_disable)
  132.     GUICtrlSetState($allall, $gui_disable)
  133.     GUICtrlSetState($allx86, $gui_disable)
  134.     GUICtrlSetState($allx64, $gui_disable)
  135. EndIf
  136. If @OSArch = "x86" Then
  137.     If @OSLang = 407 Then
  138.         $installdir = GUICtrlCreateCheckbox("Für jede Version einen Ordner anlegen", -226, 35, 200, 20)
  139.         If $tcheck = 1 Then GUICtrlSetState(-1, $gui_checked)
  140.     Else
  141.         $installdir = GUICtrlCreateCheckbox("Create a folder for each version", -226, 35, 200, 20)
  142.         If $tcheck = 1 Then GUICtrlSetState(-1, $gui_checked)
  143.     EndIf
  144.     If $tcheck = 1 Then
  145.         If NOT _direxists(@ScriptDir & "\Edge*x86") Then
  146.             _CGBAI()
  147.         Else
  148.             _CGBAU()
  149.         EndIf
  150.     ElseIf $tcheck = 0 Then
  151.         $updall = GUICtrlCreateButton("", 201, -1, 100, 25)
  152.     EndIf
  153. Else
  154.     If @OSLang = 407 Then
  155.         $installdir = GUICtrlCreateCheckbox("Für jede Version einen Ordner anlegen", -252, 25, 200, 20)
  156.         If $tcheck = 1 Then GUICtrlSetState(-1, $gui_checked)
  157.     Else
  158.         $installdir = GUICtrlCreateCheckbox("Create a folder for each version", -252, 25, 200, 20)
  159.         If $tcheck = 1 Then GUICtrlSetState(-1, $gui_checked)
  160.     EndIf
  161.     If $tcheck = 1 Then
  162.         If NOT _direxists(@ScriptDir & "\Edge*x86") AND NOT _direxists(@ScriptDir & "\Edge*x64") Then
  163.             _CGBAI()
  164.         Else
  165.             _CGBAU()
  166.         EndIf
  167.     ElseIf $tcheck = 0 Then
  168.         $updall = GUICtrlCreateButton("", 201, -1, 100, 25)
  169.     EndIf
  170. EndIf
  171. If @OSLang = 407 Then
  172.     $vcheck = GUICtrlCreateCheckbox("Versionskontrolle ignorieren", -201, 20, 200, 20)
  173. Else
  174.     $vcheck = GUICtrlCreateCheckbox("Ignore version control", -201, 20, 200, 20)
  175. EndIf
  176. If @OSLang = 407 Then
  177.     $close = GUICtrlCreateButton("Beenden", 230, 40, 70, 25)
  178. Else
  179.     $close = GUICtrlCreateButton("Exit", 230, 40, 70, 25)
  180. EndIf
  181. If @OSArch = "x64" Then _buttonchange()
  182. _versioninfo()
  183. Global $arguibutton[8] = [$canary64, $dev64, $beta64, $release64, $canary, $dev, $beta, $release]
  184. Global $arinstchoice[4] = [$allall, $allx86, $allx64, $allver]
  185. _guichange(1)
  186. GUISetState()
  187. If @OSArch = "x86" Then
  188.     While 1
  189.         $msg = GUIGetMsg()
  190.         Select
  191.             Case $msg = $gui_event_close
  192.                 Exit
  193.             Case $msg = $installdir
  194.                 _guichange(1)
  195.             Case $msg = $canary
  196.                 updater(1, "x86", 1)
  197.             Case $msg = $dev
  198.                 updater(3, "x86", 1)
  199.             Case $msg = $beta
  200.                 updater(4, "x86", 1)
  201.             Case $msg = $release
  202.                 updater(5, "x86", 1)
  203.             Case $msg = $updall
  204.                 _updateall()
  205.             Case $msg = $close
  206.                 FileDelete(@ScriptDir & "\7zr.exe")
  207.                 DirRemove(@ScriptDir & "\Update\", 1)
  208.                 Exit
  209.         EndSelect
  210.     WEnd
  211. Else
  212.     While 1
  213.         $msg = GUIGetMsg()
  214.         Select
  215.             Case $msg = $gui_event_close
  216.                 Exit
  217.             Case $msg = $allver
  218.                 _instchange()
  219.                 _buttonchange()
  220.             Case $msg = $allx86
  221.                 _buttonchange()
  222.             Case $msg = $allx64
  223.                 _buttonchange()
  224.             Case $msg = $installdir
  225.                 _guichange(1)
  226.             Case $msg = $canary
  227.                 updater(1, "x86", 1)
  228.             Case $msg = $canary64
  229.                 updater(2, "x64", 1)
  230.             Case $msg = $dev
  231.                 updater(3, "x86", 1)
  232.             Case $msg = $beta
  233.                 updater(4, "x86", 1)
  234.             Case $msg = $release
  235.                 updater(5, "x86", 1)
  236.             Case $msg = $dev64
  237.                 updater(6, "x64", 1)
  238.             Case $msg = $beta64
  239.                 updater(7, "x64", 1)
  240.             Case $msg = $release64
  241.                 updater(8, "x64", 1)
  242.             Case $msg = $updall
  243.                 _updateall()
  244.             Case $msg = $close
  245.                 FileDelete(@ScriptDir & "\7zr.exe")
  246.                 DirRemove(@ScriptDir & "\Update\", 1)
  247.                 Exit
  248.         EndSelect
  249.     WEnd
  250. EndIf
  251.  
  252. Func _updateall()
  253.     $vstatx86 = GUICtrlRead($allx86)
  254.     $vstatx64 = GUICtrlRead($allx64)
  255.     If $vstatx86 = 1 Then
  256.         $linkx86 = 1
  257.     Else
  258.         $linkx86 = 4
  259.     EndIf
  260.     If $vstatx64 = 1 Then
  261.         $linkx64 = 1
  262.     Else
  263.         $linkx64 = 4
  264.     EndIf
  265.     If $tcheck = 1 Then
  266.         $done2 = 0
  267.         _instversion()
  268.         _updateall2("x86", 4, 7)
  269.         If @OSArch = "x64" Then _updateall2("x64", 0, 3)
  270.         If @OSArch = "x86" OR $vstatx86 = 1 Then
  271.             If NOT _direxists(@ScriptDir & "\Edge*x86") Then _installall2("x86", 4, 7)
  272.         EndIf
  273.         If $vstatx64 = 1 Then
  274.             If NOT _direxists(@ScriptDir & "\Edge*x64") Then _installall2("x64", 0, 3)
  275.         EndIf
  276.         If $done2 = 0 Then
  277.             If @OSLang = 407 Then
  278.                 MsgBox(0, "Edge Updater", "Edge ist Aktuell")
  279.             Else
  280.                 MsgBox(0, "Edge Updater", "Edge is Up-to-date")
  281.             EndIf
  282.         EndIf
  283.         If $done2 = 1 Then
  284.             If $linkx86 = 1 AND $vstatx86 = 1 Then
  285.                 If NOT FileExists(@ScriptDir & "\Edge *x86.lnk") AND NOT FileExists(@DesktopDir & "\Edge *x86.lnk") Then _linkmenu("x86")
  286.             EndIf
  287.             If $linkx64 = 1 AND $vstatx64 = 1 Then
  288.                 If NOT FileExists(@ScriptDir & "\Edge *x64.lnk") AND NOT FileExists(@DesktopDir & "\Edge *x64.lnk") Then _linkmenu("x64")
  289.             EndIf
  290.             If @OSArch = "x86" Then
  291.                 If NOT FileExists(@ScriptDir & "\Edge *x86.lnk") AND NOT FileExists(@DesktopDir & "\Edge *x86.lnk") Then
  292.                     _linkmenu("x86")
  293.                 Else
  294.                     _msgpost()
  295.                 EndIf
  296.             EndIf
  297.             If $linkx86 = 1 AND $vstatx86 = 1 AND $linkx64 = 1 AND $vstatx64 = 1 Then
  298.                 If NOT FileExists(@ScriptDir & "\Edge *x86.lnk") AND NOT FileExists(@DesktopDir & "\Edge *x86.lnk") Then _linkmenu("")
  299.             EndIf
  300.             If $linkx86 = 4 AND $linkx64 = 4 AND $vstatx64 = 4 AND $vstatx86 = 4 Then
  301.                 If FileExists(@ScriptDir & "\Edge *.lnk") OR FileExists(@DesktopDir & "\Edge *.lnk") Then
  302.                     _msgpost()
  303.                 EndIf
  304.             EndIf
  305.         EndIf
  306.         If $tcheck = 0 Then
  307.             If @OSLang = 407 Then
  308.                 MsgBox(0, "Edge Updater", "Diese Funktion ist nur für Alle Versionen vorgesehen")
  309.             Else
  310.                 MsgBox(0, "Edge Updater", "This function is intended for all versions only")
  311.             EndIf
  312.         EndIf
  313.     EndIf
  314. EndFunc
  315.  
  316. Func _guichange($test)
  317.     $test2 = GUICtrlRead($installdir)
  318.     $tcheck = 1
  319.     _instversion()
  320.     If $test = 1 Then
  321.         If $test2 > 1 Then
  322.             GUICtrlSetData($updall, "")
  323.             $tcheck = 0
  324.             If @OSArch = "x64" Then
  325.                 _buttonset(0, 3)
  326.                 _disablegui()
  327.                 If _direxists(@ScriptDir & "\Edge*x86") Then GUICtrlSetState($allx86, $gui_disable)
  328.                 If _direxists(@ScriptDir & "\Edge*x64") Then GUICtrlSetState($allx64, $gui_disable)
  329.             EndIf
  330.             _buttonset(4, 7)
  331.             If FileExists(@ScriptDir & "\Edge\updates\" & "Version.log") Then _buttoncolor("x86", 4, 7)
  332.             If FileExists(@ScriptDir & "\Edge\updates\" & "Version.log") Then _buttoncolor("x64", 0, 3)
  333.         Else
  334.             If @OSArch = "x64" Then
  335.                 _buttonset(0, 3)
  336.                 _enablegui()
  337.                 If _direxists(@ScriptDir & "\Edge*x86") Then
  338.                     _disablegui2($allx86)
  339.                     _disablegui2($allver)
  340.                 EndIf
  341.                 If _direxists(@ScriptDir & "\Edge*x64") Then
  342.                     _disablegui2($allx64)
  343.                     _disablegui2($allver)
  344.                 EndIf
  345.             EndIf
  346.             _buttonset(4, 7)
  347.             _buttoncolor2()
  348.             If NOT _direxists(@ScriptDir & "\Edge Canary x86") AND NOT _direxists(@ScriptDir & "\Edge Canary x64") AND NOT _direxists(@ScriptDir & "\Edge Dev x86") AND NOT _direxists(@ScriptDir & "\Edge Dev x64") AND NOT _direxists(@ScriptDir & "\Edge Beta x86") AND NOT _direxists(@ScriptDir & "\Edge Beta x64") AND NOT _direxists(@ScriptDir & "\Edge Stable x86") AND NOT _direxists(@ScriptDir & "\Edge Stable x64") Then
  349.                 If @OSLang = 407 Then
  350.                     GUICtrlSetData($updall, "Alle Installieren")
  351.                 Else
  352.                     GUICtrlSetData($updall, "Install All")
  353.                 EndIf
  354.             Else
  355.                 If @OSLang = 407 Then
  356.                     GUICtrlSetData($updall, "Alle Updaten")
  357.                 Else
  358.                     GUICtrlSetData($updall, "Update All")
  359.                 EndIf
  360.             EndIf
  361.         EndIf
  362.     EndIf
  363. EndFunc
  364.  
  365. Func updater($channel, $arch, $done)
  366.     $vstate = GUICtrlRead($vcheck)
  367.     $instcheck = GUICtrlRead($installdir)
  368.     If $channel = 1 Then
  369.         If $instcheck > 1 Then
  370.             _edgeinstdir(8, 0, 4, "x86")
  371.         Else
  372.             _edgeinstdir(4, 0, 4, "x86")
  373.         EndIf
  374.     ElseIf $channel = 2 Then
  375.         If $instcheck > 1 Then
  376.             _edgeinstdir(8, 0, 0, "x64")
  377.         Else
  378.             _edgeinstdir(0, 0, 0, "x64")
  379.         EndIf
  380.     ElseIf $channel = 3 Then
  381.         If $instcheck > 1 Then
  382.             _edgeinstdir(8, 1, 5, "x86")
  383.         Else
  384.             _edgeinstdir(5, 1, 5, "x86")
  385.         EndIf
  386.     ElseIf $channel = 4 Then
  387.         If $instcheck > 1 Then
  388.             _edgeinstdir(8, 2, 6, "x86")
  389.         Else
  390.             _edgeinstdir(6, 2, 6, "x86")
  391.         EndIf
  392.     ElseIf $channel = 5 Then
  393.         If $instcheck > 1 Then
  394.             _edgeinstdir(8, 3, 7, "x86")
  395.         Else
  396.             _edgeinstdir(7, 3, 7, "x86")
  397.         EndIf
  398.     ElseIf $channel = 6 Then
  399.         If $instcheck > 1 Then
  400.             _edgeinstdir(8, 1, 1, "x64")
  401.         Else
  402.             _edgeinstdir(1, 1, 1, "x64")
  403.         EndIf
  404.     ElseIf $channel = 7 Then
  405.         If $instcheck > 1 Then
  406.             _edgeinstdir(8, 2, 2, "x64")
  407.         Else
  408.             _edgeinstdir(2, 2, 2, "x64")
  409.         EndIf
  410.     ElseIf $channel = 8 Then
  411.         If $instcheck > 1 Then
  412.             _edgeinstdir(8, 3, 3, "x64")
  413.         Else
  414.             _edgeinstdir(3, 3, 3, "x64")
  415.         EndIf
  416.     EndIf
  417.     $data = "{}"
  418.     $ohttp = ObjCreate("MSXML2.XMLHTTP.6.0")
  419.     $ohttp.open("Post", "https://msedge.api.cdp.microsoft.com/api/v1/contents/Browser/namespaces/Default/names/" & $appid & "/versions/" & $version & "/files?action=GenerateDownloadInfo", False)
  420.     $oHTTP.setRequestHeader("User-Agent", $UserAgent)
  421.     $oHTTP.SetRequestHeader("If-Modified-Since", "Sat, 1 Jan 1970 00:00:00 GMT")
  422.     $ohttp.setrequestheader("Content-Type", "application/json")
  423.     $ohttp.send($data)
  424.     $oreceived = $ohttp.responsetext
  425.     $position = StringInStr($oreceived, "MicrosoftEdge_" & $edgearch & "_" & $version & ".")
  426.     $urltmp2 = StringMid($oreceived, $position + 26, StringLen($oreceived) - $position - 26)
  427.     $url3 = StringSplit($urltmp2, '"')
  428.     $url4 = $url3[5]
  429.     $sv_version = $version
  430.     If NOT $url3[5] Then
  431.         If @OSLang = 407 Then
  432.             MsgBox(0, "Edge Updater", "Es wurde keine URL zur􏑣kgegeben!")
  433.         Else
  434.             MsgBox(0, "Edge Updater", "Request failure!")
  435.         EndIf
  436.         DirRemove(@ScriptDir & "\Update", 1)
  437.     EndIf
  438.     If $vstate > 1 Then
  439.         If FileExists(@ScriptDir & $edgeupdatedir & "Version.log") Then
  440.             $vedge = FileRead(@ScriptDir & $edgeupdatedir & "Version.log")
  441.             $vedge2 = StringSplit($vedge, "|")
  442.             $vedge3 = $vedge2[1]
  443.             $vedge4 = $vedge2[3]
  444.             If IsDeclared("vEdge3") AND IsDeclared("vEdge4") Then
  445.                 If $version == $vedge3 AND $vedge4 == $edgearch Then
  446.                     If @OSLang = 407 Then
  447.                         MsgBox(0, "Edge Updater", "Keine neue Version gefunden!")
  448.                         DirRemove(@ScriptDir & "\Update", 1)
  449.                         Return
  450.                     Else
  451.                         MsgBox(0, "Edge Updater", "No new version available!")
  452.                         DirRemove(@ScriptDir & "\Update", 1)
  453.                         Return
  454.                     EndIf
  455.                 EndIf
  456.             EndIf
  457.          EndIf
  458.       EndIf
  459.       FileInstall("curl.exe", @ScriptDir & "\")
  460.       If NOT FileExists(@ScriptDir & "\curl.exe") Then FileInstall("curl.exe", @ScriptDir & "\")
  461.       $icurl = "--output " & Chr(34) & @ScriptDir & "\Update\Edge_aktuell.exe" & Chr(34) & " " & Chr(34) & $url4 & Chr(34)
  462.       RunWait(@ScriptDir & "\curl.exe " & $icurl)
  463.     Sleep(50)
  464.     DirRemove(@ScriptDir & "\Edge\Resources\Inspector", 1)
  465.     FileInstall("7zr.exe", @ScriptDir & "\")
  466.     If NOT FileExists(@ScriptDir & "\7zr.exe") Then FileInstall("7zr.exe", @ScriptDir & "\")
  467.     If $channel < 9 Then
  468.         RunWait('7zr.exe x "' & @ScriptDir & '\Update\Edge_aktuell.exe" -o"' & @ScriptDir & '\Update"')
  469.         RunWait('7zr.exe x "' & @ScriptDir & '\Update\MSEDGE.7z" -o"' & @ScriptDir & '\Update\extracted"')
  470.     Else
  471.         RunWait('7zr.exe x "' & @ScriptDir & '\Update\Edge_aktuell.exe" -o"' & @ScriptDir & '\Update"')
  472.     EndIf
  473.     If $channel < 9 Then
  474.         $first = FileFindFirstFile(@ScriptDir & "\Update\extracted\Chrome-bin\*.*")
  475.         $versions_ordner = FileFindNextFile($first)
  476.         FileClose($first)
  477.         If FileExists(@ScriptDir & $edgeupdatedir & "Version.log") Then
  478.             $cversioncontrol = FileRead(@ScriptDir & $edgeupdatedir & "Version.log")
  479.             $cversioncontrol2 = StringSplit($cversioncontrol, "|")
  480.             $cversioncontrol3 = $cversioncontrol2[1]
  481.             If _direxists(@ScriptDir & $edgedir & $cversioncontrol3) Then DirRemove(@ScriptDir & $edgedir & $cversioncontrol3, 1)
  482.         EndIf
  483.         DirCopy(@ScriptDir & "\Update\extracted\Chrome-bin\" & $versions_ordner & "\", @ScriptDir & $edgedir & $versions_ordner & "\", 1)
  484.         FileCopy(@ScriptDir & "\Update\extracted\Chrome-bin\msedge.exe", @ScriptDir & $edgedir, 1)
  485.         FileCopy(@ScriptDir & "\Update\extracted\Chrome-bin\wow_helper.exe", @ScriptDir & $edgedir, 1)
  486.         FileCopy(@ScriptDir & "\Update\extracted\Chrome-bin\msedge_proxy.exe", @ScriptDir & $edgedir, 1)
  487.         DirCopy(@ScriptDir & "\Update\extraced\Chrome-bin\Dictionaries", @ScriptDir & $edgedir, 1)
  488.         $edgetmp = $edgeupdatedir & "*.txt"
  489.         $av_temp = FileFindFirstFile(@ScriptDir & $edgetmp)
  490.         $alte_version = FileFindNextFile($av_temp)
  491.         FileClose($av_temp)
  492.         FileDelete(@ScriptDir & $edgeupdatedir & $alte_version)
  493.         FileDelete(@ScriptDir & $edgeupdatedir & "Version.log")
  494.         FileWrite(@ScriptDir & $edgeupdatedir & "Version" & ".log", $sv_version & "|" & $edgechannel & "|" & $arch)
  495.         $edgedir2 = StringTrimRight($edgedir, 1)
  496.     EndIf
  497.     FileDelete(@ScriptDir & "\7zr.exe")
  498.     FileDelete(@ScriptDir & "\curl.exe")
  499.     DirRemove(@ScriptDir & "\Update\", 1)
  500.     If $done = 1 Then
  501.         If FileExists(@ScriptDir & $edgelink) OR FileExists(@DesktopDir & $edgelink) Then
  502.             If @OSLang = 407 Then
  503.                 MsgBox(0, "Edge Updater", "Edge aktualisiert")
  504.             Else
  505.                 MsgBox(0, "Edge Updater", "Edge updated")
  506.             EndIf
  507.             If $instcheck > 1 Then
  508.                 If FileExists(@ScriptDir & $edgelink) Then
  509.                     Local $aarray = FileGetShortcut(@ScriptDir & $edgelink)
  510.                     FileCreateShortcut(@ScriptDir & $edgedir & "msedge.exe", @ScriptDir & $edgelink, @ScriptDir & $edgedir2, $aarray[2], "", @ScriptDir & $edgedir & "msedge.exe", "", $sicon)
  511.                 ElseIf FileExists(@DesktopDir & $edgelink) Then
  512.                     Local $aarray = FileGetShortcut(@DesktopDir & $edgelink)
  513.                     FileCreateShortcut(@ScriptDir & $edgedir & "msedge.exe", @DesktopDir & $edgelink, @ScriptDir & $edgedir2, $aarray[2], "", @ScriptDir & $edgedir & "msedge.exe", "", $sicon)
  514.                 EndIf
  515.             EndIf
  516.         ElseIf NOT FileExists(@ScriptDir & $edgelink) AND NOT FileExists(@DesktopDir & $edgelink) Then
  517.             If @OSLang = 407 Then
  518.                 $lgui = GUICreate("Edge Updater", 320, 230)
  519.                 Opt("GUICoordMode", 0)
  520.                 GUICtrlCreateLabel("Edge ist fertig installiert", 60, 20, 200)
  521.                 GUICtrlSetFont(-1, 12)
  522.                 GUICtrlCreateLabel("Wollen sie eine Verknüpfung erstellen ?", -45, 35, 300, 20)
  523.                 GUICtrlSetFont(-1, 12)
  524.                 GUICtrlCreateLabel("Wenn nichts ausgewählt ist, wird das lokale Standardprofil von Google verwendet.", -1, 35, 300, 35)
  525.                 GUICtrlSetFont(-1, 10)
  526.                 $cprofile = GUICtrlCreateCheckbox("Mit einem Portablen Profil für alle Versionen", -1, 40, 250, 20)
  527.                 $csprofile = GUICtrlCreateCheckbox("Für jede Version ein Portables Profil", -1, 20, 250, 20)
  528.                 $ldcreate = GUICtrlCreateButton("Auf dem Desktop", -1, 35, 100, 30)
  529.                 $lcreate = GUICtrlCreateButton("Script Ordner", 101, -1, 100, 30)
  530.                 $lcreanot = GUICtrlCreateButton("NEIN", 110, -1, 80, 30)
  531.             Else
  532.                 $lgui = GUICreate("Edge Updater", 320, 230)
  533.                 Opt("GUICoordMode", 0)
  534.                 GUICtrlCreateLabel("Edge is installed", 60, 20, 200)
  535.                 GUICtrlSetFont(-1, 12)
  536.                 GUICtrlCreateLabel("Do you want to create a shortcut ?", -45, 35, 300, 20)
  537.                 GUICtrlSetFont(-1, 12)
  538.                 GUICtrlCreateLabel("If nothing is selected, the Local Standard Profile of Google will be used.", -1, 35, 300, 35)
  539.                 GUICtrlSetFont(-1, 10)
  540.                 $cprofile = GUICtrlCreateCheckbox("With one portable profile for all versions", -1, 40, 250, 20)
  541.                 $csprofile = GUICtrlCreateCheckbox("A portable profile for each version", -1, 20, 250, 20)
  542.                 $ldcreate = GUICtrlCreateButton("On the Desktop", -1, 35, 100, 30)
  543.                 $lcreate = GUICtrlCreateButton("Script folder", 101, -1, 100, 30)
  544.                 $lcreanot = GUICtrlCreateButton("NO", 110, -1, 80, 30)
  545.             EndIf
  546.             GUISetState(@SW_SHOW, $lgui)
  547.             GUICtrlSetTip($cprofile, '--user-data-dir="..\profile"')
  548.             GUICtrlSetTip($csprofile, '--user-data-dir=".\profile"')
  549.             GUICtrlSetTip($ldcreate, @DesktopDir)
  550.             GUICtrlSetTip($lcreate, @ScriptDir)
  551.             While 1
  552.                 $msg = GUIGetMsg()
  553.                 If GUICtrlRead($cprofile) = 1 Then
  554.                     $coption = '--user-data-dir="..\profile"'
  555.                 ElseIf GUICtrlRead($csprofile) = 1 Then
  556.                     $coption = '--user-data-dir=".\profile"'
  557.                 Else
  558.                     $coption = ""
  559.                 EndIf
  560.                 Select
  561.                     Case $msg = $gui_event_close
  562.                         GUIDelete()
  563.                         ExitLoop
  564.                     Case $msg = $cprofile
  565.                         GUICtrlSetState($csprofile, $gui_unchecked)
  566.                     Case $msg = $csprofile
  567.                         GUICtrlSetState($cprofile, $gui_unchecked)
  568.                     Case $msg = $ldcreate
  569.                         GUIDelete()
  570.                         FileCreateShortcut(@ScriptDir & $edgedir & "msedge.exe", @DesktopDir & $edgelink, @ScriptDir & $edgedir2, $coption, "", @ScriptDir & $edgedir & "msedge.exe", "", $sicon)
  571.                         ExitLoop
  572.                     Case $msg = $lcreate
  573.                         GUIDelete()
  574.                         FileCreateShortcut(@ScriptDir & $edgedir & "msedge.exe", @ScriptDir & $edgelink, @ScriptDir & $edgedir2, $coption, "", @ScriptDir & $edgedir & "msedge.exe", "", $sicon)
  575.                         ExitLoop
  576.                     Case $msg = $lcreanot
  577.                         GUIDelete()
  578.                         ExitLoop
  579.                 EndSelect
  580.             WEnd
  581.         EndIf
  582.     EndIf
  583.     _guichange(1)
  584.     Return
  585. EndFunc
  586.  
  587. Func _createlink($coption, $lsdir)
  588.    For $i = 0 To 7
  589.       If Not FileExists($lsdir & "\" & $arinstdir[$i] & ".lnk") Then
  590.          If _direxists(@ScriptDir & "\" & $arinstdir[$i] & "\updates") Then FileCreateShortcut(@ScriptDir & "\" & $arinstdir[$i] & "\msedge.exe", $lsdir & "\" & $arinstdir[$i] & ".lnk", @ScriptDir & "\" & $arinstdir[$i], $coption, "", @ScriptDir & "\" & $arinstdir[$i] & "\msedge.exe", "", $aricon[$i])
  591.       EndIf
  592.    Next
  593. EndFunc
  594.  
  595. Func _direxists($spath)
  596.     Return StringInStr(FileGetAttrib($spath), "D")
  597. EndFunc
  598.  
  599. Func _buttonchange()
  600.     $vstatx86 = GUICtrlRead($allx86)
  601.     $vstatx64 = GUICtrlRead($allx64)
  602.     If $vstatx64 = 4 AND $vstatx86 = 1 Then GUICtrlSetState($allver, $gui_unchecked)
  603.     If $vstatx64 = 1 AND $vstatx86 = 4 Then GUICtrlSetState($allver, $gui_unchecked)
  604.     If $vstatx64 = 1 AND $vstatx86 = 1 Then GUICtrlSetState($allver, $gui_checked)
  605.     If $vstatx86 = 1 OR $vstatx64 = 1 Then
  606.         GUICtrlSetState($updall, $gui_enable)
  607.     Else
  608.         GUICtrlSetState($updall, $gui_disable)
  609.     EndIf
  610.     If _direxists(@ScriptDir & "\Edge Canary x86") OR _direxists(@ScriptDir & "\Edge Canary x64") OR _direxists(@ScriptDir & "\Edge Dev x86") OR _direxists(@ScriptDir & "\Edge Dev x64") OR _direxists(@ScriptDir & "\Edge Beta x86") OR _direxists(@ScriptDir & "\Edge Beta x64") OR _direxists(@ScriptDir & "\Edge Stable x86") OR _direxists(@ScriptDir & "\Edge Stable x64") Then
  611.         GUICtrlSetState($updall, $gui_enable)
  612.     EndIf
  613.     If NOT _direxists(@ScriptDir & "\Edge*x86") Then _msipost()
  614.     If NOT _direxists(@ScriptDir & "\Edge*x64") Then _msipost()
  615.     If $vstatx86 = 4 AND $vstatx64 = 4 Then
  616.         If @OSLang = 407 Then
  617.             GUICtrlSetData($updall, "Alle Updaten")
  618.         Else
  619.             GUICtrlSetData($updall, "Update All")
  620.         EndIf
  621.     EndIf
  622. EndFunc
  623.  
  624. Func _instchange()
  625.     $vstatallver = GUICtrlRead($allver)
  626.     If $vstatallver = 1 Then
  627.         GUICtrlSetState($allx86, $gui_checked)
  628.         GUICtrlSetState($allx64, $gui_checked)
  629.     EndIf
  630.     If $vstatallver = 4 Then
  631.         GUICtrlSetState($allx86, $gui_unchecked)
  632.         GUICtrlSetState($allx64, $gui_unchecked)
  633.     EndIf
  634. EndFunc
  635.  
  636. Func _linkmenu($linkarch)
  637.     If NOT FileExists(@ScriptDir & "\Edge*" & $linkarch & ".lnk") AND NOT FileExists(@DesktopDir & "\Edge*" & $linkarch & ".lnk") Then
  638.         If @OSLang = 407 Then
  639.             $lgui = GUICreate("Edge Updater", 320, 230)
  640.             Opt("GUICoordMode", 0)
  641.             GUICtrlCreateLabel("Edge ist fertig installiert", 60, 20, 200)
  642.             GUICtrlSetFont(-1, 12)
  643.             GUICtrlCreateLabel("Wollen sie eine Verknüpfung erstellen ?", -45, 35, 300, 20)
  644.             GUICtrlSetFont(-1, 12)
  645.             GUICtrlCreateLabel("Wenn nichts ausgewählt ist, wird das lokale Standardprofil von MSEdge verwendet.", -1, 35, 300, 35)
  646.             GUICtrlSetFont(-1, 10)
  647.             $cprofile = GUICtrlCreateCheckbox("Mit einem Portablen Profil für alle Versionen", -1, 40, 250, 20)
  648.             $csprofile = GUICtrlCreateCheckbox("Für jede Version ein Portables Profil", -1, 20, 250, 20)
  649.             $ldcreate = GUICtrlCreateButton("Auf dem Desktop", -1, 35, 100, 30)
  650.             $lcreate = GUICtrlCreateButton("Script Ordner", 101, -1, 100, 30)
  651.             $lcreanot = GUICtrlCreateButton("NEIN", 110, -1, 80, 30)
  652.         Else
  653.             $lgui = GUICreate("Edge Updater", 320, 230)
  654.             Opt("GUICoordMode", 0)
  655.             GUICtrlCreateLabel("Edge is installed", 60, 20, 200)
  656.             GUICtrlSetFont(-1, 12)
  657.             GUICtrlCreateLabel("Do you want to create a shortcut ?", -45, 35, 300, 20)
  658.             GUICtrlSetFont(-1, 12)
  659.             GUICtrlCreateLabel("If nothing is selected, the Local Standard Profile of MSEdge will be used.", -1, 35, 300, 35)
  660.             GUICtrlSetFont(-1, 10)
  661.             $cprofile = GUICtrlCreateCheckbox("With one portable profile for all versions", -1, 40, 250, 20)
  662.             $csprofile = GUICtrlCreateCheckbox("A portable profile for each version", -1, 20, 250, 20)
  663.             $ldcreate = GUICtrlCreateButton("On the Desktop", -1, 35, 100, 30)
  664.             $lcreate = GUICtrlCreateButton("Script folder", 101, -1, 100, 30)
  665.             $lcreanot = GUICtrlCreateButton("NO", 110, -1, 80, 30)
  666.         EndIf
  667.         GUISetState(@SW_SHOW, $lgui)
  668.         GUICtrlSetTip($cprofile, '--user-data-dir="..\profile"')
  669.         GUICtrlSetTip($csprofile, '--user-data-dir=".\profile"')
  670.         GUICtrlSetTip($ldcreate, @DesktopDir)
  671.         GUICtrlSetTip($lcreate, @ScriptDir)
  672.         While 1
  673.             $msg = GUIGetMsg()
  674.             If GUICtrlRead($cprofile) = 1 Then
  675.                 $coption = '--user-data-dir="..\profile"'
  676.             ElseIf GUICtrlRead($csprofile) = 1 Then
  677.                 $coption = '--user-data-dir=".\profile"'
  678.             Else
  679.                 $coption = ""
  680.             EndIf
  681.             Select
  682.                 Case $msg = $gui_event_close
  683.                     GUIDelete()
  684.                     ExitLoop
  685.                 Case $msg = $cprofile
  686.                     GUICtrlSetState($csprofile, $gui_unchecked)
  687.                 Case $msg = $csprofile
  688.                     GUICtrlSetState($cprofile, $gui_unchecked)
  689.                 Case $msg = $lcreate
  690.                     GUIDelete()
  691.                     _createlink($coption, @ScriptDir)
  692.                     ExitLoop
  693.                 Case $msg = $ldcreate
  694.                     GUIDelete()
  695.                     _createlink($coption, @DesktopDir)
  696.                     ExitLoop
  697.                 Case $msg = $lcreanot
  698.                     GUIDelete()
  699.                     ExitLoop
  700.             EndSelect
  701.         WEnd
  702.     Else
  703.         _msgpost()
  704.     EndIf
  705. EndFunc
  706.  
  707. Func _buttoncolor($arch, $1, $2)
  708.     If $cxx9 = $arch Then
  709.         For $i = $1 To $2
  710.             If $cxx4 = $archannnel[$i] Then
  711.                 If $arversion[$i] = $cxx3 Then
  712.                     GUICtrlSetTip($arguibutton[$i], $cxx3)
  713.                     GUICtrlSetBkColor($arguibutton[$i], $color_green)
  714.                 Else
  715.                     GUICtrlSetTip($arguibutton[$i], $cxx3)
  716.                     GUICtrlSetBkColor($arguibutton[$i], $color_red)
  717.                 EndIf
  718.             EndIf
  719.         Next
  720.     EndIf
  721. EndFunc
  722.  
  723. Func _buttoncolor2()
  724.     For $i = 0 To 7
  725.         If _direxists(@ScriptDir & "\" & $arinstdir[$i] & "\updates") Then
  726.             If $arversion[$i] = $arinstversion[$i] Then
  727.                 GUICtrlSetTip($arguibutton[$i], $arinstversion[$i])
  728.                 GUICtrlSetBkColor($arguibutton[$i], $color_green)
  729.             Else
  730.                 GUICtrlSetTip($arguibutton[$i], $arinstversion[$i])
  731.                 GUICtrlSetBkColor($arguibutton[$i], $color_red)
  732.             EndIf
  733.         EndIf
  734.     Next
  735. EndFunc
  736.  
  737. Func _buttonset($1, $2)
  738.     For $i = $1 To $2
  739.         GUICtrlSetStyle($arguibutton[$i], $gui_ss_default_button)
  740.         GUICtrlSetTip($arguibutton[$i], "")
  741.     Next
  742. EndFunc
  743.  
  744. Func _disablegui2($call)
  745.     GUICtrlSetState($call, $gui_disable)
  746. EndFunc
  747.  
  748. Func _enablegui()
  749.     For $i = 0 To 3
  750.         GUICtrlSetState($arinstchoice[$i], $gui_enable)
  751.     Next
  752. EndFunc
  753.  
  754. Func _disablegui()
  755.     For $i = 0 To 3
  756.         GUICtrlSetState($arinstchoice[$i], $gui_disable)
  757.     Next
  758. EndFunc
  759.  
  760. Func _versioninfo()
  761.     Local $arcontrol[4] = [$canaryversion, $developerversion, $betaversion, $stableversion]
  762.     For $i = 0 To 3
  763.         $data = '{"targetingAttributes":{"AppAp":"","AppCohort":"","AppLang":"de-de","AppRollout":"1.0","AppVersion":"","IsMachine":"0","OsArch":"x64","OsPlatform":"win","OsVersion":"","Updater":"MicrosoftEdgeUpdate","UpdaterVersion":"1.3.101.13"}}'
  764.         $ohttp = ObjCreate("MSXML2.XMLHTTP.6.0")
  765.         $ohttp.open("POST", "https://msedge.api.cdp.microsoft.com/api/v1/contents/Browser/namespaces/Default/names/" & $arappid[$i] & "/versions/latest?action=select", False)
  766.         $oHTTP.setRequestHeader("User-Agent", $UserAgent)
  767.         $oHTTP.SetRequestHeader("If-Modified-Since", "Sat, 1 Jan 1970 00:00:00 GMT")
  768.         $ohttp.setrequestheader("Content-Type", "application/json")
  769.         $ohttp.send($data)
  770.         $oreceived = $ohttp.responsetext
  771.         $position = StringInStr($oreceived, '"Version":"')
  772.         $urltmp = StringMid($oreceived, $position + 11, StringLen($oreceived) - $position - 11)
  773.         $url = StringSplit($urltmp, '"')
  774.         $edgeversion = $url[1]
  775.         GUICtrlSetData($arcontrol[$i], $archannnel[$i] & " " & $edgeversion)
  776.         If $archannnel[$i] = "Canary" Then $update_can = $edgeversion
  777.         If $archannnel[$i] = "Developer" Then $update_dev = $edgeversion
  778.         If $archannnel[$i] = "Beta" Then $update_beta = $edgeversion
  779.         If $archannnel[$i] = "Stable" Then $update_stable = $edgeversion
  780.     Next
  781.     Global $arversion[8] = [$update_can, $update_dev, $update_beta, $update_stable, $update_can, $update_dev, $update_beta, $update_stable]
  782. EndFunc
  783.  
  784. Func _instversion()
  785.     For $i = 0 To 8
  786.         If FileExists(@ScriptDir & "\" & $arinstdir[$i] & "\updates\" & "Version.log") Then
  787.             $sfilename = FileRead(@ScriptDir & "\" & $arinstdir[$i] & "\updates\" & "Version.log")
  788.             $installedversion = StringSplit($sfilename, "|")
  789.             If $arinstdir[$i] = "Edge Canary x64" Then
  790.                 $c643 = $installedversion[1]
  791.                 $tcheck = "1"
  792.             ElseIf $arinstdir[$i] = "Edge Canary x86" Then
  793.                 $c863 = $installedversion[1]
  794.                 $tcheck = "1"
  795.             ElseIf $arinstdir[$i] = "Edge Dev x64" Then
  796.                 $d643 = $installedversion[1]
  797.                 $tcheck = "1"
  798.             ElseIf $arinstdir[$i] = "Edge Dev x86" Then
  799.                 $d863 = $installedversion[1]
  800.                 $tcheck = "1"
  801.             ElseIf $arinstdir[$i] = "Edge Beta x64" Then
  802.                 $b643 = $installedversion[1]
  803.                 $tcheck = "1"
  804.             ElseIf $arinstdir[$i] = "Edge Beta x86" Then
  805.                 $b863 = $installedversion[1]
  806.                 $tcheck = "1"
  807.             ElseIf $arinstdir[$i] = "Edge Stable x64" Then
  808.                 $s643 = $installedversion[1]
  809.                 $tcheck = "1"
  810.             ElseIf $arinstdir[$i] = "Edge Stable x86" Then
  811.                 $s863 = $installedversion[1]
  812.                 $tcheck = "1"
  813.             ElseIf $arinstdir[$i] = "Edge" Then
  814.                 $cxx3 = $installedversion[1]
  815.                 $cxx4 = $installedversion[2]
  816.                 $cxx9 = $installedversion[3]
  817.             EndIf
  818.         EndIf
  819.     Next
  820.     Global $arinstversion[8] = [$c643, $d643, $b643, $s643, $c863, $d863, $b863, $s863]
  821. EndFunc
  822.  
  823. Func _updateall2($barch, $1, $2)
  824.     For $i = $1 To $2
  825.         If _direxists(@ScriptDir & "\" & $arinstdir[$i]) Then
  826.             If NOT ($arversion[$i] = $arinstversion[$i]) Then
  827.                 updater($arupdater[$i], $barch, 0)
  828.                 $done2 = 1
  829.             EndIf
  830.         EndIf
  831.     Next
  832. EndFunc
  833.  
  834. Func _installall2($barch, $1, $2)
  835.     For $i = $1 To $2
  836.         If NOT _direxists(@ScriptDir & "\" & $arinstdir[$i]) Then
  837.             updater($arupdater[$i], $barch, 0)
  838.             $done2 = 1
  839.         EndIf
  840.     Next
  841. EndFunc
  842.  
  843. Func _msgpost()
  844.     If @OSLang = 407 Then
  845.         MsgBox(0, "Edge Updater", "Edge aktualisiert")
  846.         GUICtrlSetData($updall, "Alle Updaten")
  847.     Else
  848.         MsgBox(0, "Edge Updater", "Edge updated")
  849.         GUICtrlSetData($updall, "Update All")
  850.     EndIf
  851. EndFunc
  852.  
  853. Func _msipost()
  854.     If @OSLang = 407 Then
  855.         GUICtrlSetData($updall, "Alle Installieren")
  856.     Else
  857.         GUICtrlSetData($updall, "Install All")
  858.     EndIf
  859. EndFunc
  860.  
  861. Func _edgeinstdir($1, $2, $3, $4)
  862.     Local $aricon[4] = ["4", "8", "9", "0"]
  863.     $version = $arversion[$2]
  864.     $appid = $arappid[$3]
  865.     $edgearch = $4
  866.     $sicon = $aricon[$2]
  867.     $edgeupdatedir = "\" & $arinstdir[$1] & "\updates\"
  868.     $edgedir = "\" & $arinstdir[$1] & "\"
  869.     $edgechannel = $archannnel[$2]
  870.     $edgelink = "\" & $arinstdir[$1] & ".lnk"
  871.     DirCreate(@ScriptDir & "\Update")
  872.     DirCreate(@ScriptDir & $edgeupdatedir)
  873.  EndFunc
  874.  
  875. Func _CGBAI()
  876. If @OSLang = 407 Then
  877.    $updall = GUICtrlCreateButton("Alle Installieren", 201, -1, 100, 25)
  878. Else
  879. $updall = GUICtrlCreateButton("Install All", 201, -1, 100, 25)
  880. EndIf
  881. EndFunc
  882.  
  883. Func _CGBAU()
  884. If @OSLang = 407 Then
  885.    $updall = GUICtrlCreateButton("Alle Updaten", 201, -1, 100, 25)
  886. Else
  887. $updall = GUICtrlCreateButton("Update All", 201, -1, 100, 25)
  888. EndIf
  889. EndFunc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top