I used "java -jar STAF3... -silent" on Windows (I only
have 2003 so i can only cite that platform) to upgrade
a running level of 2.6.7 to 3.0.1.
Several files are clearly scheduled for deletion by
being renamed *.delete_on_reboot
when the machine is rebooted, those files are gone...
but so are the replacements! This was observed across
13 machines.
files affected :
STAF.dll
STAFDSLS.dll
STAFProc.exe
Logged In: YES
user_id=285070
To avoid this problem, stop STAF V2.x before migrating to
STAF 3.x.
Logged In: YES
user_id=285133
Also, to pick up the lost files, just do another silent
install of 3.0.1.
Note that this happens both for GUI and silent installs, but
only if you are migrating from STAF 2.x to STAF 3.0 (and you
do the STAF 3.0 installation while the STAF 2.x version is
up and running, so the files are in use).
If you do a similar migration from STAF 3.0.1 to STAF 3.0.2
(without shutting down STAF 3.0.1) this problem will not occur.
I've opened an InstallShield PR to see if there's anything
that can be done to correct this problem.
Logged In: YES
user_id=285133
Also note that this problem only occurs on Windows, not Unix.
Logged In: YES
user_id=285133
Updated the 3.x installer to check if STAF is running (if
the target installation already has STAF 2.x installed). If
it is running, then after the silent uninstall of the 2.x
version, the user will get a popup indicating that they must
reboot the system and then restart the STAF installation.
If doing a silent installation, the reboot message will be
written to standard output and the installer will exit with
a 1000 exit code.
===================================================================
RCS file: /cvsroot/staf/src/staf/install/ismp/STAF.uip,v
retrieving revision 1.12
diff -r1.12 STAF.uip
14992a14993
> <property name="stafProcRunning">False</property>
15047a15049,15064
> <wizardBean class="STAFFilesInUse" id="bean16">
> <condition id="stringComparison"
type="com.installshield.wizardx.c
onditions.StringComparisonWizardBeanCondition">
> <property name="evaluate">1</property>
> <property name="immutable">False</property>
> <property name="comments"/>
> <property name="compareText">true</property>
> <property name="operation">0</property>
> <property
name="source">$W(checkForExistingSTAFProc.stafProcRu
nning)</property>
> </condition>
> <property name="displayName">STAF Files In
Use</property>
> <property name="active">True</property>
> <property name="buildCategories"/>
> <property name="comments"/>
> <property name="conditionOperator">AND</property>
> <property name="conditionSet"/>
> </wizardBean>
===================================================================
RCS file:
/cvsroot/staf/src/staf/install/ismp/classes/STAFCheckForExistingSTAFPr
oc.java,v
retrieving revision 1.2
diff -r1.2 STAFCheckForExistingSTAFProc.java
9a10
> import com.installshield.wizard.service.system.*;
16a18
> private boolean stafProcRunning = false;
17a20
> private String stafClientBinary = "";
25a29
> stafClientBinary = "STAF.exe";
29a34
> stafClientBinary = "STAF";
31a37
> String installLocation =
resolveString("$P(absoluteInstallLocation)");
33c39
< String stafProcFileName =
resolveString("$P(absoluteInstallLocation)")
---
> String stafProcFileName = installLocation
38a45,76
>
> String windows =
resolveString("$W(stafPlatform.Windows)");
>
> if (stafProcExists &&
(platform.indexOf("name=\"Windows") > -1))
> {
> try
> {
> String command = installLocation + "/bin/"
+ stafClientBinary
+
> " local ping ping";
> Process pid =
Runtime.getRuntime().exec(command);
>
> BufferedReader br = new BufferedReader(new
> InputStreamReader(pid.getInputStream()));
>
> String str = null;
> while ((str = br.readLine()) != null)
> {
> // Do nothing
> }
>
> int rc = pid.exitValue();
>
> if (rc == 0)
> {
> setStafProcRunning(true);
> }
> }
> catch (IOException ex)
> {
> ex.printStackTrace();
> }
> }
49a88,97
>
> public boolean getStafProcRunning()
> {
> return stafProcRunning;
> }
>
> public void setStafProcRunning(boolean bool)
> {
> stafProcRunning = bool;
> }
===================================================================
New file install/ismp/classes/STAFFilesInUse.java:
/*****************************************************************************/
/* Software Testing Automation Framework (STAF)
*/
/* (C) Copyright IBM Corp. 2005
*/
/*
*/
/* This software is licensed under the Common Public License
(CPL) V1.0. */
/*****************************************************************************/
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.util.*;
import com.installshield.product.service.product.*;
public class STAFFilesInUse extends WizardAction
{
String title = "Reboot system";
String message = "To process locked files, please
restart the " +
"system now. After the system reboots, restart the
STAF " +
"installer to complete the installation.";
public void execute(WizardBeanEvent event)
{
if (event.getUserInterface() != null)
{
// This is not silent mode, so we can
display a message
event.getUserInterface().displayUserMessage(title, message,
UserInputRequest.MESSAGE);
}
else
{
System.out.println(message);
}
getWizard().exit(1000);
}
}
===================================================================
RCS file: /cvsroot/staf/src/staf/History,v
retrieving revision 1.397
retrieving revision 1.396
diff -r1.397 -r1.396
28,30d27
< - Fixed problem during 2.x -> 3.x upgrade install (with
the 2.x version stil
l
< running) where some binary files were missing after
the reboot
< (Bug #1247355)
===================================================================
RCS file: /cvsroot/staf/src/staf/docs/userguide/Install.script,v
retrieving revision 1.47
diff -r1.47 Install.script
49a50,52
> :p.When upgrading an existing version of STAF, it is
recommended that you
> shutdown the existing version of STAF before beginning the
upgrade
> installation.
Logged In: YES
user_id=285133
Also added a panel to recommend that the user shutdown the
existing version of STAF before proceeding with the
installation.
===================================================================
RCS file: /cvsroot/staf/src/staf/install/ismp/STAF.uip,v
retrieving revision 1.13
diff -r1.13 STAF.uip
15024a15025,15072
> <wizardBean
class="com.installshield.wizardx.panels.TextDisplayPanel"
id="bean1423">
> <condition id="stringComparison"
type="com.installshield.wizardx.c
onditions.StringComparisonWizardBeanCondition">
> <property name="evaluate">1</property>
> <property name="immutable">False</property>
> <property name="comments"/>
> <property name="compareText">true</property>
> <property name="operation">0</property>
> <property
name="source">$W(checkForExistingSTAFProc.stafProcRu
nning)</property>
> </condition>
> <property name="displayName">Text Display
Panel - Shutdown STAF</p
roperty>
> <property name="active">True</property>
> <property name="buildCategories"/>
> <property name="comments"/>
> <property name="conditionOperator">AND</property>
> <property name="conditionSet"/>
> <property name="title"/>
> <property
name="description">$L(com.installshield.wizardx.i18n.Wiz
ardXResources, TextDisplayPanel.description)</property>
> <property name="navigationOptions">0</property>
> <property name="htmlHelpResource"/>
> <property name="helpString"/>
> <property name="text">The existing version of
STAF at the target i
nstall location is currently running. It is recommended
that you now shutdown t
he existing version of STAF before proceeding with the
installation. If you do
not shutdown the existing version of STAF, you will need to
reboot the machine t
o complete the installation.</property>
> <property name="textSource">1</property>
> <property name="fileName"/>
> <property name="fileEncoding"/>
> <property
name="resolveFileContents">False</property>
> <property
name="includeLocalizedFiles">False</property>
> <property name="contentType">2</property>
> <property name="showBorder">False</property>
> <property name="busyMessage"/>
> </wizardBean>
> <wizardBean class="STAFCheckForExistingSTAFProc"
id="checkForExistingS
TAFProc2">
> <condition id="stringComparison"
type="com.installshield.wizardx.c
onditions.StringComparisonWizardBeanCondition">
> <property name="evaluate">1</property>
> <property name="immutable">False</property>
> <property name="comments"/>
> <property name="compareText">false</property>
> <property name="operation">0</property>
> <property
name="source">$W(findInstances.isUpgrade)</property>
> </condition>
> <property name="displayName">STAF Check For
Existing STAF Proc</pr
operty>
> <property name="active">True</property>
> <property name="buildCategories"/>
> <property name="comments"/>
> <property name="conditionOperator">AND</property>
> <property name="conditionSet"/>
> <property name="stafProcExists">False</property>
> <property name="stafProcRunning">False</property>
> </wizardBean>
15056c15104
< <property
name="source">$W(checkForExistingSTAFProc.stafProcRu
nning)</property>
---
> <property
name="source">$W(checkForExistingSTAFProc2.stafProcR
unning)</property>