Patch is not installed

Got a problem you cannot solve? Try here.
Post Reply
Sarah
Posts: 18
Joined: Wed May 22, 2013 6:12 am

Patch is not installed

Post by Sarah »

Hello,
i want to load the patches and updates on a server and download it on my computer and install it.
i split the updates-msi-code into download and installation part. For that i had to change the updates-msi-code. You will see this code below(Actual code). I have always test my code with UPDATES but not with Patches. For updates the above code works!
Now i wanted to test the same code with patches. But it does not work!!! I am sure that i make the correct settings for the patches trougth the designer. But anything is wrong with my updates msi code. But I really don't know what is wrong. Bevore changing code content and split into download and intallation part, the patch installation was correct.
With my actual updates msi code, the return value of installation of the patches is successfull(return value= Success(0)), but the changes that i made to the files, and the files that i added for the patch pack are not transferred on the target system.
Why does the installation fuction returns the value 0(=Success), when there are not made the changes on the target system??? And why the changes are not transferred? I would really be thankful for a help...

Code: Select all

Actual updates-msi-code
Comment: Script to Schedule, Download, and Install Updates
 
MessageBox: Message 61-Variable UPDATE_SCHEDULING, $UPDATE_SCHEDULING$
Set Variable _Supportdir_ to D:
Comment: Wichtig damit das Apply Install wirkt
Set Variable NATIVE_ENGINE to TRUE
[compiler if Variable UPDATE_SCHEDULING Equals TRUE]
MessageBox: Message 62-Variable UPDATE_SCHEDULING was Equals true, $UPDATE_SCHEDULING$
Comment: IMPORTANT!
Comment: If your setup uses the Native Engine,
Comment: And the Scheduled Web Update Mode;
Comment: Comment-in (enable) the line below:
Comment: Set Variable NATIVE_ENGINE to TRUE
MessageBox: Message 0:Begin, Message 0:Begin
 
Set Variable UPDATE_SCHEDULING to TRUE
 
[DEFINE REGION: Update Mode?]
MessageBox: Message 50: Region Update Mode, Message 50: Now Commandline is checked
Set Variable COMMANDLINE to $CMDLINE$
if Variable COMMANDLINE not Contains /update
  MessageBox: Message 1- not contains update, Message 1- not contains update
  Set Variable UPDATE_SCHEDULE to FALSE
  if Variable MAINTENANCE Equals FALSE
    MessageBox: Message 15- Maintenance Equals false, Message 15- Maintenance Equals false
    Set Variable UPDATE_SCHEDULE to TRUE
  end
  if Variable UPDATE_SCHEDULE Equals TRUE
    MessageBox: Message 16- UPDATE_SCHEDULE Equals true, Message 16- UPDATE_SCHEDULE Equals true
    Set Persistent Variable UPDATE_DOWNLOAD to TRUE
    Set Persistent Variable UPDATE_AUTO to FALSE
    Set Persistent Variable UPDATE_LOG to TRUE
    Set Persistent Variable UPDATE_NTKERNEL to 
    Set Persistent Variable WINDOWSINSTALLERDIR to 
    Get Common Folder Location System->Windows Directory into WINDOWSINSTALLERDIR
    Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008, 7, 2008 R2, 8, 2012) into UPDATE_NTKERNEL
    Set Variable WINDOWSINSTALLERDIR to $WINDOWSINSTALLERDIR$\Installer
    Set Variable ALLUSERS_BACKUP to $ALLUSERS$
    Set Variable ALLUSERS to TRUE
    Set Persistent Variable UPDATEEXE_ALLUSERS to $UNINSTALLLINK$
    Set Variable ALLUSERS to FALSE
    Set Persistent Variable UPDATEEXE_JUSTME to $UNINSTALLLINK$
    Set Variable ALLUSERS to $ALLUSERS_BACKUP$
  end
  if Variable MAINTENANCE Equals FALSE
    if Variable NEEDSUPGRADE Equals FALSE
      MessageBox: Message 17- NEEDSUPGRADE Equals False, Message 17- NEEDSUPGRADE Equals False
      Write Registry Key HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\$TITLE$ Update Setup, $UPDATEEXE_JUSTME$ /updatesetup
    end
  end
  if Variable UPDATE_NTKERNEL Equals TRUE
    MessageBox: Message 18- UPDATE_NTKERNEL Equals true, Message 18- UPDATE_NTKERNEL Equals true
    Create Shortcut $WINDOWSINSTALLERDIR$\#TITLE# Updates to $UPDATEEXE_JUSTME$
    else
    Recursively Delete Files $WINDOWSINSTALLERDIR$\$TITLE$ Updates.bat
    Write into Text File $WINDOWSINSTALLERDIR$\$TITLE$ Updates.bat from Value @echo off (at end of file)
    Write into Text File $WINDOWSINSTALLERDIR$\$TITLE$ Updates.bat from Value "$UPDATEEXE_JUSTME$" /update (at end of file)
  end
  if Variable UPDATEEXE_ALLUSERS not Equals (Ignore Case) $UPDATEEXE_JUSTME$
    if Variable MAINTENANCE Equals FALSE
      if Variable NEEDSUPGRADE Equals FALSE
        Write Registry Key HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\$TITLE$ Update Setup for All Users, $UPDATEEXE_ALLUSERS$ /updatesetup
      end
    end
    if Variable UPDATE_NTKERNEL Equals TRUE
      Create Shortcut $WINDOWSINSTALLERDIR$\#TITLE# Updates for All Users to $UPDATEEXE_ALLUSERS$
      else
      Recursively Delete Files $WINDOWSINSTALLERDIR$\$TITLE$ Updates for All Users.bat
      Write into Text File $WINDOWSINSTALLERDIR$\$TITLE$ Updates for All Users.bat from Value @echo off (at end of file)
      Write into Text File $WINDOWSINSTALLERDIR$\$TITLE$ Updates for All Users.bat from Value "$UPDATEEXE_ALLUSERS$" /update (at end of file)
    end
  end
  Set Variable ALLUSERS_BACKUP to $ALLUSERS$
  Set Variable ALLUSERS to TRUE
  Delete Files $ENGINECACHE$\installedupdates.dat (when uninstalling)
  Set Variable ALLUSERS to FALSE
  Delete Files $ENGINECACHE$\installedupdates.dat (when uninstalling)
  Set Variable ALLUSERS to $ALLUSERS_BACKUP$
  Delete Files $WINDOWSINSTALLERDIR$\#TITLE# Updates.bat (when uninstalling)
  Delete Files $WINDOWSINSTALLERDIR$\#TITLE# Updates for All Users.bat (when uninstalling)
  GoTo Label: End of Updates
