Scripturi Ajutatoare - pentru Administratori si Utilizatori Avansati

Retea, baze de date, salvari, restaurari etc.
Mesaj
Autor
stroer1948
Mesaje: 725
Membru din: Joi Oct 01, 2009 12:00 am

Re: Scripturi Ajutatoare - pentru Administratori si Utilizatori Avansati

#46 Mesaj de stroer1948 »

Da, aveti nevoie de un cont pe https://pixeldrain.com/register . Acesta este un serviciu de gazduire a fisierelor in cloud, ca si Google Drive, si prin crearea contului aveti siguranta ca fisierele dvs sun pastrate doar in contul dvs (pe serverele Pixeldrain).
Imagine

ciucam544
Mesaje: 966
Membru din: Mar Noi 25, 2008 12:00 am

Re: Scripturi Ajutatoare - pentru Administratori si Utilizatori Avansati

#47 Mesaj de ciucam544 »

Varianta noua !!! ActualizareSmartSagaKitComplet_V4.6
Optimizare descarcare cu fallback de pe celelalte servere mirror, descarcare si instalare in prealabil Firebird Client.
Detecteaza instalarea curenta (Saga C ,Saga PS, Saga B), linii script cat mai universale (pentru Windows 7, 8, 10, 11).
Copiati codul, salvati in fisier text numai in folderul Saga, apoi redenumiti cu extensia .cmd. Rulati cu drepturi de administrator sau acceptati rularea dupa caz.
ActualizareSmartSagaKitComplet_V4.6.cmd

Cod: Selectaţi tot

