Problem description thread.
Download executable.
Dim $appname
$appname = "LST Fixer"
Dim $machine = InputBox($appname, "Enter a workstation name to fix LST packages on.")
If($machine) Then
; Ok. Set ini file path and confirm
$inifile = "Q:\PackageControl\" & $machine & ".ini"
;MsgBox(0, $appname, "Going to fix " & $machine & " with INI file: " & $inifile & ".")
If Not FileExists($inifile) Then
MsgBox(16, $appname, "No INI file for that machine - bad hostname? Cannot continue.")
Exit
EndIf
; Write INI file
IniWrite($inifile, "Applications Packages", "RM LST SAG.ini", "INSTALL_PENDING")
IniWrite($inifile, "Applications Packages", "RM LST Common.ini", "INSTALL_PENDING")
IniWrite($inifile, "Tools Packages", "RM LST Station Upgrade.ini", "INSTALL_PENDING")
$status = Ping($machine, 2000)
if $status Then
$reboot = MsgBox(4 + 32, $appname, "The INI file has updated and the machine is currently switched on. Reboot now?")
If($reboot = 6) Then
$command = "cmd /c shutdown -m \\" & $machine & " -r -t 5"
RunWait($command)
Else
MsgBox(64, $appname, "Not rebooting. LST will be fixed on next boot of machine.")
EndIf
Else
Msgbox(48, $appname, "No ping response from machine. The INI file has been updated and LST will be fixed on next boot.")
EndIf
EndIf
Exit