end
<<Code Folding Region>>
 
[DEFINE REGION: Schedule Updates]
if Variable COMMANDLINE not Contains /updatesetup
  MessageBox: Message 2-not contain /updatesetup->checkupdates, Message 2- not contain /updatesetup->checkupdates
  GoTo Label: Check for Updates
end
MessageBox: Message 21-iam here, Message 21-iam here
 
Get System Setting Windows 9X Kernel (95, 98, ME) into WIN9X
Set Variable UPDATE_DATE to Every Sunday
Set Variable UPDATE_TIME to 3:00 AM
Set Variable UPDATE_KEEP to TRUE
if Variable WIN9X not Equals TRUE
  Get System Setting Logged on Domain Name into UPDATE_DOMAIN
  if Variable UPDATE_DOMAIN Equals 
    Get System Setting Logged on Computer Name into UPDATE_DOMAIN
  end
  Get System Setting Logged on User Name into UPDATE_USER
  Set Persistent Variable UPDATE_USER to $UPDATE_DOMAIN$\$UPDATE_USER$
  Set Variable {D79C8D3B-1601-40C3-809C-33DD360D72D4} to UPDATE_USER$MYAH$MYAH$TRUE
end
 
Show icon in system tray, minimize setup to system tray
MessageBalloon: $TITLE$ Updates, Configure automatic updates for $TITLE$.
 
label: Update Setup Welcome
Display Dialog: update_setup_welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
  GoTo Label: Update Setup End of Dialogs
end
label: Update Setup Schedule
Display Dialog: update_setup_schedule, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Update Setup Welcome
  else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Update Setup End of Dialogs
  end
end
label: Update Setup Account
if Variable WIN9X Equals FALSE
  if Variable UPDATE_KEEP Equals TRUE
    Display Dialog: update_setup_account, wait for dialog to return (modal)
  end
end
if Variable WIZARD Equals BACK
  GoTo Label: Update Setup Schedule
  else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Update Setup End of Dialogs
  end
end
label: Update Setup Finished
Display Dialog: update_setup_finish, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Update Setup Account
end
label: Update Setup End of Dialogs
 
if Variable WIZARD Equals CANCEL
  Terminate Installation
  else
  Get Common Folder Location System->Windows Directory into WINDOWSINSTALLERDIR
  Set Variable {D79C8D3B-1601-40C3-809C-33DD360D72D4} to UPDATE_USER$MYAH$MYAH$TRUE
  if Variable UPDATE_KEEP Equals TRUE
    Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008, 7, 2008 R2, 8, 2012) into UPDATE_NTKERNEL
    if Variable UPDATE_NTKERNEL Equals TRUE
      Get System Setting Windows Vista into UPDATE_VISTA
      if Variable ALLUSERS Equals TRUE
        if Variable UPDATE_VISTA Equals FALSE
          Schedule Task $TITLE$ Updates to run weekly
          else
          Schedule Task $TITLE$ Updates to run weekly
        end
        else
        if Variable UPDATE_VISTA Equals FALSE
          Schedule Task $TITLE$ Updates to run weekly
          else
          Schedule Task $TITLE$ Updates to run weekly
        end
      end
      else
      if Variable ALLUSERS Equals TRUE
        Schedule Task $TITLE$ Updates to run weekly
        else
        Schedule Task $TITLE$ Updates to run weekly
      end
    end
    else
    Delete Scheduled Task $TITLE$ Updates
  end
  Delete Registry VALUE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\$TITLE$ Update Setup
  Delete Registry VALUE HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\$TITLE$ Update Setup for All Users
