Difference between revisions of "PureEdge Viewer"
From WPKG | Open Source Software Deployment and Distribution
(Add silent uninstaller) |
m (→Silent Uninstall: Display the perl script name instead of the perl executable in the Usage message.) |
||
Line 51: | Line 51: | ||
# Command arguments | # Command arguments | ||
− | $#ARGV == 0 or die "Usage:\n$ | + | $#ARGV == 0 or die "Usage:\n$0 <file>\n"; |
# Open and validate file | # Open and validate file |
Revision as of 17:26, 2 December 2010
PureEdge Viewer has been superseded by Lotus Forms Viewer.
Silent installer for PureEdge Viewer. http://www.e-publishing.af.mil/viewerdownload.asp
PureEdge Viewer 6.5 Installer
This installer uses InstallShield. You need to first create a silent installer script by running the following command:
PEViewer650DODJ12.exe /s /a /r /f1C:\setup.iss
This creates the silent installer answer script in C:\setup.iss
I've also added an install line for unzipping all of the forms to the All Users Desktop. You can remove this line and the "7zip" depends line, if this step is not needed.
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
id="pureedge"
name="PureEdge Viewer"
revision="65.1"
reboot="false"
priority="1">
<check type="uninstall" condition="exists" path="PureEdge Viewer 6.5" />
<depends package-id="7zip" />
<depends package-id="activeperl" />
<install cmd='"%SOFTWARE%\pureedge\PEViewer650DODJ12.exe" /s /a /s /sms /f1"%SOFTWARE%\pureedge\setup.iss" /f2"%TEMP%\pureedge_setup.log"' />
<install cmd='%COMSPEC% /c start "7-zip" /wait "%PROGRAMFILES%\7-zip\7z.exe" x -o"%ALLUSERSPROFILE%\Desktop\PureEdge Forms" -y "%SOFTWARE%\pureedge\forms.zip"' />
<upgrade cmd='"%SOFTWARE%\pureedge\silence.pl" "%PROGRAMFILES%\InstallShield Installation Information\{E0000650-0650-0650-0650-000000000650}\Setup.exe"' />
<upgrade cmd='%COMSPEC% /c start "Uninstaller" /wait "%WINDIR%\System32\rundll32.exe" "%COMMONPROGRAMFILES%\InstallShield\Engine\6\Intel 32\Ctor.dll",LaunchSetup "%PROGRAMFILES%\InstallShield Installation Information\{E0000650-0650-0650-0650-000000000650}\Setup.exe" -l0x9 -uninst /s /a /s /sms' />
<upgrade cmd='"%SOFTWARE%\pureedge\PEViewer650DODJ12.exe" /s /a /s /sms /f1"%SOFTWARE%\pureedge\setup.iss" /f2"%TEMP%\pureedge_setup.log"' />
<remove cmd='"%SOFTWARE%\pureedge\silence.pl" "%PROGRAMFILES%\InstallShield Installation Information\{E0000650-0650-0650-0650-000000000650}\Setup.exe"' />
<remove cmd='%COMSPEC% /c start "Uninstaller" /wait "%WINDIR%\System32\rundll32.exe" "%COMMONPROGRAMFILES%\InstallShield\Engine\6\Intel 32\Ctor.dll",LaunchSetup "%PROGRAMFILES%\InstallShield Installation Information\{E0000650-0650-0650-0650-000000000650}\Setup.exe" -l0x9 -uninst /s /a /s /sms' />
</package>
</packages>
Silent Uninstall
The uninstaller will not run silently. The only way to silence it is patching the uninstaller executable to bypass the message boxes. Here is a Perl script that will apply the appropriate patches.
silence.pl:
#!/bin/perl
use warnings;
use strict;
# Command arguments
$#ARGV == 0 or die "Usage:\n$0 <file>\n";
# Open and validate file
open my $fh, '+<', $ARGV[0] or die $!;
seek $fh, 0, 2;
if (tell $fh != 56320) {
close $fh;
die "File size does not look right.\n";
}
# Disable first message box, "Are you sure you want to uninstall..."
seek $fh, 0x2A03, 0;
print $fh "\x90" x 20;
seek $fh, 0x2A1D, 0;
print $fh "\x90" x 9;
# Disable second message box, "Uninstall completed..."
seek $fh, 0x2CE0, 0;
print $fh "\x90" x 22;
print "File patched successfully.\n";
close $fh;
0;