@echo off
set "CaleSaga=%~dp0"
set "CaleSaga=%CaleSaga:~0,-1%"
net session >nul 2>&1 || (powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" & cd /d "%CaleSaga%" & exit /b)
title Actualizare Smart Saga Complet V4.6 - 2026(c)byGabrieL
if exist "%CaleSaga%\sb.exe" (set "SagaTip=SagaB" & set "SetupSaga=SetupB.exe" & set "RegNameTip=Lite B 3" & set "Page=saga-b.php" & set "Link=SAGA B.3.0")
if exist "%CaleSaga%\sc.exe" (set "SagaTip=SagaC" & set "SetupSaga=SetupC.exe" & set "RegNameTip=Lite C 3" & set "Page=saga-c.php" & set "Link=SAGA C.3.0")
if exist "%CaleSaga%\sps.exe" (set "SagaTip=SagaPS" & set "SetupSaga=SetupPS.exe" & set "RegNameTip=PS 3" & set "Page=saga-ps.php" & set "Link=SAGA PS.3.0")
if "%SagaTip%"=="" (color 0c & echo Nu exista un program saga in folderul curent ! & pause & exit /b)
for /f %%T in ('powershell -NoProfile -Command "Get-Date -Format yyyy.MM.dd_HH.mm.ss"') do set "DATE=%%T"
for /f "usebackq delims=" %%V in (`powershell -NoProfile -Command "try {[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls; $wc=New-Object System.Net.WebClient; $wc.Encoding=[System.Text.Encoding]::UTF8; $html=$wc.DownloadString('https://www.sagasoft.ro/%Page%'); if ($html -match 'Versiune:</b>\s*([0-9\.]+)') {$matches[1]}} catch {}"`) do set "VER=%%V"
set "Upd=%CaleSaga%\Actualizari"
if not exist "%Upd%" mkdir "%Upd%"
set "KitSaga=%Upd%\%SagaTip%_%DATE%_v%VER%.exe"
set "FBclient=%Upd%\Firebird30_Client_x86.zip"
set "Try=0" & set "web=www"
if exist "%Upd%\%SagaTip%_%DATE:~0,13%*_v%VER%.exe" (
for /f "delims=" %%F in ('dir /b /o:-d "%Upd%\%SagaTip%_%DATE:~0,13%*_v%VER%.exe"') do set "KitSaga=%Upd%\%%F"
color 0c & echo Exista deja un kit recent descarcat !
goto :DescarcaFBc)
:DescarcaSetup
cls & color 0e & echo Program Saga detectat: %SagaTip% - Versiune v%VER%.
echo Asteptati ! Kit-ul complet se descarca in %KitSaga%
set /a Try+=1
if %Try%==4 set "web=mirror3"
echo Descarcare %Try% %web%.sagasoft.ro - %SetupSaga%
powershell -NoProfile -Command "$url='https://%web%.sagasoft.ro/programe/%SetupSaga%'; $out='%KitSaga%'; try { try {[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls} catch{}; $wc=New-Object System.Net.WebClient; $wc.DownloadFile($url, $out); $h=[int64]$wc.ResponseHeaders['Content-Length']; if ($h -gt 0 -and (Get-Item -LiteralPath $out).Length -ne $h) {throw}} catch {Remove-Item -LiteralPath $out -ErrorAction SilentlyContinue; exit 1 }" || (echo Err & if %Try% lss 5 (timeout /t 2 /nobreak >nul & goto :DescarcaSetup) else exit /b 1)
set "Try=0"
:DescarcaFBc
echo Asteptati ! Se verifica Clientul Firebird %FBclient%
if exist "%FBclient%" powershell -NoProfile -Command "try {$s=New-Object -ComObject Shell.Application; $z=$s.NameSpace('%FBclient%'); if (-not $z -or $z.Items().Count -eq 0) {exit 1}} catch {exit 1}" && goto :Instalare
color 0e
set /a Try+=1
if %web%==mirror3 set "web=www"
if %Try%==3 set "web=mirror1"
if %Try%==5 set "web=mirror2"
echo Descarcare %Try% %web%.sagasoft.ro - Firebird30_Client_x86.zip
powershell -NoProfile -Command "$url='https://%web%.sagasoft.ro/programe/Utils/Firebird30_Client_x86.zip'; $out='%FBclient%'; try { try {[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls} catch{}; $wc=New-Object System.Net.WebClient; $wc.DownloadFile($url, $out); $h=[int64]$wc.ResponseHeaders['Content-Length']; if ($h -gt 0 -and (Get-Item -LiteralPath $out).Length -ne $h) {throw}} catch {Remove-Item -LiteralPath $out -ErrorAction SilentlyContinue; exit 1 }" || (echo Err & if %Try% lss 5 (timeout /t 2 /nobreak >nul & goto :DescarcaFBc))
:Instalare
color 0b & echo Nu inchideti fereastra ! Finalizati instalarea %KitSaga% !
powershell -NoProfile -Command "$d='%CaleSaga%\FbClient'; New-Item -ItemType Directory -Force -Path $d | Out-Null; $s=New-Object -ComObject Shell.Application; $s.NameSpace($d).CopyHere($s.NameSpace('%FBclient%').Items(), 20)"
DEL /F /Q /S "%CaleSaga%\FbClient\*.log" >nul 2>&1
set "RegCaleInitial="
for /f "delims=" %%A in ('powershell -NoProfile -Command "(Get-ItemProperty 'HKCU:\SOFTWARE\SAGA' -ErrorAction SilentlyContinue).'%RegNameTip%'"') do set "RegCaleInitial=%%A"
echo Calea folderului initial %SagaTip% (%RegNameTip%) este %RegCaleInitial%
reg add HKCU\SOFTWARE\SAGA /v "%RegNameTip%" /t REG_SZ /d "%CaleSaga%\\" /f >nul
if exist "%USERPROFILE%\Desktop\%Link%..lnk" REN "%USERPROFILE%\Desktop\%Link%..lnk" "%Link%.lnk"
start "" /wait "%KitSaga%"
if not "%RegCaleInitial%"=="" (reg add HKCU\SOFTWARE\SAGA /v "%RegNameTip%" /t REG_SZ /d "%RegCaleInitial%\" /f >nul)
DEL /F /Q "%CaleSaga%\u.txt" "%CaleSaga%\uu.txt" "%USERPROFILE%\Desktop\%Link%..lnk" >nul 2>&1
powershell -c "Add-Type -AssemblyName Microsoft.VisualBasic;Add-Type -AssemblyName System.Windows.Forms;[Microsoft.VisualBasic.Interaction]::AppActivate('Program Manager');[System.Windows.Forms.SendKeys]::SendWait('{F5}')"
exit
Nu uitati de backup ori de cate ori modificati, alterati sau actualizati programul saga ! folositi ScriptBackupFolderSAGAcompact_V2.1.7 https://forum.sagasoft.ro/viewtopic.php?p=349780#p349780

Scrie răspuns