end
 
Terminate Installation
<<Code Folding Region>>
 
[compiler else]
MessageBox: Message 63-Variable UPDATE_SCHEDULING was NOT Equals true, $UPDATE_SCHEDULING$
Set Variable UPDATE_SCHEDULING to FALSE
 
[compiler if Variable UPDATE_SCHEDULING Equals THIRD]
MessageBox: Message 64-Variable UPDATE_SCHEDULING was Equals Third, $UPDATE_SCHEDULING$
if Variable MAINTENANCE Equals TRUE
  [compiler end]
  MessageBox: Message 65-Compiler is in end block, $UPDATE_SCHEDULING$
  if Variable CMDLINE not Contains /update
    GoTo Label: End of Updates
  end
  [compiler if Variable UPDATE_SCHEDULING Equals THIRD]
  MessageBox: Message 66-Variable Update_Sceduling equals third, $UPDATE_SCHEDULING$
end
[compiler end]
 
[compiler if Variable UPDATE_SCHEDULING not Equals THIRD]
MessageBox: Message 67-Variable Update_Sceduling not equals third, $UPDATE_SCHEDULING$
Set Variable UPDATE_DOWNLOAD to TRUE
Set Variable UPDATE_AUTO to FALSE
Set Variable UPDATE_LOG to TRUE
[compiler else]
MessageBox: Message 68-compiler else, $UPDATE_SCHEDULING$
if Variable MAINTENANCE Equals TRUE
  Set Variable UPDATE_DOWNLOAD to TRUE
  Set Variable UPDATE_AUTO to FALSE
  Set Variable UPDATE_LOG to TRUE
  else
  Set Variable UPDATE_DOWNLOAD to FALSE
  Set Variable UPDATE_AUTO to TRUE
  Set Variable UPDATE_LOG to FALSE
end
[compiler end]
MessageBox: Message 69-compiler end, $UPDATE_SCHEDULING$
 
[compiler end]
MessageBox: Message 70-compiler end, $UPDATE_SCHEDULING$
if Variable CMDLINE Contains /update2
  MessageBox: Message 49: Commandline was /update2, Go to Label Install Prompt
  GoTo Label: Install Prompt
end
 
[DEFINE REGION: Download and Install Updates]
label: Check for Updates
Comment: die folgende Zeile ist auch schon ganz oben definiert
Set Variable _Supportdir_ to D:
Set Variable UPDATE_GET_INI to 
Download File #UPDATE_SERVER# into $_Supportdir_$\updates.ini (get result into variable UPDATE_GET_INI)
MessageBox: Message 3-Check for Updates, Message 3-download ini  file in $_Supportdir_$\updates.ini  URL:#UPDATE_SERVER#
 
