To inspect an MSI for paths and items included use SuperOrca. This is a great free tool.
Use WIX to create installer and setup projects. Wixwiki.com
Wednesday, December 15, 2010
Thursday, December 9, 2010
Elevating an Exe's privileges
Resending this, I missed one thing the first time
To get an executable to always request elevation when run, create a file with the following in it. The file name will need to be in the format like this:
yourexecutable.exe.manifest
You will also need to replace the highlighted section with the name of the executable you will be embedding the manifest in.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="ElevationTest" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
After you do that, open a Visual Studio Command prompt and run the following:
mt.exe –manifest arg1 -outputresource:arg2;1
Where arg1 is the name of the .manifest file you just created and arg2 is the name of the executable you want to embed the manifest into. Don’t forget the ;1 on the end, it is not a typo.
Courtesy of Chris Stoleworthy
To get an executable to always request elevation when run, create a file with the following in it. The file name will need to be in the format like this:
yourexecutable.exe.manifest
You will also need to replace the highlighted section with the name of the executable you will be embedding the manifest in.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="ElevationTest" type="win32"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
After you do that, open a Visual Studio Command prompt and run the following:
mt.exe –manifest arg1 -outputresource:arg2;1
Where arg1 is the name of the .manifest file you just created and arg2 is the name of the executable you want to embed the manifest into. Don’t forget the ;1 on the end, it is not a typo.
Courtesy of Chris Stoleworthy
Wednesday, November 24, 2010
Settng up IIS6 Compression
Enable HTTP Compression for Web Server
* Enable Direct Metabase Edit (Although not strictly required, this is for convenience which allows direct editing of the IIS metabase while IIS is running)
o In IIS Manager right-click on the server and select properties
o Check "Enable Direct Metabase Edit"
* Enable HTTP compression
o Right-click on the "Web Sites" folder and select properties
o On the Service tab check "Compress application files" and "compress static files"
o Create the folder D:\IIS Temporary Compressed Files*** This is where IIS caches compressed static files
o Change the "Temporary directory" to D:\IIS Temporary Compressed Files
o Under Web Service Extensions select "Add a new Web service Extension"
o Name the new extension "HTTP Compression"
o Add the required file c:\windows\system32\inetsrv\gzip.dll
o Check "Set extension status to Allowed"
o Should appear in extension list
* Modify the IIS metabase
o Edit C:\WINDOWS\system32\inetsrv\MetaBase.xml
o Search for "IISCompressionScheme"
+ You should see 2 entries, one for deflate and one for gzip (circled in green)
o Change the HcDynamicCompressionLevel to "9"
+ 10 is the highest compression but uses a lot of CPU. 9 is almost as compressed but requires far less CPU.
o Add the dynamic page extensions we want compressed (typically .aspx and .asmx, although this list may expand as new extensions are employed).
Be Careful
Spacing is EXTREMELY important in this file. The simplest way to guarantee no problem is to copy the "dll" line and modify to aspx, asmx, axd. Add js and css to the list that contains html
* Enable Direct Metabase Edit (Although not strictly required, this is for convenience which allows direct editing of the IIS metabase while IIS is running)
o In IIS Manager right-click on the server and select properties
o Check "Enable Direct Metabase Edit"
* Enable HTTP compression
o Right-click on the "Web Sites" folder and select properties
o On the Service tab check "Compress application files" and "compress static files"
o Create the folder D:\IIS Temporary Compressed Files*** This is where IIS caches compressed static files
o Change the "Temporary directory" to D:\IIS Temporary Compressed Files
o Under Web Service Extensions select "Add a new Web service Extension"
o Name the new extension "HTTP Compression"
o Add the required file c:\windows\system32\inetsrv\gzip.dll
o Check "Set extension status to Allowed"
o Should appear in extension list
* Modify the IIS metabase
o Edit C:\WINDOWS\system32\inetsrv\MetaBase.xml
o Search for "IISCompressionScheme"
+ You should see 2 entries, one for deflate and one for gzip (circled in green)
o Change the HcDynamicCompressionLevel to "9"
+ 10 is the highest compression but uses a lot of CPU. 9 is almost as compressed but requires far less CPU.
o Add the dynamic page extensions we want compressed (typically .aspx and .asmx, although this list may expand as new extensions are employed).
Be Careful
Spacing is EXTREMELY important in this file. The simplest way to guarantee no problem is to copy the "dll" line and modify to aspx, asmx, axd. Add js and css to the list that contains html
Subscribe to:
Posts (Atom)