diff --git a/packages/fwsupdates.xml b/packages/fwsupdates.xml
index 9a926c9..0f4dddd 100755
--- a/packages/fwsupdates.xml
+++ b/packages/fwsupdates.xml
@@ -6,12 +6,11 @@
reboot="false"
priority="95">
-
+
-
@@ -36,7 +35,6 @@
-
diff --git a/softwares/fwsupdates.vbs b/softwares/fwsupdates.vbs
index 13188fd..1aaf286 100644
--- a/softwares/fwsupdates.vbs
+++ b/softwares/fwsupdates.vbs
@@ -1,2 +1,7 @@
Set objShell = CreateObject("Wscript.Shell")
+Set fsObject = CreateObject("Scripting.FileSystemObject")
objShell.Run """" & objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") & "\FWSUpdates\bin\on_shutdown.bat" & """", 0, True
+If fsObject.FileExists(objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") & "\FWSUpdates\offline_upgrade.bat") Then
+ objShell.Run """" & objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") & "\FWSUpdates\offline_upgrade.bat" & """", 0, True
+ fsObject.DeleteFile(objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%") & "\FWSUpdates\offline_upgrade.bat")
+End If
diff --git a/softwares/offline_upgrade.bat b/softwares/offline_upgrade.bat
index 15b19f5..ff2b401 100644
--- a/softwares/offline_upgrade.bat
+++ b/softwares/offline_upgrade.bat
@@ -15,9 +15,5 @@ IF EXIST "%SystemDrive%\FWSUpdates\lang.upgrade" (
RENAME "%SystemDrive%\FWSUpdates\lang.upgrade" lang
)
IF EXIST "%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown\wpkg.bat" DEL /F /Q "%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown\wpkg.bat"
-IF EXIST "%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates.upgrade.vbs" (
- DEL /Q "%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates.vbs"
- RENAME "%SystemRoot%\System32\GroupPolicy\Machine\Scripts\Shutdown\fwsupdates.upgrade.vbs" fwsupdates.vbs
-)
reg delete "HKLM\Software\FWS\Updates" /v PendingChanges /f
reg delete "HKLM\Software\FWS\Updates" /v PendingChangesList /f