Comment: Check Internet connectivity
if Variable UPDATE_GET_INI not Equals SUCCESS
  MessageBox: message 5- Check for Updates, get_ini not success
  [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
  [compiler else]
  [compiler if Variable UPDATE_SCHEDULING not Equals THIRD]
  MessageBox: Message 23- $TITLE$ Update, Message 23- Unable to contact update server for $TITLE$.$NEWLINE$$NEWLINE$Please check your Internet connection and try again.
  [compiler else]
  if Variable MAINTENANCE Equals TRUE
    MessageBox: Message 24- $TITLE$ Update, Message 24-Unable to contact update server for $TITLE$.$NEWLINE$$NEWLINE$Please check your Internet connection and try again.
    Terminate Installation
  end
  GoTo Label: End of Updates
  [compiler end]
  [compiler end]
  Terminate Installation
end
Comment: Check update availability
Get INI $_Supportdir_$\updates.ini, [Update Packs for Versions] $VERSION$ Value into Variable UPDATE_AVAILABLE
MessageBox: Message 66: UPDATE_SCHEDULING, $UPDATE_SCHEDULING$
MessageBox: Message 67: UPDATE_AVAILABLE, $UPDATE_AVAILABLE$
if Variable UPDATE_AVAILABLE Equals 
  MessageBox: Message 4- Check for Updates, Message 4- Update INI Available
  [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
  [compiler else]
  [compiler if Variable UPDATE_SCHEDULING not Equals THIRD]
  MessageBox: Message 25-$TITLE$ Update, Message 25-No updates are available for $TITLE$ at this time.$NEWLINE$$NEWLINE$Please check back again later.
  [compiler else]
  if Variable MAINTENANCE Equals TRUE
    MessageBox: Message 26-$TITLE$ Update, Message 26-No updates are available for $TITLE$ at this time.$NEWLINE$$NEWLINE$Please check back again later.
    Terminate Installation
  end
  GoTo Label: End of Updates
  [compiler end]
  [compiler end]
  Terminate Installation
end
MessageBox: Message 90: Set some Variables, Message 90: Set some Variables
 
Comment: Gather update details
Set Variable UPDATE_REBOOT to FALSE
Set Variable UPDATE_DETAIL to 
Set Variable UPDATE_AVAILABLE_TEMP to $UPDATE_AVAILABLE$
Set Variable UPDATE_COUNT to 0
Set Persistent Variable UPDATE_LOG to TRUE
if Variable UPDATE_LOG Equals TRUE
  Comment: Remove previously installed updates from list of available updates
  label: Remove Previously Installed
  Set Variable UPDATE_PREVIOUSLY_INSTALLED to 
  Read from Text File $EXEDIR$\installedupdates.dat into Variable UPDATE_PREVIOUSLY_INSTALLED (get EOF into UPDATE_EOF)
  MessageBox: Message 91: Read from installed-updates-file, $EXEDIR$\installedupdates.dat
  if Variable UPDATE_PREVIOUSLY_INSTALLED not Equals 
    MessageBox: Message 93: Bevor replacing update_available, $UPDATE_AVAILABLE$
    Replace $UPDATE_PREVIOUSLY_INSTALLED$$NEWLINE$ with  in variable UPDATE_AVAILABLE
    Replace $NEWLINE$$UPDATE_PREVIOUSLY_INSTALLED$ with  in variable UPDATE_AVAILABLE
    Replace $UPDATE_PREVIOUSLY_INSTALLED$ with  in variable UPDATE_AVAILABLE
    MessageBox: Message 94: After replacing update_available, $UPDATE_AVAILABLE$
  end
  if Variable UPDATE_EOF Equals FALSE
    GoTo Label: Remove Previously Installed
  end
  Comment: Quit if no new updates are available
  if Variable UPDATE_AVAILABLE Equals 
    [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
    [compiler else]
    MessageBox: $TITLE$ Update, No updates are available for $TITLE$ at this time.$NEWLINE$$NEWLINE$Please check back again later.
    [compiler end]
    Terminate Installation
  end
end
 
label: Form Description
Parse String $UPDATE_AVAILABLE_TEMP$ into Variables UPDATE_NAME and UPDATE_AVAILABLE_TEMP (Split at first occurrence of pattern)
UPDATE_COUNT = $UPDATE_COUNT$ + 1
Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] Description Value into Variable UPDATE_DETAIL_TEMP
MessageBox: Message 36-Form Description-UpdateName UpdateDetail, $UPDATE_NAME$ und  $UPDATE_DETAIL_TEMP$
if Variable UPDATE_DETAIL_TEMP not Equals 
  if Variable UPDATE_COUNT Equals 1
    Set Variable UPDATE_DETAIL to $UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_TEMP$
    MessageBox: Message 37-Form Description-UpdateName UpdateDetail, $UPDATE_NAME$ und  $UPDATE_DETAIL_TEMP$
    else
    MessageBox: Message 38-Form Description-UpdateName UpdateDetail, $UPDATE_NAME$ und  $UPDATE_DETAIL_TEMP$
    Set Variable UPDATE_DETAIL to $UPDATE_DETAIL$$NEWLINE$$NEWLINE$$UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_TEMP$
  end
end
if Variable UPDATE_AVAILABLE_TEMP not Equals 
  MessageBox: Message 39-Go to form description, Message 39-Go to form description
  GoTo Label: Form Description
end
 
Comment: Choose updates to download
if Variable UPDATE_DOWNLOAD Equals TRUE
  [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
  Show icon in system tray, minimize setup to system tray
  MessageBox: Updates are available for $TITLE$, The InstallAware Wizard has found updates for $TITLE$. Click here to download these updates.
  [compiler end]
end
label: Download Prompt
if Variable UPDATE_DOWNLOAD not Equals TRUE
  MessageBox: Message 27-Download Prompt, $UPDATE_AVAILABLE$
  Set Variable UPDATE_SELECTED to $UPDATE_AVAILABLE$
  else
  MessageBox: Message 26-Download Prompt, $UPDATE_AVAILABLE$
  Set Variable UPDATE_SELECTED to $UPDATE_AVAILABLE$
  Display Dialog: update_notify_download, wait for dialog to return (modal)
end
if Variable WIZARD Equals BACK
  Run Program $UNINSTALLLINK$ /updatesetup
  MessageBox: Message 28-Download Prompt, $UNINSTALLLINK$
  GoTo Label: Download Prompt
end
if Variable WIZARD Equals CANCEL
  Terminate Installation
end
if Variable UPDATE_SELECTED Equals 
  MessageBox: Message 29-$TITLE$ Updates, Message 29-Please select some updates to download.
  GoTo Label: Download Prompt
end
MessageBox: Message 9-Download Prompt, Message 9-Download selected updates
 
Comment: Download selected updates
[compiler if Variable UPDATE_SCHEDULING Equals TRUE]
MessageBox: Message 30-Downloading $TITLE$ updates..., The InstallAware Wizard is downloading updates.$NEWLINE$You can continue working while updates are being downloaded. To view detailed progress, click the $TITLE$ Update icon below.
Show icon in system tray, minimize setup to system tray
[compiler end]
Set Variable UPDATE_CURRENT to 0
Set Variable UPDATE_DOWNLOADED to 0
Set Variable UPDATE_SELECTED_TEMP to $UPDATE_SELECTED$
Set Variable UPDATE_DOWNLOAD_PROGRESS to 
Set Variable UPDATE_DETAIL_INSTALL to 
Set Variable DOWNLOADED_UPDATE_LIST to 
label: Download Updates
UPDATE_CURRENT = $UPDATE_CURRENT$ + 1
MessageBox: Message 31-Download Updates, Message 31- Update current=$UPDATE_CURRENT$ +1
Parse String $UPDATE_SELECTED_TEMP$ into Variables UPDATE_NAME and UPDATE_SELECTED_TEMP (Split at first occurrence of pattern)
MessageBox: Message 32-parse string, Message 32-$UPDATE_SELECTED_TEMP$
if Variable UPDATE_NAME not Equals 
  MessageBox: Message 33-Update Name, Message 33- $UPDATE_NAME$
  Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] Description Value into Variable UPDATE_DETAIL_INSTALL_TEMP
  if Variable UPDATE_DETAIL_INSTALL_TEMP not Equals 
    if Variable UPDATE_CURRENT Equals 1
      Set Variable UPDATE_DETAIL_INSTALL to $UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_INSTALL_TEMP$
      MessageBox: message 34-update current equals 1, $UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_INSTALL_TEMP$
      else
      Set Variable UPDATE_DETAIL_INSTALL to $UPDATE_DETAIL_INSTALL$$NEWLINE$$NEWLINE$$UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_INSTALL_TEMP$
      MessageBox: message 35-Download Updates, $UPDATE_DETAIL_INSTALL$$NEWLINE$$NEWLINE$$UPDATE_NAME$$NEWLINE$$UPDATE_DETAIL_INSTALL_TEMP$
    end
  end
  Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] URL Value into Variable UPDATE_DOWNLOAD_TEMP
  if Variable UPDATE_CURRENT Equals 1
    Set Variable UPDATE_DOWNLOAD_PROGRESS to Downloading $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_COUNT$)...
    MessageBox: message 36-Download Updates, Downloading $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_COUNT$)...
    else
    Set Variable UPDATE_DOWNLOAD_PROGRESS to $UPDATE_DOWNLOAD_PROGRESS$$UPDATE_DOWNLOAD_RESULT$$NEWLINE$Downloading $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_COUNT$)...
    MessageBox: message 36-Download Updates, $UPDATE_DOWNLOAD_PROGRESS$$UPDATE_DOWNLOAD_RESULT$$NEWLINE$Downloading $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_COUNT$)...
  end
  Display Dialog: update_download, use as progress dialog (non-modal)
  Set Variable UPDATE_GET_DOWNLOAD to 
  Set Variable UPDATE_ALREADY_EXIST to 
  MessageBox: Message 11-Download File, Message 11-Bevor downloading file 
  Does File Exist $_Supportdir_$\$UPDATE_NAME$.exe (get result into variable UPDATE_ALREADY_EXIST)
  if Variable UPDATE_ALREADY_EXIST Equals FALSE
    Download File $UPDATE_DOWNLOAD_TEMP$ into $_Supportdir_$\$UPDATE_NAME$.exe (get result into variable UPDATE_GET_DOWNLOAD)
    MessageBox: Message 80: Download File, $_Supportdir_$\$UPDATE_NAME$.exe
    else
    Set Variable UPDATE_GET_DOWNLOAD to SUCCESS
    MessageBox: Message 81: File already exist, $_Supportdir_$\$UPDATE_NAME$.exe
  end
  MessageBox: Message 12-Download File, Message 12-After  downloading file 
  MessageBox: Message 105-Download_Updates, UPDATE_GET_DOWNLOAD=$UPDATE_GET_DOWNLOAD$
  if Variable UPDATE_GET_DOWNLOAD Equals SUCCESS
    Set Variable UPDATE_DOWNLOAD_RESULT to done!
    MessageBox: Message 13-Download File, Message 13-download successful
    UPDATE_DOWNLOADED = $UPDATE_DOWNLOADED$ + 1
    if Variable UPDATE_DOWNLOADED Equals 1
      Set Variable DOWNLOADED_UPDATE_LIST to $UPDATE_NAME$
      else
      Set Variable DOWNLOADED_UPDATE_LIST to $DOWNLOADED_UPDATE_LIST$$NEWLINE$$UPDATE_NAME$
      Write into Text File $_Supportdir_$\$UPDATE_NAME$.txt from Value done 1 (at end of file)
      MessageBox: Message 103- Download Updates, DOWNLOADED_UPDATE_LIST=$DOWNLOADED_UPDATE_LIST$
    end
    else
    MessageBox: Message 14-Download File, Message 14-download failed
    Set Variable UPDATE_DOWNLOAD_RESULT to failed!
    Replace $UPDATE_NAME$$NEWLINE$ with  in variable UPDATE_SELECTED
    Replace $NEWLINE$$UPDATE_NAME$ with  in variable UPDATE_SELECTED
    Replace $UPDATE_NAME$ with $UPDATE_NAME$ [download was unsuccessful] in variable UPDATE_DETAIL_INSTALL
    Write into Text File $_Supportdir_$\$UPDATE_NAME$.txt from Value failed 0 (at end of file)
    Does File Exist $_Supportdir_$\$UPDATE_NAME$.exe (get result into variable UPDATE_ALREADY_EXIST)
    if Variable UPDATE_ALREADY_EXIST Equals TRUE
      Delete Files $_Supportdir_$\$UPDATE_NAME$.exe (when installing)
      Apply Install
    end
    Hide Dialog
    if Variable ABORT Equals TRUE
      Terminate Installation
    end
    Comment: Sobald ein Update nicht heruntergeladen werden kann, sollen die weiteren Updates auch nicht heruntergeladen werden, damit die Reihenfolge der Updates erhalten bleibt
    MessageBox: Message 100- Download Updates, Download Block wird abgebrochen, da sonst die Reihenfolge der Update Installation nicht beibehalten werden kann
    GoTo Label: After_Download_Updates
  end
