mirror of
				https://github.com/arkenfox/user.js.git
				synced 2025-11-04 07:45:26 +01:00 
			
		
		
		
	v4.13 - fix TLS issue with PowerShell
This commit is contained in:
		
							
								
								
									
										19
									
								
								updater.bat
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								updater.bat
									
									
									
									
									
								
							@@ -3,10 +3,10 @@ TITLE arkenfox user.js updater
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
REM ## arkenfox user.js updater for Windows
 | 
					REM ## arkenfox user.js updater for Windows
 | 
				
			||||||
REM ## author: @claustromaniac
 | 
					REM ## author: @claustromaniac
 | 
				
			||||||
REM ## version: 4.12
 | 
					REM ## version: 4.13
 | 
				
			||||||
REM ## instructions: https://github.com/arkenfox/user.js/wiki/3.3-Updater-Scripts
 | 
					REM ## instructions: https://github.com/arkenfox/user.js/wiki/3.3-Updater-Scripts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SET v=4.12
 | 
					SET v=4.13
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VERIFY ON
 | 
					VERIFY ON
 | 
				
			||||||
CD /D "%~dp0"
 | 
					CD /D "%~dp0"
 | 
				
			||||||
@@ -51,9 +51,7 @@ IF DEFINED _updateb (
 | 
				
			|||||||
		CALL :message "Updating script..."
 | 
							CALL :message "Updating script..."
 | 
				
			||||||
		REM Uncomment the next line and comment out the PowerShell call for testing.
 | 
							REM Uncomment the next line and comment out the PowerShell call for testing.
 | 
				
			||||||
		REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat" >nul
 | 
							REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat" >nul
 | 
				
			||||||
		(
 | 
							CALL :psdownload https://raw.githubusercontent.com/arkenfox/user.js/master/updater.bat "[updated]!_myname!.bat"
 | 
				
			||||||
			PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/arkenfox/user.js/master/updater.bat', '[updated]!_myname!.bat')"
 | 
					 | 
				
			||||||
		) >nul 2>&1
 | 
					 | 
				
			||||||
		IF EXIST "[updated]!_myname!.bat" (
 | 
							IF EXIST "[updated]!_myname!.bat" (
 | 
				
			||||||
			START /min CMD /C "[updated]!_myname!.bat" !_myparams!
 | 
								START /min CMD /C "[updated]!_myname!.bat" !_myparams!
 | 
				
			||||||
		) ELSE (
 | 
							) ELSE (
 | 
				
			||||||
@@ -132,9 +130,7 @@ IF DEFINED _log (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
IF EXIST user.js.new (DEL /F "user.js.new")
 | 
					IF EXIST user.js.new (DEL /F "user.js.new")
 | 
				
			||||||
CALL :message "Retrieving latest user.js file from github repository..."
 | 
					CALL :message "Retrieving latest user.js file from github repository..."
 | 
				
			||||||
(
 | 
					CALL :psdownload https://raw.githubusercontent.com/arkenfox/user.js/master/user.js "user.js.new"
 | 
				
			||||||
	PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/arkenfox/user.js/master/user.js', 'user.js.new')"
 | 
					 | 
				
			||||||
) >nul 2>&1
 | 
					 | 
				
			||||||
IF EXIST user.js.new (
 | 
					IF EXIST user.js.new (
 | 
				
			||||||
	IF DEFINED _rfpalts (
 | 
						IF DEFINED _rfpalts (
 | 
				
			||||||
		CALL :message "Activating RFP Alternatives section..."
 | 
							CALL :message "Activating RFP Alternatives section..."
 | 
				
			||||||
@@ -218,6 +214,13 @@ IF NOT "2"=="%_log%" (ECHO:)
 | 
				
			|||||||
ENDLOCAL
 | 
					ENDLOCAL
 | 
				
			||||||
GOTO :EOF
 | 
					GOTO :EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					::::::::::::: Download :::::::::::::
 | 
				
			||||||
 | 
					:psdownload
 | 
				
			||||||
 | 
					(
 | 
				
			||||||
 | 
						PowerShell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object Net.WebClient).DownloadFile('%~1', '%~2')"
 | 
				
			||||||
 | 
					) >nul 2>&1
 | 
				
			||||||
 | 
					GOTO :EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
::::::::::::::: Activate Section :::::::::::::::
 | 
					::::::::::::::: Activate Section :::::::::::::::
 | 
				
			||||||
:activate
 | 
					:activate
 | 
				
			||||||
:: arg1 = file
 | 
					:: arg1 = file
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user