Skip to content

Instantly share code, notes, and snippets.

@Echo Off
@setlocal DisableDelayedExpansion
goto SOL_Start
REM By Asmir BELKIC pour Solware AUTO ? 2022
REM Version 1.0.5-v5
REM Ouverture de ICM, DFM, Service BOX en mode compatibilit�
REM Correction et am�lioration du code en g�n�rale
REM Ajout d'options, questions lors de l'installation de la liste (remplacement de liste pr�-existante).
REM Ajout du script de correction de l'erreur -2146828218 Permission refusee pour Servicebox.
@asmirbe
asmirbe / PowershellXMLFetch.ps1
Created June 1, 2022 21:53
Same as before but with Powershell
$r = Invoke-WebRequest -Uri 'https://gitcdn.link/cdn/asmirbelkic/b064933ad55335bfde34db9de3ede0d1/raw/fe4160a246757f266d212f52051528431df6867d/list.xml' -Method:Get -ContentType 'application/xml' -ErrorAction:Stop -TimeoutSec 60
$bn = ($r.Content)
$file = '$PSScriptRoot/list.xml'
if (-not(Test-Path -Path $file -PathType Leaf)) {
try {
$null = New-Item -Path $file -Force -ErrorAction Stop
Set-Content $file $bn
Write-Host 'The list [$file] has been created.'
}
catch {
:: This gists is for testing purposes only.
:: It is not meant to be used in production.
:: Batch way to scrap XML file from the web with a HTTP GET request in Powershell Invoke-WebRequest.
:: Using Github GISTS as CDN XML file provider
@Echo Off
@setlocal DisableDelayedExpansion
set "_null=1>nul 2>nul"
set "_psc=powershell"