WPKG Package Settings File
I had an error in a package file that I used for installing Debugging
Tools for Windows with
WPKG. When
I created
windbg.xml
, I copied an already installed package's
xml file to the
windbg.xml
. I forgot to change the uninstall
condition to match what it should be for Debugging Tools for Windows, however.
I had the following in
windbg.xml
:
<check type="uninstall" condition="exists" path="Vim 7.2.320"/>
As a result, when I tried using WPKG to uninstall and reinstall
the software, I was unable to do so. To fix the problem, I edited
C:\Windows\system32\wpkg.xml
and changed that line
in the file to the correct uninstall condition, which is the following:
<check type="uninstall" condition="exists" path="Debugging Tools
for Windows (x86)"/>
The corrected windbg.xml
file contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<packages>
<!-- Debugging Tools for Windows 32-bit Version -->
<!-- Source: http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a -->
<package id="WinDbg" name="Debugging Tools for Windows" revision="1" reboot="false" priority="0">
<check type="uninstall" condition="exists" path="Debugging Tools for Windows (x86)" />
<install cmd='msiexec INSTDIR="C:\Program Files\Utilities\SysMgmt\Debugging Tools for Windows (x86)\" /i %SOFTWARE%\Utilities\SysMgmt\dbg_x86_6.11.1.404.msi /q' />
<upgrade cmd='%SOFTWARE%\Utilities\SysMgmt\dbg_x86_6.11.1.404.msi /q' />
<remove cmd='msiexec /x {300A2961-B2B5-4889-9CB9-5C2A570D08AD} /q' />
</package>
</packages>
References:
-
Unattended Install
for Debugging Tools for Windows
MoonPoint Support
[/os/windows/software/wpkg]
permanent link
Troubleshooting with openssl
You can use the command
openssl s_client -connect xxx.xxx.xxx.xxx:yyyyy
command, where
xxx.xxx.xxx.xxx
is the IP address of the
server and
yyyyy
is the port number on the server used for
HTTPS. The port is usually
443, but does not have to be that port. You can, of course, also use
a
fully qualified domain name
(FQDN), such as paypal.com, instead of an IP address.
By using the command, one can determine if a system is responding
correctly using the HTTPS protocol. E.g. below is an example of a query
issued against paypal.com:
$ openssl s_client -connect paypal.com:443
CONNECTED(00000003)
depth=2 /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network
verify return:1
depth=1 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
verify return:1
depth=0 /C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=Information Systems/CN=paypal.com
verify return:1
---
Certificate chain
0 s:/C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=Information Systems/CN=paypal.com
i:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
1 s:/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority - G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Network
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFDjCCA/agAwIBAgIQPma+WJDWF71INO8b3EN2LDANBgkqhkiG9w0BAQUFADCB
tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug
YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwOTEvMC0GA1UEAxMm
VmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzIwHhcNMDkwNjEx
MDAwMDAwWhcNMTAwNjExMjM1OTU5WjB/MQswCQYDVQQGEwJVUzETMBEGA1UECBMK
Q2FsaWZvcm5pYTERMA8GA1UEBxQIU2FuIEpvc2UxFTATBgNVBAoUDFBheVBhbCwg
SW5jLjEcMBoGA1UECxQTSW5mb3JtYXRpb24gU3lzdGVtcz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XX1FQOyL288vCalmGAPLggjo3Hn0tWgK4Dd69l8JPm51FtEyijor/svw
FoxF7cJ6g92mgmu3JC10xhIXYDHiIAiTIzA3KCdAZikM4waZU8quRjgAIGrS0rRa
ohw0aAvy7gUrMWaws7+de3H0y/zQxfEbAsVzZ0+QA2WrGsa6EVKjcwW+VCJSLNZq
NeU=
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=Information Systems/CN=paypal.com
issuer=/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
---
No client certificate CA names sent
---
SSL handshake has read 3029 bytes and written 308 bytes
---
New, TLSv1/SSLv3, Cipher is DES-CBC3-SHA
Server public key is 1024 bit
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DES-CBC3-SHA
Session-ID: E24FE41E08BCBB5246EE5EAC08E7E4ACBB4708F0CD0089E9EF602E4F3C435922
Session-ID-ctx:
Master-Key: FFF8BF97F79796457EE44860212C5F887FFE8F62F4A6FC908DB1A382489BE5C2963C2D5F84BC526911FA5EB096634603
Key-Arg : None
Krb5 Principal: None
Start Time: 1262641575
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
You can check the expiration date of an SSL certificate by first retrieving
the certificate using commands such as in the first line below. You can then
check the expiration date with a command such as the one on the next line,
which shows that the current certificate for
PayPal expires at midnight
Greenwich Mean Time (GMT) on
June 11, 2010.
$ echo "" | openssl s_client -connect paypal.com:443 > certificate
depth=2 /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
- G2/OU=(c) 1998 VeriSign, Inc. - For authorized use only/OU=VeriSign Trust Net
work
verify return:1
depth=1 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2
verify return:1
depth=0 /C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=Information Systems/CN=paypal.com
verify return:1
DONE
$ openssl x509 -in certificate -noout -enddate
notAfter=Jun 11 23:59:59 2010 GMT
Another example below shows the results returned for a self-signed
certificate:
# echo "" | /usr/local/ssl/bin/openssl s_client -connect 10.10.0.108:443 > certi
ficate
depth=0 /C=EU/ST=SomeState/L=SomeCity/O=SomeOranization/OU=SomeOrganizationUnit/
CN=localhost
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=EU/ST=SomeState/L=SomeCity/O=SomeOranization/OU=SomeOrganizationUnit/
CN=localhost
verify return:1
DONE
# /usr/local/ssl/bin/openssl x509 -in certificate -noout -enddate
notAfter=Feb 12 11:44:04 2018 GMT
References:
-
OpenSSL: Documents, s_client(1)
OpenSSL: The Open Source toolkit for SLS/TLS
-
When does my certificate expire?
barndonhutchinson.com --
Linux, Solaris, and general UNIX notes.
[/security/encryption/openssl]
permanent link
Unattended Install for Debugging Tools for Windows
I wanted to install
Debugging Tools for Windows on several systems. I wanted to do an
"unattended", aka "silent", installation where the installation would occur
automatically without any user intervention, except perhaps at most a
command being issued at a command prompt. The Debugging Tools for Windows
comes as an
.msi file,
which is a Microsoft Windows installation file.
At
Forcing MSI Installation Into a Specific Directory, I found a
suggestion to put TARGETDIR
on the command line when using the
msiexec command.
E.g. to specify the directory where an application should be installed when the
installation file for that application is an
.msi file, the author of
that page suggested that you can use a command similar to the following:
msiexec TARGETDIR="C:\MyTargetDirectory" /i MyProject.msi
You can use the /q
option to specify that the installation does
not present a GUI installer
window or prompt the user - see
Command-Line Options for other command line options.
That did not work in this case, however. So, I decided to try the webpage
author's suggestion to turn on logging during an installation of the software
where I performed the install normally from the GUI installation method. I
turned on verbose logging using the command
msiexec /i dbg_x86_6.11.1.404.msi /l*v c:\windbg.log
, which
created a log file c:\windbg.log
.
During the installation process, I chose a "custom" install and specified
the installation directory be C:\Program
Files\Utilities\SysMgmt\Debugging Tools for Windows (x86)\
rather than
the default installation directory of C:\Program Files\Debugging Tools
for Windows (x86)\
. When the installation was completed, I saw the
following when I opened the log file with Notepad:
MSI (c) (44:D8) [16:44:12:281]: PROPERTY CHANGE: Modifying INSTDIR property. Its current value is 'C:\Program Files\Debugging Tools for Windows (x86)\'. Its new value: 'C:\'.
MSI (c) (44:D8) [16:44:13:291]: PROPERTY CHANGE: Modifying INSTDIR property. Its current value is 'C:\'. Its new value: 'C:\Program Files\'.
MSI (c) (44:D8) [16:44:16:866]: PROPERTY CHANGE: Modifying INSTDIR property. Its current value is 'C:\Program Files\'. Its new value: 'C:\Program Files\Utilities\'.
MSI (c) (44:D8) [16:44:18:062]: PROPERTY CHANGE: Modifying INSTDIR property. Its current value is 'C:\Program Files\Utilities\'. Its new value: 'C:\Program Files\Utilities\SysMgmt\'.
MSI (c) (44:D8) [16:44:24:941]: PROPERTY CHANGE: Modifying INSTDIR property. Its current value is 'C:\Program Files\Utilities\SysMgmt\'. Its new value: 'C:\Program Files\Utilities\SysMgmt\Debugging Tools for Windows (x86)\'.
MSI (c) (44:D8) [16:44:25:095]: PROPERTY CHANGE: Modifying _1394 property. Its current value is 'C:\Program Files\Debugging Tools for Windows (x86)\1394\'. Its new value: 'C:\Program Files\Utilities\SysMgmt\Debugging Tools for Windows (x86)\1394\'.
I could see that the property being modified was INSTDIR
rather
than TARGETDIR
, so I then tried the following command at the
command line:
msiexec INSTDIR="C:\Program Files\Utilities\SysMgmt\Debugging Tools for
Windows (x86)\" /i dbg_x86_6.11.1.404.msi /q
That put the software in the directory where I wanted it installed and
did not display a GUI window or any prompts.
To uninstall software installed through an MSI file, you can use
msiexec /x Package|ProductCode
. In this case, after
the installation, I ran regedit
and checked the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
.
I could see that the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{300A2961-B2B5-4889-9CB9-5C2A570D08AD}
registry key was the appropriate one,
since within it I saw the following:
Name | Type | Size |
DisplayName | REG_SZ |
Debugging Tools for Windows (x86) |
DisplayVersion | REG_SZ |
6.11.1.404 |
UninstallString | REG_EXPAND_SZ |
MsiExec.exe /I{300A2961-B2B5-4889-9CB9-5C2A570D08AD} |
That told me that the ProductCode for Debugging Tools for Windows is
{300A2961-B2B5-4889-9CB9-5C2A570D08AD}
. However, if I used
MsiExec.exe /I{300A2961-B2B5-4889-9CB9-5C2A570D08AD}
to uninstall
the software, I would get a GUI uninstall window where I would have to select
the "remove" option. For a silent uninstall from the command line, I can
use msiexec /x {300A2961-B2B5-4889-9CB9-5C2A570D08AD} /q
. The
/x
option indicates that you want to remove the software. The
/q
option indicates you want a silent uninstall. Without the
/q
option, you would be prompted to confirm the removal of the
software.
The DisplayName
registry entry is what you will see under
"Uninstall or change a program" or "Add or Remove Programs" under the
Windows Control Panel. E.g., in this case, I would see
Debugging Tools for Windows (x86)
there.
References:
-
Debugging Tools for Windows
WHDC - Windows
Hardware Developer Central
-
File Extension .MSI Details
FILExt - The File Extension Source
-
Windows Installer
Wikipedia, the free encyclopedia
-
Forcing MSI Installation Into a Specific Directory
Arthur Zubarev
-
Command-Line Options
MSDN: Microsoft Development, MSDN
Subscriptions, Resources, and More
-
Unattended/Silent Installation Switches for Windows Apps
Unattended, A Windows deployment system
[/os/windows/utilities/sysmgmt]
permanent link