Revert "Use a shutdown script to upgrade FWSUpdates"

This reverts commit bb370e0552.
master
Daniel Berteaud 9 years ago
parent 914653e3fa
commit 787000bc6a
  1. 9
      packages/fwsupdates.xml
  2. 2
      root/etc/e-smith/templates/home/e-smith/files/shares/tools/files/scripts/fwsupdates/install.bat/20script
  3. 0
      softwares/offline_upgrade.bat

@ -6,13 +6,12 @@
reboot="false" reboot="false"
priority="95"> priority="95">
<variable name="PKG_VERSION" value="1.11" /> <variable name="PKG_VERSION" value="1.10" />
<check type="registry" condition="equals" path="HKLM\Software\FWS\Updates\ClientVersion" value="%PKG_VERSION%" /> <check type="registry" condition="equals" path="HKLM\Software\FWS\Updates\ClientVersion" value="%PKG_VERSION%" />
<install cmd='%COMSPEC% /C if not exist "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" mkdir "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown"' /> <install cmd='%COMSPEC% /C if not exist "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" mkdir "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown"' />
<install cmd='%COMSPEC% /C copy /Y "%SOFTWARE%\fwsupdates\fwsupdates.vbs" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates.upgrade.vbs"' /> <install cmd='%COMSPEC% /C copy /Y "%SOFTWARE%\fwsupdates\fwsupdates.vbs" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates.upgrade.vbs"' />
<install cmd='%COMSPEC% /C copy /Y "%SOFTWARE%\fwsupdates\fwsupdates_upgrade.bat" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates_upgrade.bat"' />
<install cmd='%COMSPEC% /C if not exist "%SystemDrive%\FWSUpdates" mkdir "%SystemDrive%\FWSUpdates"' /> <install cmd='%COMSPEC% /C if not exist "%SystemDrive%\FWSUpdates" mkdir "%SystemDrive%\FWSUpdates"' />
<install cmd='%COMSPEC% /C xcopy /I /E /Y "%SOFTWARE%\fwsupdates\FWSUpdates\assets" "%SystemDrive%\FWSUpdates\assets.upgrade"' /> <install cmd='%COMSPEC% /C xcopy /I /E /Y "%SOFTWARE%\fwsupdates\FWSUpdates\assets" "%SystemDrive%\FWSUpdates\assets.upgrade"' />
<install cmd='%COMSPEC% /C xcopy /I /E /Y "%SOFTWARE%\fwsupdates\FWSUpdates\bin" "%SystemDrive%\FWSUpdates\bin.upgrade"' /> <install cmd='%COMSPEC% /C xcopy /I /E /Y "%SOFTWARE%\fwsupdates\FWSUpdates\bin" "%SystemDrive%\FWSUpdates\bin.upgrade"' />
@ -36,10 +35,10 @@
<install cmd='%COMSPEC% /C regini %SETTINGS%\fwsupdates\run_on_shutdown_reg.txt' /> <install cmd='%COMSPEC% /C regini %SETTINGS%\fwsupdates\run_on_shutdown_reg.txt' />
<install cmd='cscript //Nologo "%SOFTWARE%\fwsupdates\create_shortcut.vbs' /> <install cmd='cscript //Nologo "%SOFTWARE%\fwsupdates\create_shortcut.vbs' />
<install cmd='cscript //Nologo "%SOFTWARE%\fwsupdates\localgp.vbs" fwsupdates.vbs false MACHINE' /> <install cmd='cscript //Nologo "%SOFTWARE%\fwsupdates\localgp.vbs" fwsupdates.vbs false MACHINE' />
<install cmd='cscript //Nologo "%SOFTWARE%\fwsupdates\localgp.vbs" fwsupdates_upgrade.bat false MACHINE' />
<install cmd='schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\FWSUpdates\bin\delayed_sync.bat" /f' /> <install cmd='schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\FWSUpdates\bin\delayed_sync.bat" /f' />
<install cmd='%COMSPEC% /C echo reg add "HKLM\Software\FWS\Updates" /v "ClientVersion" /t REG_SZ /d "%PKG_VERSION%" /f &gt;&gt; "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates_upgrade.bat"' /> <install cmd='reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v WPKGUpgrade /t REG_SZ /d "cmd.exe /c \"%SystemDrive%\FWSUpdates\offline_upgrade.bat\"" /f' />
<install cmd='%COMSPEC% /C echo cscript "%SystemDrive%\FWSUpdates\repository\wpkg.js" /nonotify /upgrade:fwsupdates &gt;&gt; "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates_upgrade.bat"' /> <install cmd='%COMSPEC% /C echo reg add "HKLM\Software\FWS\Updates" /v "ClientVersion" /t REG_SZ /d "%PKG_VERSION%" /f &gt;&gt; %SystemDrive%\FWSUpdates\offline_upgrade.bat' />
<install cmd='%COMSPEC% /C echo cscript "%SystemDrive%\FWSUpdates\repository\wpkg.js" /nonotify /upgrade:fwsupdates &gt;&gt; %SystemDrive%\FWSUpdates\offline_upgrade.bat' />
<upgrade include='install' /> <upgrade include='install' />

@ -1,7 +1,6 @@
net use \\%IPASSERELLE_IP%\wpkg net use \\%IPASSERELLE_IP%\wpkg
if not exist "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" mkdir "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" if not exist "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown" mkdir "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown"
copy /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\fwsupdates.vbs" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\" copy /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\fwsupdates.vbs" "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\"
copy /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\fwsupdates_upgrade.bat "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\"
del /q "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\wpkg.bat" del /q "%SYSTEMROOT%\system32\GroupPolicy\Machine\Scripts\Shutdown\wpkg.bat"
if not exist "%SystemDrive%\FWSUpdates" mkdir "%SystemDrive%\FWSUpdates" if not exist "%SystemDrive%\FWSUpdates" mkdir "%SystemDrive%\FWSUpdates"
xcopy /E /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\FWSUpdates\*" "%SystemDrive%\FWSUpdates\" xcopy /E /Y "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\FWSUpdates\*" "%SystemDrive%\FWSUpdates\"
@ -25,7 +24,6 @@ regedit /S "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\gp.reg"
regedit /S "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\dav_limit.reg" regedit /S "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\dav_limit.reg"
regini "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\run_on_shutdown_reg.txt" regini "\\%IPASSERELLE_IP%\wpkg\settings\fwsupdates\run_on_shutdown_reg.txt"
cscript //Nologo "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\localgp.vbs" fwsupdates.vbs false MACHINE cscript //Nologo "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\localgp.vbs" fwsupdates.vbs false MACHINE
cscript //Nologo "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\localgp.vbs" fwsupdates_upgrade.bat false MACHINE
cscript "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\create_shortcut.vbs" cscript "\\%IPASSERELLE_IP%\wpkg\softwares\fwsupdates\create_shortcut.vbs"
schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\FWSUpdates\bin\delayed_sync.bat" /f schtasks.exe /Create /tn "sync_wpkg" /sc hourly /mo 3 /ru "SYSTEM" /tr "%SystemDrive%\FWSUpdates\bin\delayed_sync.bat" /f
robocopy /MIR /R:10 \\%IPASSERELLE_IP%\wpkg\ %SystemDrive%\FWSUpdates\repository\ robocopy /MIR /R:10 \\%IPASSERELLE_IP%\wpkg\ %SystemDrive%\FWSUpdates\repository\

Loading…
Cancel
Save