end
if Variable UPDATE_CURRENT not Equals $UPDATE_COUNT$
  GoTo Label: Download Updates
end
label: After_Download_Updates
Comment: In UPDATE_SELECTED steht z.B. Update1,Update2, Update3. Wenn Update2 nicht erfolgreich war, soll Update3 auch nicht drin stehen...es sollen nur erfolgreich gedownloadete Updatenamen drinstehen. DOWNLOADED_UPDATE_LIST enthält nur die Namen der Updates, welche tatsächlich installiert wurden
MessageBox: Message 104- Download Updates, DOWNLOADED_UPDATE_LIST=$DOWNLOADED_UPDATE_LIST$
Set Variable UPDATE_SELECTED to $DOWNLOADED_UPDATE_LIST$
Set Variable VARIABLES_FOLDER_EXIST to 
Does Folder Exist $_Supportdir_$\VARIABLES (get result into variable VARIABLES_FOLDER_EXIST)
MessageBox: RESULT Folder VARIABLES, $VARIABLES_FOLDER_EXIST$
if Variable VARIABLES_FOLDER_EXIST Equals FALSE
  Create Folder $_Supportdir_$\VARIABLES
  Apply Install (get result into variable $VARIABLES_FOLDER_EXIST$)
  MessageBox: Message 73-Download Updates-Verzeichnis Variables, $VARIABLES_FOLDER_EXIST$
