@@ -3,10 +3,10 @@ TITLE arkenfox user.js updater
33
44REM ## arkenfox user.js updater for Windows
55REM ## author: @claustromaniac
6- REM ## version: 4.12
6+ REM ## version: 4.13
77REM ## instructions: https://github.com/arkenfox/user.js/wiki/3.3-Updater-Scripts
88
9- SET v = 4.12
9+ SET v = 4.13
1010
1111VERIFY ON
1212CD /D " %~dp0 "
@@ -51,9 +51,7 @@ IF DEFINED _updateb (
5151 CALL :message " Updating script..."
5252 REM Uncomment the next line and comment out the PowerShell call for testing.
5353 REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat" > nul
54- (
55- PowerShell -Command " (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/arkenfox/user.js/master/updater.bat', '[updated]!_myname! .bat')"
56- ) > nul 2 >& 1
54+ CALL :psdownload https://raw.githubusercontent.com/arkenfox/user.js/master/updater.bat " [updated]!_myname! .bat"
5755 IF EXIST " [updated]!_myname! .bat" (
5856 START /min CMD /C " [updated]!_myname! .bat" !_myparams!
5957 ) ELSE (
@@ -132,9 +130,7 @@ IF DEFINED _log (
132130)
133131IF EXIST user.js.new (DEL /F " user.js.new" )
134132CALL :message " Retrieving latest user.js file from github repository..."
135- (
136- PowerShell -Command " (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/arkenfox/user.js/master/user.js', 'user.js.new')"
137- ) > nul 2 >& 1
133+ CALL :psdownload https://raw.githubusercontent.com/arkenfox/user.js/master/user.js " user.js.new"
138134IF EXIST user.js.new (
139135 IF DEFINED _rfpalts (
140136 CALL :message " Activating RFP Alternatives section..."
@@ -218,6 +214,13 @@ IF NOT "2"=="%_log%" (ECHO:)
218214ENDLOCAL
219215GOTO :EOF
220216
217+ :: ::::::::::: Download :::::::::::::
218+ :psdownload
219+ (
220+ PowerShell -Command " [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('%~1 ', '%~2 ')"
221+ ) > nul 2 >& 1
222+ GOTO :EOF
223+
221224:: ::::::::::::: Activate Section :::::::::::::::
222225:activate
223226:: arg1 = file
0 commit comments