end
Set Variable VARIABLES_FILES_DELETED to 
MessageBox: Message 70: Download Updates- UPDATE_Selected, $UPDATE_SELECTED$
Comment: Run Program  del /f /s /q $_Supportdir_$\VARIABLES
Delete Files $_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt (when installing)
Delete Files $_Supportdir_$\VARIABLES\UPDATE_DOWNLOADED.txt (when installing)
Apply Install (get result into variable VARIABLES_FILES_DELETED)
Write into Text File $_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt from Value $UPDATE_SELECTED$ (at end of file)
MessageBox: Message 83: Files Deleted from , $VARIABLES_FILES_DELETED$
Write into Text File $_Supportdir_$\VARIABLES\UPDATE_DOWNLOADED.txt from Value $UPDATE_DOWNLOADED$ (at end of file)
Comment: Choose updates to install
if Variable UPDATE_AUTO Equals FALSE
  [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
  MessageBalloon: Updates are ready for $TITLE$, The InstallAware Wizard has downloaded updates for $TITLE$. Click here to install these updates.
  Show icon in system tray, minimize setup to system tray
  [compiler end]
end
GoTo Label: End of Updates
label: Install Prompt
MessageBox: Message 82: Install Prompt- Uninstalllink, $UNINSTALLLINK$
Set Variable UPDATE_DOWNLOADED_RESULT to 
Set Variable UPDATE_SELECTED_RESULT to 
Read from Text File #READALL\$_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt into Variable UPDATE_SELECTED (get EOF into UPDATE_SELECTED_RESULT)
Read from Text File #READALL\$_Supportdir_$\VARIABLES\UPDATE_DOWNLOADED.txt into Variable UPDATE_DOWNLOADED (get EOF into UPDATE_DOWNLOADED_RESULT)
MessageBox: Message 70: Install Prompt-UPDATE_SELECTED, $UPDATE_SELECTED$
MessageBox: Message 71: Install Prompt-UPDATE_DOWNLOADED, $UPDATE_DOWNLOADED$
if Variable UPDATE_SELECTED not Equals 
  if Variable UPDATE_AUTO Equals TRUE
    Set Variable UPDATE_SELECTED_INSTALL to $UPDATE_SELECTED$
    MessageBox: Message 40- Update_Auto equals true, Message 40- Update_Auto equals true
    else
    Set Variable UPDATE_SELECTED_INSTALL to $UPDATE_SELECTED$
    Display Dialog: update_notify_install, wait for dialog to return (modal)
    MessageBox: Message 41- Update_Auto equals false, Message 41- Update_Auto equals false
  end
  if Variable WIZARD Equals BACK
    Run Program $UNINSTALLLINK$ /updatesetup
    MessageBox: Message 42- wizard back-uninstalllink, $UNINSTALLLINK$
    GoTo Label: Install Prompt
  end
  if Variable WIZARD Equals CANCEL
    MessageBox: Message 43- wizard cancel, Message 43- wizard cancel
    Terminate Installation
  end
  if Variable UPDATE_SELECTED_INSTALL Equals 
    MessageBox: Message 44-$TITLE$ Updates, Message 44-Please select some updates to install.
    GoTo Label: Download Prompt
  end
   
  Comment: Install selected updates
  [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
  MessageBalloon: Message 45-Installing $TITLE$ updates..., Message 45-The InstallAware Wizard is installing updates.$NEWLINE$You can continue working while updates are being installed. To view detailed progress, click the $TITLE$ Update icon below.
  Show icon in system tray, minimize setup to system tray
  [compiler end]
  Set Variable UPDATE_CURRENT to 0
  Set Variable UPDATE_SELECTED_TEMP to $UPDATE_SELECTED_INSTALL$
  Set Variable UPDATE_GET_DOWNLOAD to 
  Set Variable INSTALL_UPDATE_SUCCESS to 
  label: Install Updates
  if Variable UPDATE_CURRENT Equals 1
  end
  UPDATE_CURRENT = $UPDATE_CURRENT$ + 1
  MessageBox: message 46-update current, $UPDATE_CURRENT$
  if Variable UPDATE_DOWNLOADED not Equals 0
    PROGRESS = $UPDATE_CURRENT$ * 100
    PROGRESS = $PROGRESS$ / $UPDATE_DOWNLOADED$
    MessageBox: Message 47-Install updates-Progress/downloaded, $PROGRESS$ AND $UPDATE_DOWNLOADED$
  end
  Parse String $UPDATE_SELECTED_TEMP$ into Variables UPDATE_NAME and UPDATE_SELECTED_TEMP (Split at first occurrence of pattern)
  MessageBox: Message 47-Install updates-update_selected_temp, $UPDATE_SELECTED_TEMP$
  if Variable UPDATE_NAME not Equals 
    Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] URL Value into Variable UPDATE_DOWNLOAD_TEMP
    Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] Silent Value into Variable UPDATE_SILENT
    Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] Parameters Value into Variable UPDATE_PARAMETERS
    MessageBox: Message 48-Install updates-update_name, $UPDATE_NAME$
    MessageBox: Message 49-Install updates-update_downloaded_temp, $UPDATE_DOWNLOAD_TEMP$
    MessageBox: Message 50-Install updates-update_silent, $UPDATE_SILENT$
    MessageBox: Message 50-Install updates-parameters, $UPDATE_PARAMETERS$
    if Variable UPDATE_REBOOT Equals FALSE
      Get INI $_Supportdir_$\updates.ini, [$UPDATE_NAME$] Reboot Value into Variable UPDATE_REBOOT_TEMP
      MessageBox: Message 51-Install updates-reboot equals false, $UPDATE_REBOOT_TEMP$
      if Variable UPDATE_REBOOT_TEMP Contains (Ignore Case) Yes
        Set Variable UPDATE_REBOOT to TRUE
        MessageBox: Message 51-Install updates-reboot equals true, Message 51-Install updates-reboot equals true
      end
    end
    if Variable UPDATE_CURRENT Equals 1
      Set Variable UPDATE_INSTALL_PROGRESS to Installing $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_DOWNLOADED$)...
      MessageBox: Message 52-Install updates-UPDATE_CURRENT equals 1, Installing $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_DOWNLOADED$)...
      else
      Set Variable UPDATE_INSTALL_PROGRESS to $UPDATE_INSTALL_PROGRESS$finished!$NEWLINE$Installing $UPDATE_NAME$ for $TITLE$ ($UPDATE_CURRENT$ of $UPDATE_DOWNLOADED$)...
      MessageBox: Message 53-Install updates-UPDATE_INSTALL_PROGRESS,  $UPDATE_INSTALL_PROGRESS$ 
    end
    Display Dialog: update_install, use as progress dialog (non-modal)
    Set Variable UPDATE_GET_DOWNLOAD to 
    if Variable UPDATE_SILENT not Contains (Ignore Case) No
      Set Variable SILENTVAR to /s
      else
      Set Variable SILENTVAR to 
    end
    MessageBox: Message 55-Install updates-silentvar, $SILENTVAR$ 
    Run Program $_Supportdir_$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT, get result into variable INSTALL_UPDATE_SUCCESS)
    MessageBox: Message 105-Install Updates, INSTALL_UPDATE_SUCCESS=$INSTALL_UPDATE_SUCCESS$
    if Variable UPDATE_LOG Equals TRUE
      Write into Text File $EXEDIR$\installedupdates.dat from Value $UPDATE_NAME$ (at end of file)
      MessageBox: Message 56-Install updates-updatelog , $UPDATE_LOG$ 
    end
    Comment: Abgearbeitete Updates in der Selected Datei  wegstreichen
    if Variable INSTALL_UPDATE_SUCCESS Equals 0
      Set Variable SELECTED_FILE_CONTENT to 
      Read from Text File #READALL\$_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt into Variable SELECTED_FILE_CONTENT (get EOF into UPDATE_SELECTED_RESULT)
      MessageBox: Message 93: Bevor replacing SELECTED_FILE_CONTENT, $SELECTED_FILE_CONTENT$
      Replace $UPDATE_NAME$$NEWLINE$ with  in variable SELECTED_FILE_CONTENT
      Replace $NEWLINE$$UPDATE_NAME$ with  in variable SELECTED_FILE_CONTENT
      Replace $UPDATE_NAME$ with  in variable SELECTED_FILE_CONTENT
      MessageBox: Message 94: After replacing SELECTED_FILE_CONTENT, $SELECTED_FILE_CONTENT$
      Delete Files $_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt (when installing)
      Apply Install
      Write into Text File $_Supportdir_$\VARIABLES\UPDATE_SELECTED.txt from Value $SELECTED_FILE_CONTENT$ (at end of file)
      else
      Comment: Wenn die Installation eines Packetes nicht erfolgreich war, dann sollen die anderen Updates auch nicht installiert werden
      MessageBox: Message 101- Install Updates, Die Installation muss abbrechen, da das aktuelle Update nicht installiert werden konnte
      Terminate Installation
    end
    Hide Dialog
    if Variable ABORT Equals TRUE
      Terminate Installation
    end
  end
  MessageBox: Message 55-Install updates-UPDATE_DOWNLOADED, $UPDATE_DOWNLOADED$ 
  if Variable UPDATE_DOWNLOADED Greater Than $UPDATE_CURRENT$
    MessageBox: Message 56-Install updates-UPDATE_DOWNLOADED, $UPDATE_DOWNLOADED$ 
    GoTo Label: Install Updates
  end
  if Variable UPDATE_REBOOT Equals TRUE
    Display Dialog: update_reboot, wait for dialog to return (modal)
    [compiler if Variable UPDATE_SCHEDULING Equals TRUE]
    MessageBalloon: Restart required, Your computer needs to be restarted before changes made to $TITLE$ take effect.
    [compiler end]
    if Variable WIZARD Equals NEXT
      Reboot Computer
    end
  end
  else
  MessageBox: Message 74:-No Updates are available, Message 74:-No Updates are available
  Terminate Installation
end
Set Variable NATIVE_ENGINE to FALSE
MessageBox: Message 85-Set Native Engine to false, Message 85-Set Native Engine to false
 
Terminate Installation
<<Code Folding Region>>
 
label: End of Updates
 
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Patch is not installed

Post by FrancescoT »

Dear Sarah,

I'm really sorry, but I'm not quite sure to follow your problem.

You say that with your script, the patch seems to install fine but in reality doesn't.

If you try to manually install the patch, does it install correctly?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply