<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7725030</id><updated>2012-01-20T09:43:23.330-08:00</updated><category term='PC'/><category term='Tools'/><category term='Code'/><category term='Vista'/><category term='Error'/><category term='SQL'/><category term='Fun'/><category term='Fix'/><category term='Sharepoint'/><title type='text'>Information Transmogrification</title><subtitle type='html'>Live from the brain of TeX HeX: ArgumentNullException</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default?start-index=101&amp;max-results=100'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>143</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7725030.post-3097874607070865384</id><published>2012-01-18T13:05:00.001-08:00</published><updated>2012-01-18T13:05:01.999-08:00</updated><title type='text'>Using InnoSetup Preprocessor (ISPP) to generate section parameters</title><content type='html'>&lt;p&gt;Until now we have used Media Player Classic HC for media playback. However, we were getting more and more complains in the last time that some files couldn’t be played so we decided to switch to &lt;a href="http://www.videolan.org/vlc/"&gt;VideoLAN VLC player&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;What we needed was a silent install and that the the player does not ask the user anything. Or in other words: Open the file and shut up. &lt;/p&gt;  &lt;p&gt;Looking at the information about silent installation (for example &lt;a href="http://www.john.bryntze.net/jbkb/index.php?title=OpenSource-kb5_Silent_installation_and_configuration_of_VLC_Media_Player"&gt;here&lt;/a&gt;), I ended up using the “no installer” download from VLC and creating my own setup with &lt;a href="http://www.jrsoftware.org/isinfo.php"&gt;InnoSetup&lt;/a&gt;. The basic script was created in no time (copying the files to \Program Files\, creating Icons etc.) but when it comes to the file association part, it was getting a little bit ugly. &lt;/p&gt;  &lt;p&gt;First, in order to disable the default “Privacy Dialog” (once on first startup) as well as the automatic update check, you need to use this monster command line:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;{pf}\VideoLAN\VLC\vlc.exe --no-qt-privacy-ask --no-qt-updates-notif --started-from-file &amp;quot;%1&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Given that I will need this command line later on more often I defined a ISPP constant for it on top of the ISS file:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;#define StartFileCommand '{pf}\VideoLAN\VLC\vlc.exe --no-qt-privacy-ask --no-qt-updates-notif --started-from-file &amp;quot;&amp;quot;%1&amp;quot;&amp;quot;'&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This allows me to insert the rather long command by just typing &lt;em&gt;{#StartFileCommand}&lt;/em&gt;: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-7sXMZJJJptw/Txcz3UY-x9I/AAAAAAAAAk0/NxHUEx43-Qc/s1600-h/image%25255B11%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-s_ayjxlF5-A/Txcz4P6mjTI/AAAAAAAAAk8/zEliF8MtZvE/image_thumb%25255B7%25255D.png?imgmax=800" width="582" height="56" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;(Yes, I know this would also be possible by using a function within the [Code] section, but I think &lt;u&gt;&lt;em&gt;#define &lt;/em&gt;&lt;/u&gt;is easier).&lt;/p&gt;  &lt;p&gt;InnoSetup will expand &lt;em&gt;{#StartFileCommand}&lt;/em&gt; to “{pf}\VideoLAN\VLC\vlc.exe … ” before it compiles, so this is what is compiled:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-kcssNs8PLHY/Txcz5asSlaI/AAAAAAAAAlE/Vrpt_cywAdQ/s1600-h/image%25255B13%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-wrroH5ir4ko/Txcz6cc5aGI/AAAAAAAAAlM/9YMgM8_j0vM/image_thumb%25255B9%25255D.png?imgmax=800" width="592" height="53" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;With this in place, it was time to create the registry entries for the files we want to open with VLC. Each file type needs to have a “Play2” command (in order to prevent overwriting any file association from an existing program) and the user should be able to use the “Open with…” list to open a file with VLC. &lt;/p&gt;  &lt;p&gt;This results in the following four registry lines for each file type:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-5VlEnl4ZVYg/Txcz7GgLaqI/AAAAAAAAAlU/ascH8yBZVqY/s1600-h/image%25255B18%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-cAjKTdsb6mg/Txcz7wiFFII/AAAAAAAAAlY/mdA4U7s8-dQ/image_thumb%25255B12%25255D.png?imgmax=800" width="605" height="55" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The only difference for any other file type would be a different subkey value (.WAV, .DIVX, etc.), all other lines would remain the same. ISPP can also be used to generated several lines at once, so I just created a user defined macro that generates these lines at once:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-mgtQxKiqzMk/Txcz8unRSyI/AAAAAAAAAlg/nr4127lmpfs/s1600-h/image%25255B23%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-spCvz1PbgbA/Txcz9TVA9rI/AAAAAAAAAlo/5gYnp4B_CQ8/image_thumb%25255B15%25255D.png?imgmax=800" width="706" height="123" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Within the [Registry] section I can now just write:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;#define public FileExtension &amp;quot;.wav&amp;quot;     &lt;br /&gt;#expr RegFileAssoc&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;#define public FileExtension &amp;quot;.mpg&amp;quot;     &lt;br /&gt;#expr RegFileAssoc&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;ISPP will then generate the following lines automatically upon compilation:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-hTUIXn_06Ko/Txcz-MJWocI/AAAAAAAAAlw/oxN5JdZ6cQ8/s1600-h/image%25255B28%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-mQ_GOIVfBtM/Txcz-yLZRzI/AAAAAAAAAl8/-xwb4hEJ2ys/image_thumb%25255B18%25255D.png?imgmax=800" width="711" height="129" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If I ever need to change something on these registry entries, I only need to make the change once and recompiled. Supporting another file type is easy, too.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A final tip: InnoSetup has no build-in option to display the resulting ISS file when preprocessing is finished. To create this file, just enter the following command as the really last line within your ISS file:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;#expr SaveToFile(AddBackslash(SourcePath) + &amp;quot;zz_Preprocessed.iss&amp;quot;)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This will generate the file &lt;em&gt;zz_Preprocessed.iss&lt;/em&gt; in the same folder where your ISS file is stored.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3097874607070865384?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3097874607070865384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3097874607070865384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3097874607070865384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3097874607070865384'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2012/01/using-innosetup-preprocessor-ispp-to.html' title='Using InnoSetup Preprocessor (ISPP) to generate section parameters'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-s_ayjxlF5-A/Txcz4P6mjTI/AAAAAAAAAk8/zEliF8MtZvE/s72-c/image_thumb%25255B7%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7286465860877663666</id><published>2011-12-23T04:09:00.001-08:00</published><updated>2011-12-23T04:09:23.107-08:00</updated><title type='text'>One week with Windows Phone</title><content type='html'>&lt;p&gt;Because I was able to buy a HTC Radar at a low price, I thought I should give Windows Phone (WP) a try. For a week, I turned my Galaxy S2 off and used the Radar. &lt;/p&gt;  &lt;p&gt;For your explanation: I use my phone mostly for checking Twitter, browsing the web (links from Tweets), checking my email/appointments and web searches. I don’t know if WP7 is designed for a different audience with other requirements, but this is what I expect from a smartphone.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Basically the second task I did on the phone was to search for “Twitter” on the marketplace. And although I selected “Applications” before doing the search, the instant results should one Application and three “Music” title. Not very clever of WP7 when I already made absolutely clear that I wanted to search for Applications only.&lt;/p&gt;  &lt;p&gt;Anyhow, the Twitter application itself is terrible to use. If you are used to ÜberSocial, it’s like using an early Alpha of a twitter client. Upon each start it requires four to five seconds to actually display something, it doesn’t remember you the last location in the timeline etc. But knowing that WP7 has built in support for Twitter, I tried using Twitter with the “People” hub. &lt;/p&gt;  &lt;p&gt;That wasn’t any better at all. 1/5 of the screen is displaying “People/What’s new” instead of given more room for tweets. It also doesn’t remember the position in the timeline from the last use, so I was constantly forced to scroll down and then trying to remember where I was the last time. Clicking on a tweet shows them on a new screen with a small font and 50% of the screen being blank. Yes, it also displays replies and the keyboard there, but the important content is the tweet itself so it should be displayed bigger there. It usually took me two to three tries to click on the embedded links because it was so tiny. And I couldn’t find any setting to make the font any bigger.&lt;/p&gt;  &lt;p&gt;What was actually better to use then expected was the browser. From what I have heard in the news it should have all sorts of issues, but it worked flawless the entire week. Only sometimes the text was jumping around a little bit, I guess because of pictures that were loaded in the background. &lt;/p&gt;  &lt;p&gt;Connecting to my Exchange server has worked without any problems, but I have to admit that I was expecting this (even my three years old Windows Mobile 6.5 plays nice with Exchange). What is really insane: The email application use a white background while all other build-in applications have a black background (and for good reason). And again, there is no setting to change that.&lt;/p&gt;  &lt;p&gt;Performing a web search should be easy as WP7 has a mandatory search button. Clicking on it brings up Bing search but you need another click before the keyboard appears. Is it really so complicated to display the keyboard by default? In fact, the Google App is working exactly this way: Start and type right away. But of course, you can’t change that the search key so it launches the Google app instead of Bing. &lt;/p&gt;  &lt;p&gt;And while we are at “Entering text”: The default keyboard isn’t a pleasure to work with. It get’s the job done, but if you are used to &lt;a href="http://www.swype.com/"&gt;Swype&lt;/a&gt; or &lt;a href="http://www.mobiletextinput.com/Product/What_is_SlideIT/"&gt;SliteIT&lt;/a&gt; it’s a step backward. &lt;/p&gt;  &lt;p&gt;What really drove me crazy: WP7 is by default hiding the signal strength bar! You either click on the top bar to display it or, within Internet Explorer, bring up the menu with “…” to see it. I really don’t know if the coverage in Redmond is so awesome you do not need the display, but I prefer to see it. &lt;/p&gt;  &lt;p&gt;Many times I was waiting for Internet Explorer until it displayed “We’re having trouble displaying this page”. This is a no brainer on Android as I see it always and act accordingly. But with WP7 I need an extra click to check if it makes sense to open a link.&lt;/p&gt;  &lt;p&gt;Finally, yesterday I was taking some photos of a broken Laptop of a friend of me and we wanted to send those to the vendor by Email from his secondary computer. &lt;/p&gt;  &lt;p&gt;We took the photos, plugged in the phone and waited for the drive to show up in Explorer. But guess what: All we got was “Install Zune to exchange data with your Phone”. It really seems to be very hard to give the user easy access to their data. &lt;/p&gt;  &lt;p&gt;My (Android based) Galaxy S2 also comes with connection software (Kies) but when I plug it in, it simply asks “USB Storage or Kies”, and the first option gives me access to the phone right away without any installation on any computer. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My personal verdict: WP7 is not the “Awesome phone” it wants to be. Not everything is bad, it has some nice features (like the long battery runtime), great developer support (C#!) and with &lt;a href="http://www.chevronwp7.com/"&gt;ChevronWP7&lt;/a&gt; a, somewhat, official way to unlock. &lt;/p&gt;  &lt;p&gt;But my Galaxy S2 suits me better and has less issues then WP7. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7286465860877663666?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7286465860877663666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7286465860877663666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7286465860877663666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7286465860877663666'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/12/one-week-with-windows-phone.html' title='One week with Windows Phone'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3058579848360311057</id><published>2011-12-10T04:54:00.001-08:00</published><updated>2011-12-10T04:54:48.816-08:00</updated><title type='text'>Debugging DHCP on the client</title><content type='html'>&lt;p&gt;In case a computer has problem with DHCP, there is a special log within Windows 7 that can help you a lot.&lt;/p&gt;  &lt;p&gt;Go to Event Viewer, Applications and Services Logs, Microsoft, Windows, Dhcp-Client, Microsoft-Windows-DHCP Client Events/Operational.&lt;/p&gt;  &lt;p&gt;By default this trace log will be empty, because you need to enable it by clicking on “Enable log” on the right side. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-Bmv1Mv37Bhc/TuNWhzwrZkI/AAAAAAAAAjs/KuHuoUpBuCY/s1600-h/Eventviewer%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Eventviewer" border="0" alt="Eventviewer" src="http://lh4.ggpht.com/-pNhSdtdcbhE/TuNWioz6UUI/AAAAAAAAAj0/cbnD5ONmhtg/Eventviewer_thumb%25255B3%25255D.png?imgmax=800" width="448" height="331" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;It can help you a lot to analyze the problems the computer might have, but there is one little thing that can drive you nuts at first. &lt;/p&gt;  &lt;p&gt;The log will not reveal about which network connection the event is, it will only tell you about &lt;em&gt;Adapter X&lt;/em&gt; or &lt;em&gt;Interface X&lt;/em&gt;:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Inform ack is received in the adapter 10.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Dhcp has notified NLA for the configuration changes for the interface 10&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The events are referring to an internal Windows index that identifies each network connection which is called &lt;em&gt;Interface Index&lt;/em&gt;. You can use the &lt;em&gt;netsh&lt;/em&gt; command to get the interface index (First column, “Idx”)&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;netsh interface ipv4 show interface&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-cH79M3UwGzY/TuNWjrlFFYI/AAAAAAAAAj4/i5_08FwUkFg/s1600-h/NetSH%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="NetSH" border="0" alt="NetSH" src="http://lh4.ggpht.com/-tAWcFtbbUDg/TuNWkELs7tI/AAAAAAAAAkA/Fd5wWA74Dxk/NetSH_thumb%25255B1%25255D.png?imgmax=800" width="548" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can also use &lt;em&gt;wmic&lt;/em&gt; to display the interface index:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;wmic nic get name, index, DeviceID, NetConnectionStatus, InterfaceIndex&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-x7H0zNMD6Wk/TuNWkuIFP-I/AAAAAAAAAkM/Hr2snsSLzbc/s1600-h/WMIC%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WMIC" border="0" alt="WMIC" src="http://lh6.ggpht.com/-cIWLPxzFLI0/TuNWlsOceXI/AAAAAAAAAkU/m8Duc9C6ASA/WMIC_thumb%25255B1%25255D.png?imgmax=800" width="551" height="170" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3058579848360311057?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3058579848360311057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3058579848360311057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3058579848360311057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3058579848360311057'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/12/debugging-dhcp-on-client.html' title='Debugging DHCP on the client'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-pNhSdtdcbhE/TuNWioz6UUI/AAAAAAAAAj0/cbnD5ONmhtg/s72-c/Eventviewer_thumb%25255B3%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3264754182953473008</id><published>2011-12-03T04:25:00.001-08:00</published><updated>2011-12-03T04:25:01.291-08:00</updated><title type='text'>Android: WidgetLocker plus Go Launcher Ex Launcher Problems</title><content type='html'>&lt;p&gt;I really like my &lt;a href="http://www.techradar.com/reviews/phones/mobile-phones/samsung-galaxy-s2-930907/review"&gt;Galaxy S2&lt;/a&gt;, it’s the phone I always was dreaming off. However, there are two areas that really need improvement. &lt;/p&gt;  &lt;p&gt;First, the lock screen: Samsung has created it’s own lock screen and is even more useless than the stock Android lock screen (but you can’t select that one either). What is annoying even more: You can bypass the lock screen by pressing the Home button twice. This caused that my telephone was doing strange things while it actually be locked.&lt;/p&gt;  &lt;p&gt;Next is the default Home Screen, TouchWiz. It was okay when the Galaxy S2 was released but given that no updates have been released since then, it was time to search for a replacement.&lt;/p&gt;  &lt;p&gt;Because of the openness of Android, there are hundreds of replacement out there and I choose &lt;a href="https://market.android.com/details?id=com.teslacoilsw.widgetlocker&amp;amp;hl=en"&gt;WidgetLocker&lt;/a&gt; as my lock screen replacement and &lt;a href="https://market.android.com/details?id=com.gau.go.launcherex&amp;amp;hl=en"&gt;GO Launcher EX&lt;/a&gt; for my home screen.&lt;/p&gt;  &lt;p&gt;I customized my lock screen so I can start the camera as well as the phone directly from it. Also, I choose to keep the notification icons visible so I can easily see what is going on in the background.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-DMiYUkIRxSM/TtoU9-PZu7I/AAAAAAAAAhI/uvEYThASSwc/s1600-h/Lock%252520Screen%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Lock Screen" border="0" alt="Lock Screen" src="http://lh6.ggpht.com/-zXqyfgMXGQ8/TtoU-j51H6I/AAAAAAAAAhQ/YfcTbrwQ2JM/Lock%252520Screen_thumb.png?imgmax=800" width="148" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Important for me was also the option to block the Home button so the phone will not unlock when the Home button is pressed twice. To do this, start WidgetLocker and click “Settings”, “Advanced”, “Home Helper”, “HomeHelper Block Home”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-xbQXpWWog6c/TtoVArp-TUI/AAAAAAAAAhY/PWrrZsr1k4w/s1600-h/Settings1%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Settings1" border="0" alt="Settings1" src="http://lh4.ggpht.com/-45Plf6aPXxc/TtoVBMnJdnI/AAAAAAAAAhc/2ITr78CZP6g/Settings1_thumb%25255B1%25255D.png?imgmax=800" width="89" height="148" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-JSpeDcC-Low/TtoVByqg3ZI/AAAAAAAAAho/pxxUcKZskPU/s1600-h/Settings2%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Settings2" border="0" alt="Settings2" src="http://lh6.ggpht.com/-CdWEBib3lQ4/TtoVC38cGWI/AAAAAAAAAhs/dqupLvcLwGU/Settings2_thumb%25255B1%25255D.png?imgmax=800" width="91" height="151" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-IzvYE_hS3xM/TtoVDt4ajkI/AAAAAAAAAh0/jInr0bpxrYI/s1600-h/Settings3%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Settings3" border="0" alt="Settings3" src="http://lh3.ggpht.com/-clfxfpmWO9Y/TtoVD3kVAFI/AAAAAAAAAh8/KDK0OPZAIl4/Settings3_thumb%25255B1%25255D.png?imgmax=800" width="91" height="151" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-8g2y70U30Mo/TtoVElE4SbI/AAAAAAAAAiI/NYz7V6P3Qps/s1600-h/Settings4%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Settings4" border="0" alt="Settings4" src="http://lh4.ggpht.com/-hJYTcV0vKWI/TtoVFVW0oHI/AAAAAAAAAiM/9BaPdnLadto/Settings4_thumb%25255B2%25255D.png?imgmax=800" width="92" height="153" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;GO Launcher EX was has &lt;em&gt;tons &lt;/em&gt;of settings so I skip the part what I have configured there.&lt;/p&gt;  &lt;p&gt;Two weeks later my phone suddenly showed the “Select home screen applications” (Complete action using): &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-qP6tCkrmw5s/TtoVF6O1-GI/AAAAAAAAAiY/WGDEeVRUOl0/s1600-h/Complete%252520action%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Complete action" border="0" alt="Complete action" src="http://lh3.ggpht.com/-vA2KSkn5_XU/TtoVG-T5UMI/AAAAAAAAAig/024Vlwrsg-0/Complete%252520action_thumb.png?imgmax=800" width="192" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I selected “GO Launcher EX”, activated “Set as default” and didn’t think about it. Some hours later it appeared again, and it was appearing several hours later again. &lt;/p&gt;  &lt;p&gt;This was very strange because until then this “bug” didn’t showed up and I had no idea where this comes from.&lt;/p&gt;  &lt;p&gt;Playing around with some settings and doing a lot of searching, I finally understood what was going wrong: In order for WidgetLocker to override the default Home button behavior, you need to chose “WL HomeHelper” in the above screen. &lt;/p&gt;  &lt;p&gt;When you press “Home”, Android will start WidgetLocker which will check if the phone is currently locked or not. If it is not locked, it will start the launcher that you have configured inside WidgetLocker, “Advanced”, “HomeHelper”, “HomeHelper’s Launcher” (see screenshots above). &lt;/p&gt;  &lt;p&gt;This means:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If there is an update of WidgetLocker, Android will show the “Complete action using” dialog: Choose &lt;em&gt;WL HomeHelper&lt;/em&gt; &lt;/li&gt;    &lt;li&gt;If there is an update of GO Launcher EX, go to “WidgetLocker, “Advanced”, “HomeHelper”, “HomeHelper’s Launcher” and choose &lt;em&gt;GO Launcher EX&lt;/em&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3264754182953473008?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3264754182953473008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3264754182953473008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3264754182953473008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3264754182953473008'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/12/android-widgetlocker-plus-go-launcher.html' title='Android: WidgetLocker plus Go Launcher Ex Launcher Problems'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-zXqyfgMXGQ8/TtoU-j51H6I/AAAAAAAAAhQ/YfcTbrwQ2JM/s72-c/Lock%252520Screen_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8542315676007580453</id><published>2011-09-30T08:02:00.000-07:00</published><updated>2011-12-03T07:10:59.322-08:00</updated><title type='text'>Executing a PowerShell script from the command line</title><content type='html'>&lt;p&gt;Actually, this should have been easy. I had a PowerShell script that should be started from a batch file inside a Group Policy Object.&lt;/p&gt;  &lt;p&gt;However, starting the script failed on several computers, either because the execution policy was no set or because the user had changed the configuration so PowerShell was waiting for user input when started.&lt;/p&gt;  &lt;p&gt;This is command I finally used that could overcome all these problems. It has run successfully on any computer so far.&lt;/p&gt;  &lt;p&gt;&lt;font size="3" face="Courier New"&gt;powershell.exe -NonInteractive -ExecutionPolicy Bypass -file &amp;quot;C:\Script\DoIt.ps1&amp;quot; &lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8542315676007580453?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8542315676007580453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8542315676007580453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8542315676007580453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8542315676007580453'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/09/executing-powershell-script-from.html' title='Executing a PowerShell script from the command line'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8144183595631175073</id><published>2011-09-05T06:41:00.000-07:00</published><updated>2011-12-03T06:30:07.563-08:00</updated><title type='text'>Power options in Windows 7: Using PowerCFG.exe</title><content type='html'>&lt;p&gt;This block post should be a quick round up what I have learned so far about Windows 7 power plan options and using PowerCfg.exe.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Computer does not enter sleep mode &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We had problems with several computer that refused to go to Sleep mode and were on 24 hours although the user was away for several hours. This is mostly caused by open files from the network which, by default, prevents Windows from entering sleep mode. Use &lt;em&gt;powercfg –requests&lt;/em&gt; to list open files:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-7gOlxLRC418/TtoyXp188SI/AAAAAAAAAi4/JlaN10un1hA/s1600-h/requests%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="requests" border="0" alt="requests" src="http://lh3.ggpht.com/-jHnSOkZJcMw/TtoyYSlP-lI/AAAAAAAAAi8/z8vXuF0p5Cc/requests_thumb%25255B1%25255D.png?imgmax=800" width="480" height="117" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;My recommendation is to fix this by moving this file locally. However, if you are REALLY REALLY sure what you are doing you can also &lt;a href="http://www.quantexzone.com/index.php/guides/39-windows-media-center-guides/55-open-network-files-prevents-sleep"&gt;enforce sleep mode when a program from the network is open&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Getting a report about potential power problems&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Using &lt;em&gt;powercfg.exe –energy –output &amp;quot;C:\Energy-Report.html&amp;quot;&lt;/em&gt; you can get a detailed report what Windows sees as potential energy problems. This report helped a lot to find outdated drives that caused several problems.&lt;/p&gt;  &lt;p&gt;However, keep in mind that not every Error or Warning Windows generates actually needs attention. Use it as a starting point for your investigation.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-sfjQJFYd1Ow/TtoyZIKlN1I/AAAAAAAAAjI/Zb5OXKzjuBE/s1600-h/report%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="report" border="0" alt="report" src="http://lh6.ggpht.com/-JmtQi8jAdXg/TtoyZ67Q-9I/AAAAAAAAAjM/Q1ojTbjvRCo/report_thumb%25255B1%25255D.png?imgmax=800" width="327" height="248" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Using scheme_current to apply a setting to the current power plan&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In order to change a power setting from the command line, you use &lt;em&gt;powercfg.exe –setACvalueindex/-setDCvalueindex&lt;/em&gt; and need to provide four parameters: The power plan GUID you wish to change, the subgroup GUID, the value GUID and the actual value you want to have.&lt;/p&gt;  &lt;p&gt;The sub group GUID and the value GUID are always the same, but the power plan GUID can be different on each PC, depending of the settings of the user. However you can use the shortcut &lt;em&gt;scheme_current&lt;/em&gt; to apply the setting to the power plan that is activated right now. &lt;/p&gt;  &lt;p&gt;A little example might help. Given you wish to change that the Desktop Background Slide show should also run when the computer is running on batteries, you first use powercfg.exe –q to find that setting:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Subgroup GUID: 0d7dbae2-4294-402a-ba8e-26777e8488cd (Desktop background settings)      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Power Setting GUID: 309dce9b-bef4-4119-9921-a851fb12f0f4 (Slide show)&lt;/font&gt;&lt;font face="Courier New"&gt;      &lt;br /&gt;Possible Setting Index: 000       &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Possible Setting Friendly Name: Available      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Possible Setting Index: 001      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Possible Setting Friendly Name: Paused      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Current AC Power Setting Index: 0x00000000      &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;Current DC Power Setting Index: 0x00000001&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;As you can see the value for “DC” (Battery) is 1, meaning it is “Paused”. Therefore the command need to be in this format:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;PowerCfg.exe &amp;lt;Set battery value&amp;gt; &amp;lt;Current power plan GUID&amp;gt; &amp;lt;Subgroup GUID&amp;gt; &amp;lt;Setting GUID&amp;gt; &amp;lt;Set to Available&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The “Available setting” is 0, so the command is now:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;PowerCfg.exe &amp;lt;Set battery value&amp;gt; &amp;lt;Current power plan GUID&amp;gt; &amp;lt;Subgroup GUID&amp;gt; &amp;lt;Setting GUID&amp;gt; &lt;strong&gt;0&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Setting the battery value (DC Power) is done using –setDCvalueindex:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;PowerCfg.exe &lt;strong&gt;-setDCvalueindex&lt;/strong&gt; &amp;lt;Current power plan GUID&amp;gt; &amp;lt;Subgroup GUID&amp;gt; &amp;lt;Setting GUID&amp;gt; 0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The Subgroup GUID is &lt;em&gt;0d7dbae2-4294-402a-ba8e-26777e8488cd &lt;/em&gt;(first line from the output above)&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;PowerCfg.exe -setDCvalueindex &amp;lt;Current power plan GUID&amp;gt; &lt;strong&gt;0d7dbae2-4294-402a-ba8e-26777e8488cd&lt;/strong&gt; &amp;lt;Setting GUID&amp;gt; 0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The value GUID is &lt;em&gt;309dce9b-bef4-4119-9921-a851fb12f0f4&lt;/em&gt; (second line from the output above):&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;PowerCfg.exe -setDCvalueindex &amp;lt;Current power plan GUID&amp;gt; 0d7dbae2-4294-402a-ba8e-26777e8488cd &lt;strong&gt;309dce9b-bef4-4119-9921-a851fb12f0f4&lt;/strong&gt; 0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Finally, we need the GUID of the current power plan. The easiest way is to use the shortcut &lt;em&gt;scheme_current&lt;/em&gt;, this will automatically apply the setting to the power plan that is currently active. &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Powercfg.exe -setDCvalueindex &lt;strong&gt;scheme_current&lt;/strong&gt; 0d7dbae2-4294-402a-ba8e-26777e8488cd 309dce9b-bef4-4119-9921-a851fb12f0f4 0&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;I might look like a very complicated command when you look at all those GUIDs, but once you have understood the format, it’s easy.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Using –qh paramter to display hidden settings &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Powercfg.exe –q&lt;/em&gt; will list all settings of the current power plan. However, when you use the paramter –qh, PowerCfg will also display settings that are normally not shown.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-m7dPtf_MnRg/TtoyahORTrI/AAAAAAAAAjY/UsJrnUGz4Ys/s1600-h/hidden%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="hidden" border="0" alt="hidden" src="http://lh5.ggpht.com/-22RiV0B87nU/Ttoybc0BlxI/AAAAAAAAAjg/8LLSh_sDkj0/hidden_thumb%25255B2%25255D.png?imgmax=800" width="605" height="169" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Further reading&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you are interested in even more power setting, check &lt;a href="http://iboyd.net/index.php/2010/05/16/windows-7-power-management-fixing-pc-insomnia/"&gt;this blog post&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8144183595631175073?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8144183595631175073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8144183595631175073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8144183595631175073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8144183595631175073'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/09/power-options-in-windows-7-using.html' title='Power options in Windows 7: Using PowerCFG.exe'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/-jHnSOkZJcMw/TtoyYSlP-lI/AAAAAAAAAi8/z8vXuF0p5Cc/s72-c/requests_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5407121310973248929</id><published>2011-08-18T09:59:00.000-07:00</published><updated>2011-12-17T09:04:09.914-08:00</updated><title type='text'>Forcing Backup Exec 2010 to use English</title><content type='html'>&lt;p&gt;Symantec Backup Exec 2010 has a (basically) good feature of using the language of the user that is using it.&lt;/p&gt;  &lt;p&gt;However, this “local aware” can be a problem if you try to help an admin that is using a language that you do not understand (French), nor does he understand the language of the screenshots you sent him (German).&lt;/p&gt;  &lt;p&gt;Fortunately, there is a registry setting that you can activate and force Backup Exec 2010 to English.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/--wMugKUbSWA/TuzLhBKHzQI/AAAAAAAAAkc/0hBsbadKkaU/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Gn5sd8HDwW8/TuzLiIF_MDI/AAAAAAAAAkk/CPvVtrz2ypQ/image_thumb%25255B1%25255D.png?imgmax=800" width="603" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5407121310973248929?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5407121310973248929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5407121310973248929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5407121310973248929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5407121310973248929'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/08/forcing-backup-exec-2010-to-use-english.html' title='Forcing Backup Exec 2010 to use English'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-Gn5sd8HDwW8/TuzLiIF_MDI/AAAAAAAAAkk/CPvVtrz2ypQ/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3680136368753753314</id><published>2011-07-30T06:05:00.000-07:00</published><updated>2011-12-03T05:22:03.542-08:00</updated><title type='text'>Allowing ClickOnce applications with AppLocker</title><content type='html'>&lt;p&gt;&lt;a href="http://windowsteamblog.com/windows/b/springboard/archive/2009/08/18/understanding-windows-7-applocker.aspx"&gt;AppLocker&lt;/a&gt; is a great way to stop unwanted applications from your computers (unfortunately it’s requires Windows 7 Enterprise).&lt;/p&gt;  &lt;p&gt;We are using to do a (less restrictive) &lt;a href="http://en.wikipedia.org/wiki/Whitelist"&gt;white listing&lt;/a&gt; of the software that is allowed on our corporate computers. Combined with the fact that all users have no Administrative privileges and a good anti-virus solution, we have had zero security incidents on our Windows 7 machines.&lt;/p&gt;  &lt;p&gt;However, last week we had to deploy a new ClickOnce application that did not had a &lt;a href="http://technet.microsoft.com/en-us/library/cc750035.aspx"&gt;Authenticode&lt;/a&gt; signature. Therefore we were tried to create a hash rule (based on the hash value of the executable) but this failed a day later because the application is still in development and is updated daily.&lt;/p&gt;  &lt;p&gt;So, the last resort (for now) was to create a path rule but this didn’t worked well, since the path is different for each user:&lt;/p&gt;  &lt;p&gt;User 1:    &lt;br /&gt;&lt;font size="1"&gt;C:\USERS\Usr1\APPDATA\LOCAL\APPS\2.0\QWXPB19C.LLW\DCE6JZ97.RXQ\PROJTION_D1422C9EE6189E70_0001.0000_7138955B1115EB8D\PROJC.EXE&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;User 2:    &lt;br /&gt;&lt;font size="1"&gt;C:\USERS\Usr2\APPDATA\LOCAL\APPS\2.0\ZMBZ82EH.TDG\WHXVWE4L.GZ7\DFKFD23178F_7a251ffffc558391_0002.0000_10ff9c34a357cc30\PROJC.EXE&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The solution was to use a path rule that includes everything that is the same for any installation and replacing the rest with “*”:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;%OSDRIVE%\USERS\&lt;strong&gt;*&lt;/strong&gt;\APPDATA\LOCAL\APPS\&lt;strong&gt;*&lt;/strong&gt;\PROJC.EXE&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Of course, this leaves a hole inside the AppLocker rules because an user could create a sub-folder within \APPS, name the Application PROJC.EXE and could possible execute any application using this trick.&lt;/p&gt;  &lt;p&gt;However, this rule is only for now until the program is final when we will use a hash rule again.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3680136368753753314?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3680136368753753314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3680136368753753314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3680136368753753314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3680136368753753314'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/07/allowing-clickonce-applications-with.html' title='Allowing ClickOnce applications with AppLocker'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3833390430586564447</id><published>2011-06-08T05:48:00.000-07:00</published><updated>2011-12-03T04:54:49.199-08:00</updated><title type='text'>HP System Management Homepage shows broken images</title><content type='html'>&lt;p&gt;After an update of the HP SMH one server suddenly showed broken pictures within the HP System Management Homepage like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-aqP8iVxcViY/TtocFh7jVoI/AAAAAAAAAio/e3-2TM3zTRU/s1600-h/smh_broken%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="smh_broken" border="0" alt="smh_broken" src="http://lh4.ggpht.com/-AqlMr-utcKg/TtocGKdFZEI/AAAAAAAAAis/aVbTHW1fpdM/smh_broken_thumb%25255B2%25255D.png?imgmax=800" width="244" height="47" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Thanks to &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645"&gt;Process Monitor&lt;/a&gt;, I was able to quickly find the problem. &lt;/p&gt;  &lt;p&gt;For whatever reason, several pictures were missing from the path &lt;em&gt;c:\hp\hpsmh\data\htdocs\images&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;I simply copied all images from this path from a working server and everything was back to normal again. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3833390430586564447?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3833390430586564447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3833390430586564447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3833390430586564447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3833390430586564447'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/06/hp-system-management-homepage-shows.html' title='HP System Management Homepage shows broken images'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-AqlMr-utcKg/TtocGKdFZEI/AAAAAAAAAis/aVbTHW1fpdM/s72-c/smh_broken_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7158652450460858959</id><published>2011-05-10T08:44:00.000-07:00</published><updated>2011-11-01T08:53:15.003-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>HPSIM shows “Health Status: Major” while SMH shows “Health Status: OK”</title><content type='html'>&lt;p&gt;We just had a server that was displayed in the &lt;a href="http://h18013.www1.hp.com/products/servers/management/hpsim/index.html?jumpid=go/hpsim"&gt;HP Insight Manager (HPSIM)&lt;/a&gt; with &lt;em&gt;Heal Status: Major&lt;/em&gt;. But viewing the System Management Homepage (SMH) of this server only showed: &lt;em&gt;System Status Healthy&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;It turned out that HPSIM checks (by default) the SMH as well as the SNMP status. But SMH itself can only displays data from one data source.&lt;/p&gt;  &lt;p&gt;The solution: Change SMH to retrieve the data from SNMP instead of WBEM:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-K_52gUQNfrY/TrAVk-0HOWI/AAAAAAAAAgc/tB8RGjk6GJI/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-tpe0NCCR798/TrAVljGdoNI/AAAAAAAAAgk/fTeDk4Vsy_E/image_thumb%25255B1%25255D.png?imgmax=800" width="540" height="310" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What a little bit until the SMH agents has restarted and the status of HPSIM and SMH will match again. In our case, the faulty component was the network interface of ILO:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Hbp-xukcCBw/TrAVmQMSAOI/AAAAAAAAAgs/DyUKGZNn_Fs/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-ykKhtqYGS0E/TrAVnM-yC8I/AAAAAAAAAg0/xRwjzNvYbUI/image_thumb%25255B3%25255D.png?imgmax=800" width="443" height="346" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7158652450460858959?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7158652450460858959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7158652450460858959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7158652450460858959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7158652450460858959'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/05/hpsim-shows-health-status-major-but-smh.html' title='HPSIM shows “Health Status: Major” while SMH shows “Health Status: OK”'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-tpe0NCCR798/TrAVljGdoNI/AAAAAAAAAgk/fTeDk4Vsy_E/s72-c/image_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8714780478850395665</id><published>2011-02-19T04:13:00.001-08:00</published><updated>2011-02-19T04:13:33.202-08:00</updated><title type='text'>Check Change Tracking status using T-SQL</title><content type='html'>&lt;p&gt;In case you need to check if a database has &lt;a href="http://msdn.microsoft.com/en-us/library/cc280462.aspx"&gt;SQL Server change tracking&lt;/a&gt; activated, you can use the &lt;em&gt;sys&lt;/em&gt; view &lt;em&gt;change_tracking_databases&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;As it does only include the database_id, use this SQL statement to retrieve the status for a given database.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;select * from sys.change_tracking_databases where database_id=(select database_id from sys.databases WHERE name = 'MyDatabase')&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The result contains all information you can also configure using SQL Server Management Studio.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_V1tbWNn9eRE/TV-z6lpXAoI/AAAAAAAAAeA/Fz5EzcnLSIw/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_V1tbWNn9eRE/TV-z7MrO1JI/AAAAAAAAAeE/B1RkBrXyC-U/image_thumb%5B5%5D.png?imgmax=800" width="589" height="70" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you want to retrieve the state for a given table, use &lt;em&gt;sys.change_tracking_tables&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;More information on these two views can be found in &lt;a href="http://msdn.microsoft.com/en-us/library/bb964713.aspx"&gt;Configuring and Managing Change Tracking&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8714780478850395665?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8714780478850395665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8714780478850395665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8714780478850395665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8714780478850395665'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/02/check-change-tracking-status-using-t.html' title='Check Change Tracking status using T-SQL'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_V1tbWNn9eRE/TV-z7MrO1JI/AAAAAAAAAeE/B1RkBrXyC-U/s72-c/image_thumb%5B5%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8845918948979202015</id><published>2011-02-12T02:36:00.001-08:00</published><updated>2011-02-12T02:36:18.761-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Ignoring the manager</title><content type='html'>&lt;p&gt;A server is doing the same as I (sometimes) at the office, but for different reasons…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_V1tbWNn9eRE/TVZinkxa9aI/AAAAAAAAAd4/rCkDZqiX3RE/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_V1tbWNn9eRE/TVZioS3I39I/AAAAAAAAAd8/YExPq2AMb-s/image_thumb%5B2%5D.png?imgmax=800" width="537" height="605" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8845918948979202015?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8845918948979202015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8845918948979202015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8845918948979202015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8845918948979202015'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/02/ignoring-manager.html' title='Ignoring the manager'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_V1tbWNn9eRE/TVZioS3I39I/AAAAAAAAAd8/YExPq2AMb-s/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8307890222339877573</id><published>2011-02-09T11:22:00.001-08:00</published><updated>2011-02-09T11:22:08.857-08:00</updated><title type='text'>Displaying checksums and hashes within Windows Explorer</title><content type='html'>&lt;p&gt;In case you want to have a quick way to check if two files are really identical, you will most likely use a hash tool and view the SHA-1 or MD5 hash.&lt;/p&gt;  &lt;p&gt;The best I have found so far is &lt;a href="http://code.kliu.org/hashcheck/"&gt;HashCheck Shell Extension&lt;/a&gt; by &lt;a href="http://www.kailiu.com/about.xhtml"&gt;Kai Liu&lt;/a&gt; which will simply add a tab on the file properties dialog of the Windows Explorer. Easy, fast and works with Windows 7 (x32 or x64). &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_V1tbWNn9eRE/TVLpWYgOxXI/AAAAAAAAAds/sWerpddXhSk/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_V1tbWNn9eRE/TVLpYO9h2_I/AAAAAAAAAdw/lG9egftlKhA/image_thumb%5B1%5D.png?imgmax=800" width="307" height="439" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8307890222339877573?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8307890222339877573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8307890222339877573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8307890222339877573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8307890222339877573'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/02/displaying-checksums-and-hashes-within.html' title='Displaying checksums and hashes within Windows Explorer'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_V1tbWNn9eRE/TVLpYO9h2_I/AAAAAAAAAdw/lG9egftlKhA/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2714169486514125599</id><published>2011-01-31T03:14:00.000-08:00</published><updated>2011-02-05T03:18:13.259-08:00</updated><title type='text'>Searching for Group Policy Settings</title><content type='html'>&lt;p&gt;if you work a lot with Group Policies Settings (GPO) you often need to search, simply given how many settings Windows does now offer. &lt;/p&gt;  &lt;p&gt;Sometimes it’s easy as “Is there a setting for controlling feature X?”, but sometimes it’s just the other way around “There is registry setting Z active, which GPO settings is that?”.&lt;/p&gt;  &lt;p&gt;There is no chance to do this with the default tools Microsoft offers, but fortunately they have create a web application that does allow you to do just that:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://gps.cloudapp.net/"&gt;Group Policy Search&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_V1tbWNn9eRE/TU0x8a-4MGI/AAAAAAAAAdA/8gUZWoy8S38/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_V1tbWNn9eRE/TU0x9P0vVuI/AAAAAAAAAdE/6df0JnFo8Tg/image_thumb%5B1%5D.png?imgmax=800" width="552" height="420" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2714169486514125599?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2714169486514125599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2714169486514125599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2714169486514125599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2714169486514125599'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2011/01/searching-for-group-policy-settings.html' title='Searching for Group Policy Settings'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_V1tbWNn9eRE/TU0x9P0vVuI/AAAAAAAAAdE/6df0JnFo8Tg/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8185527338264884473</id><published>2010-12-15T12:37:00.001-08:00</published><updated>2010-12-15T12:44:43.747-08:00</updated><title type='text'>Why DPInst sometimes chooses the wrong driver</title><content type='html'>&lt;p&gt;DPInst is a great tool to automatically deploy drivers to computers (see &lt;a href="http://texhex.blogspot.com/2009/10/installing-windows-7-drivers-from.html"&gt;this post&lt;/a&gt; for more details). The easiest way is to create a folder, put all drivers packages there and then let DPInst run. Usually it picks the correct one and you are happy. If you later on add a newer drive and let DPInst run again, it will pick that new driver. This normally works just fine.&lt;/p&gt;  &lt;p&gt;However, we had a case where DPInst was not using a newer driver, but instead &lt;strong&gt;downgraded&lt;/strong&gt; the driver to an older version - the worst thing that could happen.&lt;/p&gt;  &lt;p&gt;Everything started with a download of a driver package for the 82567LM NIC from Intel. The driver version preloaded on the machine was 11.6.92.0:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_V1tbWNn9eRE/TQknD-pvomI/AAAAAAAAAcU/4L0eTb-r0uo/s1600-h/clip_image002%5B5%5D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh3.ggpht.com/_V1tbWNn9eRE/TQknEU5oqhI/AAAAAAAAAcY/nT3msVz8xmQ/clip_image002_thumb%5B2%5D.jpg?imgmax=800" width="350" height="187" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The new driver we wanted to use was 11.8.75.0, because this version has some bug fixes applied. So we copied the decompressed files from the package to the DPInst folder (where other Network drivers are also saved) and run our batch file.&lt;/p&gt;  &lt;p&gt;After DPInst was finished, we were a little bit shocked to see that it hasn’t installed the new driver, but instead installed an even older driver (11.5.10.1011):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_V1tbWNn9eRE/TQknEgL9mBI/AAAAAAAAAcc/RcYlq1Hjp7U/s1600-h/clip_image004%5B6%5D.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh6.ggpht.com/_V1tbWNn9eRE/TQknFZ23dJI/AAAAAAAAAcg/CA1Qw4PwIUM/clip_image004_thumb%5B3%5D.jpg?imgmax=800" width="368" height="205" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So, for some strange reason DPInst used the old driver, and simply ignored the new one. After the second run of it, we examined the log file (%WINDIR%\DPInst.log) which displayed this:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;INFO: Did not install 'c:\temp\netdrv\_intel network adapter driver for windows 7_15.7_11_11_2010_x32\pro1000\win32\ndis62\e1k6232.inf' because it is not better than the current drivers.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Somehow DPInst thinks that this driver (which is even older than the previously installed one) is better suited for the computer! Searching for the mentioned &lt;i&gt;e1k6232.inf&lt;/i&gt;, we found two files on the share. One was from a direct download of HP (11.5.10.1011 – the old one that DPInst installed) and one was the new driver package we had copied (11.8.75.0 – from Intel.com directly). &lt;/p&gt;  &lt;p&gt;Inside the INF file of the old version, this device ID existed:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;%E10DENC.DeviceDesc% = E10DE.6.1.1, PCI\VEN_8086&amp;amp;DEV_10DE&amp;amp;SUBSYS_3034103C&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The new package from Intel only showed this &lt;/p&gt;  &lt;p&gt;&lt;em&gt;%E10DENC.DeviceDesc% = E10DE, PCI\VEN_8086&amp;amp;DEV_10DE&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;After some investigation, the reason for this is pretty simple: DPInst will always use the driver that is the best &lt;strong&gt;suitable&lt;/strong&gt; driver. As we had an HP machine, the network driver had the PCI ID of &lt;em&gt;VEN_8086 &amp;amp;DEV_10DE &amp;amp;SUBSYS_3034103C&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;And this means that driver from the older version suits &lt;em&gt;better&lt;/em&gt; (because everything from the PCI ID matches) than the new driver that misses the &lt;em&gt;&amp;amp;SUBSYS_3034103C&lt;/em&gt; part. Confused? Here’s the detailed explanation:&lt;/p&gt;  &lt;p&gt;The NIC in the computer is: Intel (VEN_8086) – Type 82567LM (DEV_10DE) – HP Branded (SUBSYS_3034103C)&lt;/p&gt;  &lt;p&gt;DPInst was started and scanned the available drivers and the hardware and came up with the following list:&lt;/p&gt;  &lt;p&gt;- Hardware: Intel - 82567LM – HP Branded    &lt;br /&gt;- Installed Driver : Version 11.6.92.0, usable with Intel – 82567LM     &lt;br /&gt;- Driver #1 found: Version 11.8.75.0 (new), usable with Intel – 82567LM     &lt;br /&gt;- Driver #2 found: Version 11.5.10.1011 (old), usable with Intel - 82567LM – HP Branded&lt;/p&gt;  &lt;p&gt;From these drivers, only one was the best “suited”, because it included the “HP Branded” (&lt;em&gt;SUBSYS_3034103C&lt;/em&gt;) part. So it chooses this version which was actually a version downgrade…&lt;/p&gt;  &lt;p&gt;Running DPInst again will cause the following internal list by DPInst:&lt;/p&gt;  &lt;p&gt;- Hardware: Intel - 82567LM – HP Branded    &lt;br /&gt;- Installed Driver : Version 11.5.10.1011 (old), usable with Intel - 82567LM – HP Branded     &lt;br /&gt;- Driver #1 found: Version 11.8.75.0 (new), usable with Intel - 82567LM&lt;/p&gt;  &lt;p&gt;Because the newer version does not include the “HP Branded” part, it is again not installed by DPInst.&lt;/p&gt;  &lt;p&gt;Once the strange behavior was clear, the next question: How do we fix this? &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Option #1&lt;/em&gt;: You try to get a new driver from the vendor (in this case HP) which included the “HP Branded” option and will cause DPInst to update the driver. Unfortunately, HP hasn’t adopted the new version from Intel so far, so this isn’t possible.&lt;/p&gt;  &lt;p&gt;Option #2: You use “Add or Remove Programs” and remove the driver packages DPInst has installed (this is automatically done by it). Then, remove the old driver directory from the DPInst folder.&lt;/p&gt;  &lt;p&gt;Since now the old driver are activated again (without the HP Branded part within the INF), DPInst will happily pick up the new version we wanted to use from the beginning.&lt;/p&gt;  &lt;p&gt;Who said driver installation is supposed to be &lt;em&gt;Plug and Play&lt;/em&gt;?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8185527338264884473?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8185527338264884473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8185527338264884473' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8185527338264884473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8185527338264884473'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/12/why-dpinst-sometimes-chooses-wrong.html' title='Why DPInst sometimes chooses the wrong driver'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/TQknEU5oqhI/AAAAAAAAAcY/nT3msVz8xmQ/s72-c/clip_image002_thumb%5B2%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1240898631844745021</id><published>2010-11-30T11:46:00.001-08:00</published><updated>2010-11-30T11:50:09.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Windows 32-bit or 64-bit batch helper</title><content type='html'>&lt;p&gt;Given the more spreading use of 64-bit Windows (e.g. Windows 7 x64), the life of an administrator gets even more complicated. For example, if you want to silently install a program and need to specify the destination folder, the command is rather simple:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;S:\SuperCalc\installs.exe DESTINATION=&amp;quot;%ProgramFiles%\SuperCalc&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;At runtime, &lt;em&gt;%ProgramFiles%&lt;/em&gt; will be expanded to &lt;em&gt;C:\Program Files&lt;/em&gt; and you are done. However, if you want to install on a 64-bit Windows, the program should be installed to &lt;em&gt;C:\Program Files (x86)&lt;/em&gt; - given that SuperCalc is a 32 bit application. &lt;/p&gt;  &lt;p&gt;In this case, the command should read:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;S:\SuperCalc\installs.exe DESTINATION=&amp;quot;%ProgramFiles(x86)%\SuperCalc&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Of course, this will not work on any non 64-bit machine since there is no variable &lt;em&gt;%ProgramFiles(x86)%&lt;/em&gt;. Additionally, the directory layout for Windows itself is... well… strange on a 64-bit computer. &lt;em&gt;C:\WINDOWS\System32&lt;/em&gt; contains &lt;strong&gt;64-bit&lt;/strong&gt; files (!!), while the correct path for 32-bit files is &lt;em&gt;C:\WINDOWS\SysWOW64&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Since I prefer a simple solution, I have created a batch file that sets some variables and these always point to the correct path, regardless if the system is 32-bit or 64-bit. &lt;/p&gt;  &lt;p&gt;The example from above could simply be written like this:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;S:\SuperCalc\installs.exe DESTINATION=&amp;quot;%PrgFiles%\SuperCalc&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;%PrgFiles%&lt;/em&gt; will be either be &lt;em&gt;C:\Program Files&lt;/em&gt; on a 32-bit Windows or &lt;em&gt;C:\Program Files (x86)&lt;/em&gt; when used with a 64-bit Windows.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Rem -------------------------------------------------------------------     &lt;br /&gt;Rem ----- 32 / 64-bit Batch Helper by TeX HeX - &lt;/em&gt;&lt;a href="http://www.texhex.info/"&gt;&lt;em&gt;http://www.texhex.info/&lt;/em&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;if defined ProgramFiles(x86) GOTO WinX64&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Rem This seems to be a 32-bit machine     &lt;br /&gt;SET IsX64=0      &lt;br /&gt;SET PrgFiles=%ProgramFiles%      &lt;br /&gt;SET PrgFilesX64=      &lt;br /&gt;SET SYSTEM32=%SystemRoot%\system32      &lt;br /&gt;SET SYSTEM64=      &lt;br /&gt;GOTO Exec&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:WinX64     &lt;br /&gt;SET IsX64=1      &lt;br /&gt;SET PrgFiles=%ProgramFiles(x86)%      &lt;br /&gt;SET PrgFilesX64=%ProgramFiles%      &lt;br /&gt;SET SYSTEM32=%SystemRoot%\SysWOW64      &lt;br /&gt;SET SYSTEM64=%SystemRoot%\system32      &lt;br /&gt;GOTO Exec&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:Exec     &lt;br /&gt;echo &amp;quot;IsX64&amp;quot; (is x64 Windows): %IsX64%      &lt;br /&gt;Rem &amp;quot;0&amp;quot; on x32 - 1 on x64&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo &amp;quot;PrgFiles&amp;quot; (32-bit Program Files): %PrgFiles%      &lt;br /&gt;Rem C:\Program Files on x32 - C:\Program Files (x86) on x64&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo &amp;quot;PrgFilesX64&amp;quot; (64-bit Program Files): %PrgFilesX64%      &lt;br /&gt;Rem (empty) on x32 - C:\Program Files on x64&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo &amp;quot;System32&amp;quot; (32-bit System Folder): %SYSTEM32%      &lt;br /&gt;Rem C:\WINDOWS\System32 on x32 - C:\WINDOWS\SysWOW64 on x64&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo &amp;quot;System64&amp;quot; (64-bit Windows System Folder): %SYSTEM64%      &lt;br /&gt;Rem (empty) on x32 - C:\WINDOWS\System32 on x64      &lt;br /&gt;Rem -------------------------------------------------------------------      &lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Please take care if you want to use build-in tools like REGEDIT.EXE. Sometimes they are located in different folders on 32 and 64-bit. This is an example for using the 32-bit REGEDIT.EXE:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Rem On x64, the 32-bit Regedit.exe is located inside the \SysWow64 (32bit System) folder     &lt;br /&gt;IF &amp;quot;%IsX64%&amp;quot;==&amp;quot;1&amp;quot; &amp;quot;%system32%\regedit.exe&amp;quot; /s &amp;quot;C:\MyReg.reg&amp;quot; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Rem On x32, the 32-bit Regedit.exe is located inside the \Windows folder     &lt;br /&gt;IF &amp;quot;%IsX64%&amp;quot;==&amp;quot;0&amp;quot; &amp;quot;%windir%\regedit.exe&amp;quot; /s &amp;quot;C:\MyReg.reg&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;These batch files run perfectly on Windows XP (32-bit and 64-bit) as well as Windows 7 (32-bit and 64-bit). However, if you need to have access to special folders like Desktop, Start menu etc. please &lt;a href="http://texhex.blogspot.com/2009/10/windows-7-shared-desktop-and-start-menu.html"&gt;see this post&lt;/a&gt;. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1240898631844745021?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1240898631844745021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1240898631844745021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1240898631844745021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1240898631844745021'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/11/windows-32-bit-or-64-bit-batch-helper.html' title='Windows 32-bit or 64-bit batch helper'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1402915168844238778</id><published>2010-11-16T13:00:00.001-08:00</published><updated>2010-11-16T13:00:46.050-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Error'/><title type='text'>RSAT Installation error 2147942413: The data is invalid</title><content type='html'>&lt;p&gt;Now this was a tricky little error.&lt;/p&gt;  &lt;p&gt;I wanted to install the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;amp;FamilyID=7d2f6ad7-656b-4313-a005-4e344e43997d"&gt;Remote Server Administration Tools for Windows 7&lt;/a&gt; (RSAT) on my Windows 7 x64 Ultimate machine today. &lt;/p&gt;  &lt;p&gt;Downloaded, double-clicked the MSU file and then this error showed up:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows update &amp;quot;Update for Windows (KB958830)&amp;quot; could not be installed because of error 2147942413 “The data is invalid”.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Yes, thank for the detailed explanation. But the event log will truly have a be better explanation, I’m sure! &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Log Name: Setup     &lt;br /&gt;Source: Microsoft-Windows-WUSA      &lt;br /&gt;Event ID: 3      &lt;br /&gt;Task Category: None      &lt;br /&gt;Level: Error      &lt;br /&gt;Keywords:       &lt;br /&gt;      &lt;br /&gt;Description:      &lt;br /&gt;Windows update &amp;quot;Update for Windows (KB958830)&amp;quot; could not be installed because of error 2147942413 &amp;quot;The data is invalid.&amp;quot; (Command line: &amp;quot;&amp;quot;C:\Windows\system32\wusa.exe&amp;quot; &amp;quot;C:\Users\User\Downloads\amd64fre_GRMRSATX_MSU.msu &amp;quot;&amp;quot;)&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Okay, also not very detailed. After a lot of searching, it turned out that this message means: The file is damaged!&lt;/p&gt;  &lt;p&gt;Downloaded again from a different machine, run without any problem. Go figure…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1402915168844238778?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1402915168844238778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1402915168844238778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1402915168844238778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1402915168844238778'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/11/rsat-installation-error-2147942413-data.html' title='RSAT Installation error 2147942413: The data is invalid'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2573139587673308413</id><published>2010-10-30T04:33:00.000-07:00</published><updated>2010-11-13T03:34:23.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>The server needs some more everything…</title><content type='html'>&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_V1tbWNn9eRE/TN53tppfhdI/AAAAAAAAAcA/_Glgd_WUTXs/s1600-h/clip_image001%5B5%5D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://lh4.ggpht.com/_V1tbWNn9eRE/TN53vdiYjTI/AAAAAAAAAcE/-f_fcg8daTY/clip_image001_thumb%5B2%5D.jpg?imgmax=800" width="577" height="433" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As the title says :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2573139587673308413?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2573139587673308413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2573139587673308413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2573139587673308413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2573139587673308413'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/10/server-needs-some-more-everything.html' title='The server needs some more everything…'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_V1tbWNn9eRE/TN53vdiYjTI/AAAAAAAAAcE/-f_fcg8daTY/s72-c/clip_image001_thumb%5B2%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2835018137410629024</id><published>2010-10-04T11:19:00.001-07:00</published><updated>2010-10-04T11:19:31.366-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Insert a disc with more space</title><content type='html'>&lt;p&gt;Anyone know where I can get a disc with 819 &lt;a href="http://en.wikipedia.org/wiki/Petabyte"&gt;petabyte&lt;/a&gt; so I can retry?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_V1tbWNn9eRE/TKoasMtN_TI/AAAAAAAAAb4/A17MgydBc9g/s1600-h/space_needed%5B3%5D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="space_needed" border="0" alt="space_needed" src="http://lh6.ggpht.com/_V1tbWNn9eRE/TKoasqaBwtI/AAAAAAAAAb8/m6WhwCxqRiU/space_needed_thumb%5B1%5D.jpg?imgmax=800" width="567" height="468" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2835018137410629024?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2835018137410629024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2835018137410629024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2835018137410629024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2835018137410629024'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/10/insert-disc-with-more-space.html' title='Insert a disc with more space'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_V1tbWNn9eRE/TKoasqaBwtI/AAAAAAAAAb8/m6WhwCxqRiU/s72-c/space_needed_thumb%5B1%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3475936983465947351</id><published>2010-09-15T12:43:00.001-07:00</published><updated>2010-09-15T12:50:13.608-07:00</updated><title type='text'>Windows Phone 7 Features and Rumors roundup</title><content type='html'>&lt;p&gt;&lt;a href="http://texhex.blogspot.com/2010/08/my-rambling-thoughts-about-smartphones.html"&gt;My last blog entry about smart phones&lt;/a&gt; has produces quite some response, but interestingly all via email. Okay, nobody likes the comment function. Got it.&lt;/p&gt;  &lt;p&gt;Meanwhile, new features/rumors/lies (pick one) have emerged, so I’m trying to sum them all up here. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Updates for Windows Phone 7 will be released directly by Microsoft      &lt;br /&gt;      &lt;br /&gt;This is very good since this means you (should) always have the newest release available on your phone. This is better than in Android where the handset maker needs to push out the update (currently only 25% of all Android devices have the newest version 2.2). Given that smart phones are more and more targeted with malware, this should also increase security.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;No carrier lock      &lt;br /&gt;      &lt;br /&gt;WP7 does not come with any carrier lock-in, so this means you can simply buy a WP7 phone without a contract and use it with any carrier. There might be phones that will be available only at some carrier, but given that Microsoft has defined very strict hardware requirements, it shouldn’t be a problem to find something similar with ease.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;“My Phone” feature      &lt;br /&gt;      &lt;br /&gt;Microsoft has already a site and application called “My Phone” that can be used to backup the data on your phone automatically or ring the phone if you have lost it it somewhere. WP7 will also allow to remote wipe the phone or lock it and display a message. If you every lost a phone, you will &lt;strong&gt;love&lt;/strong&gt; this feature.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;Any app must disclose advanced services it intends to use      &lt;br /&gt;      &lt;br /&gt;Any app that intents to use advanced features of the phone (e.g. the GPS receiver) must disclose this to WP7 which in turn will display this list to the user upon the installation of the app. So, if an app want to use push notification you are asked during the installation if this is okay with you.       &lt;br /&gt;      &lt;br /&gt;If an app tries to use a feature that hasn’t been disclosed, it will be shut down. Although this is borrowed from Android, this really puts the user in control. Any BTW: The iPhone does not have anything close to this. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Zune Pass available      &lt;br /&gt;      &lt;br /&gt;As it seems, WP7 users worldwide will have access to Zune Pass for round about 12€/month. This give you the ability to listen to any song they have in their library as long as you subscription is active. Per month, you can also keep 10 songs at no additional cost.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;Very clever UI ideas      &lt;br /&gt;      &lt;br /&gt;WP7 as without any doubt some very clear user interface ideas. My favorite is the idea that the camera shows the live picture and a “slider” on the left. Simply swipe left to right and you see the lat phone taken. Swipe right to left and you’re back on the live preview. Usability: A+.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;Microsoft will only allow five free apps per developer      &lt;br /&gt;      &lt;br /&gt;Yes, this is a restriction but actually a good one. We all know that there are several developers out there that make 10 apps “Slideshow Person X”, “Slideshow Person Y”, “Slideshow Person Z” etc. This restriction might not solve this problem, but should improve the situation of having the 457th flashlight app.       &lt;br /&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;Payment will not be using Microsoft Points      &lt;br /&gt;      &lt;br /&gt;Payment is still a big topic. Apple does currently the best job (matching *.99€/$ prices, payable directly with a credit card etc.) and Android/Google Checkout is the worst example. Microsoft will not use their own “currency” Points, but allow direct Credit Card payments with adapted pricing per Country (0.99€ in Europe and 0.99$ in the States)       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Please note that nothing major has changed &lt;a href="http://texhex.blogspot.com/2010/08/my-rambling-thoughts-about-smartphones.html"&gt;from what I said in my last post&lt;/a&gt;. Windows Phone 7 has a nice user interface with a great runtime (.NET/Silverlight) and a near-perfect development tool (Visual Studio). But it also comes with some very big FAILS like the enforced App Store with a &lt;strike&gt;censorship&lt;/strike&gt; review process. &lt;/p&gt;  &lt;p&gt;Windows Phone 7 is definitely worth a look once it’s available. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3475936983465947351?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3475936983465947351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3475936983465947351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3475936983465947351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3475936983465947351'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/09/windows-phone-7-features-and-rumors.html' title='Windows Phone 7 Features and Rumors roundup'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7140043499692691220</id><published>2010-09-14T11:02:00.001-07:00</published><updated>2010-09-14T11:02:37.408-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Xbox in Leetspeak</title><content type='html'>&lt;p&gt;Now this explains why Microsoft has offered a Xbox &lt;a href="http://en.wikipedia.org/wiki/Leetspeek"&gt;31it3&lt;/a&gt; in the past…&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_V1tbWNn9eRE/TI-4ukgGbLI/AAAAAAAAAbw/xj3zepPgE2A/s1600-h/IMG_1224%5B3%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="IMG_1224" border="0" alt="IMG_1224" src="http://lh4.ggpht.com/_V1tbWNn9eRE/TI-4vLtQx-I/AAAAAAAAAb0/S8q8dmLhwuU/IMG_1224_thumb%5B1%5D.jpg?imgmax=800" width="382" height="502" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7140043499692691220?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7140043499692691220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7140043499692691220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7140043499692691220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7140043499692691220'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/09/xbox-in-leetspeak.html' title='Xbox in Leetspeak'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_V1tbWNn9eRE/TI-4vLtQx-I/AAAAAAAAAb0/S8q8dmLhwuU/s72-c/IMG_1224_thumb%5B1%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3650687168380953226</id><published>2010-09-06T10:24:00.001-07:00</published><updated>2010-09-06T10:24:47.499-07:00</updated><title type='text'>Samsung Galaxy S (Android 2.1) USSD codes not working</title><content type='html'>&lt;p&gt;Today, I wanted to use some of my carrier &lt;a href="http://en.wikipedia.org/wiki/USSD"&gt;USSD codes&lt;/a&gt; (e.g. *120#) on my Galaxy S and they didn’t worked.&lt;/p&gt;  &lt;p&gt;I entered them, but the Galaxy refused to display anything. After some searching I found out that this comes from the &lt;em&gt;Mobile Tracker&lt;/em&gt; I had activated. &lt;/p&gt;  &lt;p&gt;As soon as you active &lt;em&gt;Mobile Tracker&lt;/em&gt; (Settings –&amp;gt; Location and security –&amp;gt; Mobile tracker) no USSD codes will work.&lt;/p&gt;  &lt;p&gt;Disabled &lt;em&gt;Mobile Tracker&lt;/em&gt; and the codes were working again. Go figure…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3650687168380953226?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3650687168380953226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3650687168380953226' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3650687168380953226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3650687168380953226'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/09/samsung-galaxy-s-andorid-21-ussd-codes.html' title='Samsung Galaxy S (Android 2.1) USSD codes not working'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1710005123862694734</id><published>2010-09-01T08:33:00.001-07:00</published><updated>2010-09-01T08:33:55.770-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Random item name generator in DeathSpank style</title><content type='html'>&lt;p&gt;I have to admit, I couldn’t resist. &lt;/p&gt;  &lt;p&gt;The &lt;a href="http://texhex.blogspot.com/2010/08/generator-for-random-person-names.html"&gt;RandomPersonNameGenerator&lt;/a&gt; was a very good starting point to create the &lt;em&gt;RandomItemNameGenerator&lt;/em&gt;, which creates role play game item names in &lt;a href="http://www.deathspank.com/home-original"&gt;DeathSpank&lt;/a&gt; style. &lt;/p&gt;  &lt;p&gt;Here are some of the results this class generates:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Failing Manual of Failing&lt;/li&gt;    &lt;li&gt;Fluffy Rocket of Impending Doom&lt;/li&gt;    &lt;li&gt;Epic Dynamite Kit&lt;/li&gt;    &lt;li&gt;Functional Bacon of Function&lt;/li&gt;    &lt;li&gt;Sparkling Fly Swatter of Impending Doom&lt;/li&gt;    &lt;li&gt;OMG Dynamite of Awesomeness&lt;/li&gt;    &lt;li&gt;Glowing Chicken of Function&lt;/li&gt;    &lt;li&gt;Fluffy Rocket of Function&lt;/li&gt;    &lt;li&gt;Heroic Crowbar Kit&lt;/li&gt;    &lt;li&gt;OMG Orb Kit&lt;/li&gt;    &lt;li&gt;Fluffy Manual of Awesomeness&lt;/li&gt;    &lt;li&gt;Normal Crowbar of Function&lt;/li&gt;    &lt;li&gt;Epic Bacon Kit&lt;/li&gt;    &lt;li&gt;Functional Fly Swatter of Function&lt;/li&gt;    &lt;li&gt;Sparkling Anvil of Failing&lt;/li&gt;    &lt;li&gt;Fluffy Orb of CAPSLOCK&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Yes, this does not make any sense. And no, there is for sure no project where you can use it. And yes, it was a total waste of time. But for the fun, it was worth it :-).&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;using System;     &lt;br /&gt;using System.Collections.Generic; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;#region License &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;//For an explanation see &lt;/font&gt;&lt;a href="http://www.opensource.org/licenses/bsd-license.php"&gt;&lt;font size="1" face="Courier New"&gt;http://www.opensource.org/licenses/bsd-license.php&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;/*     &lt;br /&gt;Copyright (c) 2010, TeX HeX / Xteq Systems       &lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.texhex.info/"&gt;&lt;font size="1" face="Courier New"&gt;http://www.texhex.info/&lt;/font&gt;&lt;/a&gt;&lt;font size="1" face="Courier New"&gt; &lt;/font&gt;&lt;a href="http://www.xteq.com/"&gt;&lt;font size="1" face="Courier New"&gt;http://www.xteq.com/&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font size="1" face="Courier New"&gt;All rights reserved. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Redistribution and use in source and binary forms, with or without modification,      &lt;br /&gt;are permitted provided that the following conditions are met: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160; * Redistributions of source code must retain the above copyright notice, this      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; list of conditions and the following disclaimer.      &lt;br /&gt;&amp;#160; * Redistributions in binary form must reproduce the above copyright notice,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; this list of conditions and the following disclaimer in the documentation       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; and/or other materials provided with the distribution.      &lt;br /&gt;&amp;#160; * Neither the name of the Xteq Systems nor the names of its contributors may       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; be used to endorse or promote products derived from this software without       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; specific prior written permission. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;      &lt;br /&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE       &lt;br /&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE       &lt;br /&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE       &lt;br /&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL       &lt;br /&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR       &lt;br /&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER       &lt;br /&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,       &lt;br /&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE       &lt;br /&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.       &lt;br /&gt;*/      &lt;br /&gt;#endregion &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;namespace RandomGenerator     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class RandomItemName      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Prefix { get; set; }&amp;#160;&amp;#160; //&amp;#160; Epic      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Name { get; set; }&amp;#160;&amp;#160;&amp;#160;&amp;#160; //&amp;#160; Chest      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Suffix { get; set; }&amp;#160;&amp;#160; //&amp;#160; of Awesomeness      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Full { get; set; }&amp;#160;&amp;#160;&amp;#160;&amp;#160; //&amp;#160; Epic Chest of Awesomeness &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override string ToString()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return Full;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; public class RandomItemNameGenerator     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #region Name arrays &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _prefixNameSet = new string[] {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Epic&amp;quot;, &amp;quot;Heroic&amp;quot;, &amp;quot;Normal&amp;quot;, &amp;quot;Glowing&amp;quot;, &amp;quot;Functional&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Sparkling&amp;quot;, &amp;quot;Fluffy&amp;quot;, &amp;quot;OMG&amp;quot;, &amp;quot;Failing&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _prefixNameSetCount = _prefixNameSet.GetUpperBound(0) + 1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _itemNameSet = new string[] {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Chest&amp;quot;, &amp;quot;Dynamite&amp;quot;, &amp;quot;Chicken&amp;quot;, &amp;quot;Orb&amp;quot;, &amp;quot;Bacon&amp;quot;, &amp;quot;Manual&amp;quot; ,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Crowbar&amp;quot;, &amp;quot;Anvil&amp;quot;, &amp;quot;Fly Swatter&amp;quot;, &amp;quot;Rocket&amp;quot;, &amp;quot;Scarab&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _itemNameSetCount = _itemNameSet.GetUpperBound(0) + 1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _suffixNameSet = new string[] {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;of Impending Doom&amp;quot; , &amp;quot;of Function&amp;quot;, &amp;quot;of Awesomeness&amp;quot;, &amp;quot;Kit&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;of CAPSLOCK&amp;quot;, &amp;quot;of Failing&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #endregion      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _suffixNameSetCount = _suffixNameSet.GetUpperBound(0) + 1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomItemName GenerateOne(Random rndm)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValuePrefix = rndm.Next(0, _prefixNameSetCount);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValueName = rndm.Next(0, _itemNameSetCount);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValueSuffix = rndm.Next(0, _suffixNameSetCount); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomItemName rpi = new RandomItemName(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpi.Prefix=_prefixNameSet[iRandomValuePrefix];     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpi.Name=_itemNameSet[iRandomValueName];      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpi.Suffix=_suffixNameSet[iRandomValueSuffix]; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpi.Full = rpi.Prefix + &amp;quot; &amp;quot; + rpi.Name + &amp;quot; &amp;quot; + rpi.Suffix; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return rpi;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public List&amp;lt;RandomItemName&amp;gt; Generate(int Count)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;RandomItemName&amp;gt; list = new List&amp;lt;RandomItemName&amp;gt;(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Random rndm = new Random(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for (int i = 0; i &amp;lt; Count; i++)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; list.Add(GenerateOne(rndm));      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return list;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public static List&amp;lt;RandomItemName&amp;gt; StaticGenerate(int Count)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomItemNameGenerator ring_ring = new RandomItemNameGenerator();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return ring_ring.Generate(Count);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1710005123862694734?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1710005123862694734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1710005123862694734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1710005123862694734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1710005123862694734'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/09/random-item-name-generator-in.html' title='Random item name generator in DeathSpank style'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3796951065138584189</id><published>2010-08-31T10:01:00.001-07:00</published><updated>2010-08-31T10:04:54.003-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>A generator for random person names</title><content type='html'>&lt;p&gt;During the creation of a project, I often need to generate test data to test the applications. Quite frequently this happens when there is (yet) no database backend available so I need to generate the test data directly inside the program.&lt;/p&gt;  &lt;p&gt;Usually, this also involves test data of persons (or users, customers, suppliers etc.). Over time I really got sick of my imaginative creations like “AAA 1”, “ZRIQW 44” and of course the well known “sdsfghsdfj, sdf934md930”. &lt;/p&gt;  &lt;p&gt;Thats why I have generated the &lt;em&gt;RandomPersonNameGenerator&lt;/em&gt; class that uses the top 30 names from the &lt;a href="http://www.census.gov/genealogy/www/data/1990surnames/"&gt;1990 census of the U.S. Census Bureau&lt;/a&gt; to generate random person names. &lt;/p&gt;  &lt;p&gt;The usage is very simple:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;RandomPersonNameGenerator rpGen = new RandomPersonNameGenerator();     &lt;br /&gt;List&amp;lt;RandomPersonName&amp;gt; list = rpGen.Generate(100); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;foreach (RandomPersonName rpn in list)     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(rpn);      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The result will look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_V1tbWNn9eRE/TH01TLAlFtI/AAAAAAAAAbY/YiuC7fcGkzo/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_V1tbWNn9eRE/TH01TqKxW7I/AAAAAAAAAbc/GXRxYYHJCKE/image_thumb%5B1%5D.png?imgmax=800" width="506" height="265" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can also use the static method and directly access one of the properties of the resulting &lt;em&gt;RandomPersonName&lt;/em&gt; objects. &lt;/p&gt;  &lt;p&gt;List&amp;lt;RandomPersonName&amp;gt; list = RandomPersonNameGenerator.StaticGenerate(100); &lt;/p&gt;  &lt;p&gt;foreach (RandomPersonName rpn in list)   &lt;br /&gt;{    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Console.WriteLine(rpn.LastCommaFirst);    &lt;br /&gt;}&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_V1tbWNn9eRE/TH01UcjfUmI/AAAAAAAAAbg/wdu1poIJaF0/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_V1tbWNn9eRE/TH01UxIEt1I/AAAAAAAAAbk/Sn9jJ3Achag/image_thumb%5B3%5D.png?imgmax=800" width="503" height="264" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The class is released under the &lt;a href="http://www.opensource.org/licenses/bsd-license.php"&gt;new BSD license&lt;/a&gt;. Enjoy!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;using System;     &lt;br /&gt;using System.Collections.Generic; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;#region License &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;//For an explanation see &lt;/font&gt;&lt;a href="http://www.opensource.org/licenses/bsd-license.php"&gt;&lt;font size="1" face="Courier New"&gt;http://www.opensource.org/licenses/bsd-license.php&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;/*     &lt;br /&gt;Copyright (c) 2010, TeX HeX / Xteq Systems       &lt;br /&gt;&lt;/font&gt;&lt;a href="http://www.texhex.info/"&gt;&lt;font size="1" face="Courier New"&gt;http://www.texhex.info/&lt;/font&gt;&lt;/a&gt;&lt;font size="1" face="Courier New"&gt; &lt;/font&gt;&lt;a href="http://www.xteq.com/"&gt;&lt;font size="1" face="Courier New"&gt;http://www.xteq.com/&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font size="1" face="Courier New"&gt;All rights reserved. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;Redistribution and use in source and binary forms, with or without modification,      &lt;br /&gt;are permitted provided that the following conditions are met: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160; * Redistributions of source code must retain the above copyright notice, this      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; list of conditions and the following disclaimer.      &lt;br /&gt;&amp;#160; * Redistributions in binary form must reproduce the above copyright notice,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; this list of conditions and the following disclaimer in the documentation       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; and/or other materials provided with the distribution.      &lt;br /&gt;&amp;#160; * Neither the name of the Xteq Systems nor the names of its contributors may       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; be used to endorse or promote products derived from this software without       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; specific prior written permission. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;      &lt;br /&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE       &lt;br /&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE       &lt;br /&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE       &lt;br /&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL       &lt;br /&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR       &lt;br /&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER       &lt;br /&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,       &lt;br /&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE       &lt;br /&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.       &lt;br /&gt;*/      &lt;br /&gt;#endregion &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;namespace RandomGenerator     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// This class is used to store a name and give easy access to the differnt parts of it.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class RandomPersonName      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string First { get; set; } //&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Michael      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Last { get; set; } //&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Hex      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Full { get; set; } //&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Michael Hex      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string LastCommaFirst { get; set; }//&amp;#160; Hex, Michael &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public override string ToString()     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return Full;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// Can be used to easily generate person name like &amp;quot;Michael Taylor&amp;quot;, &amp;quot;Lisa Smith&amp;quot; etc.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// All names are returned as a RandomPersonName object.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public class RandomPersonNameGenerator      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #region Name arrays      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //All these names (with slight modifications) retrieved from here:      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //&lt;/font&gt;&lt;a href="http://www.census.gov/genealogy/www/data/1990surnames/"&gt;&lt;font size="1" face="Courier New"&gt;http://www.census.gov/genealogy/www/data/1990surnames/&lt;/font&gt;&lt;/a&gt;    &lt;br /&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _firstNameMaleSet =new string[] {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;James&amp;quot;, &amp;quot;John&amp;quot;, &amp;quot;Robert&amp;quot;, &amp;quot;Michael&amp;quot;, &amp;quot;William&amp;quot;, &amp;quot;David&amp;quot;, &amp;quot;Richard&amp;quot;, &amp;quot;Charles&amp;quot;, &amp;quot;Joseph&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Thomas&amp;quot;, &amp;quot;Christopher&amp;quot;, &amp;quot;Daniel&amp;quot;, &amp;quot;Paul&amp;quot;, &amp;quot;Mark&amp;quot;, &amp;quot;Donald&amp;quot;, &amp;quot;George&amp;quot;, &amp;quot;Kenneth&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Steven&amp;quot;,&amp;#160; &amp;quot;Dirk&amp;quot;, &amp;quot;Brian&amp;quot;, &amp;quot;Ronald&amp;quot;, &amp;quot;Anthony&amp;quot;, &amp;quot;Kevin&amp;quot;, &amp;quot;Jason&amp;quot;, &amp;quot;Matthew&amp;quot;, &amp;quot;Gary&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Timothy&amp;quot;, &amp;quot;Jose&amp;quot;, &amp;quot;Larry&amp;quot;, &amp;quot;Jeffrey&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _firstNameMaleSetCount = _firstNameMaleSet.GetUpperBound(0)+1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _firstNameFemaleSet = new string[] {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Mary&amp;quot;, &amp;quot;Patricia&amp;quot;, &amp;quot;Linda&amp;quot;, &amp;quot;Barbara&amp;quot;, &amp;quot;Elizabeth&amp;quot;, &amp;quot;Jennifer&amp;quot;, &amp;quot;Maria&amp;quot;, &amp;quot;Susan&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Margaret&amp;quot;, &amp;quot;Melanie&amp;quot;, &amp;quot;Lisa&amp;quot;, &amp;quot;Nancy&amp;quot;, &amp;quot;Karen&amp;quot;, &amp;quot;Betty&amp;quot;, &amp;quot;Helen&amp;quot;, &amp;quot;Sandra&amp;quot;, &amp;quot;Donna&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Carol&amp;quot;, &amp;quot;Ruth&amp;quot;, &amp;quot;Sharon&amp;quot;, &amp;quot;Michelle&amp;quot;, &amp;quot;Laura&amp;quot;, &amp;quot;Sarah&amp;quot;, &amp;quot;Kimberly&amp;quot;, &amp;quot;Deborah&amp;quot;, &amp;quot;Jessica&amp;quot;,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Shirley&amp;quot;, &amp;quot;Cynthia&amp;quot;, &amp;quot;Angela&amp;quot;, &amp;quot;Melissa&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _firstNameFemaleSetCount = _firstNameFemaleSet.GetUpperBound(0)+1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly string[] _lastNameSet = new string[] {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Smith&amp;quot;, &amp;quot;Johnson&amp;quot;, &amp;quot;Williams&amp;quot;, &amp;quot;Jones&amp;quot;, &amp;quot;Brown&amp;quot;, &amp;quot;Davis&amp;quot;, &amp;quot;Miller&amp;quot;, &amp;quot;Wilson&amp;quot;, &amp;quot;Moore&amp;quot;,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Taylor&amp;quot;, &amp;quot;Anderson&amp;quot;, &amp;quot;Parker&amp;quot;, &amp;quot;Jackson&amp;quot;, &amp;quot;Norris&amp;quot;, &amp;quot;Harris&amp;quot;, &amp;quot;Hex&amp;quot;, &amp;quot;Thompson&amp;quot;,       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Garcia&amp;quot;, &amp;quot;Martinez&amp;quot;, &amp;quot;Robinson&amp;quot;, &amp;quot;Clark&amp;quot;, &amp;quot;Rodriguez&amp;quot;, &amp;quot;Lewis&amp;quot;, &amp;quot;Lee&amp;quot;, &amp;quot;Walker&amp;quot;, &amp;quot;Hall&amp;quot;,      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;Allen&amp;quot;, &amp;quot;Young&amp;quot;, &amp;quot;Hernandez&amp;quot;, &amp;quot;King&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; };      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; #endregion      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; static readonly int _lastNameSetCount = _lastNameSet.GetUpperBound(0)+1; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomPersonName GenerateOne(Random rndm)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValueMale = rndm.Next(0, _firstNameMaleSetCount);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValueFemale = rndm.Next(0, _firstNameFemaleSetCount);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int iRandomValueLastName = rndm.Next(0, _lastNameSetCount);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomPersonName rpn = new RandomPersonName(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpn.First = rndm.Next(0, 2) == 0 ? _firstNameMaleSet[iRandomValueMale] : _firstNameFemaleSet[iRandomValueFemale];     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpn.Last = _lastNameSet[iRandomValueLastName];      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpn.Full = rpn.First + &amp;quot; &amp;quot; + rpn.Last;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpn.LastCommaFirst = rpn.Last + &amp;quot;, &amp;quot; + rpn.First;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return rpn;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// Returns a list of RandomPersonName objects.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;Count&amp;quot;&amp;gt;Count of names that should be generated&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;returns&amp;gt;List of RandomPersonName objects&amp;lt;/returns&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public List&amp;lt;RandomPersonName&amp;gt; Generate(int Count)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; List&amp;lt;RandomPersonName&amp;gt; list = new List&amp;lt;RandomPersonName&amp;gt;();&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Random rndm = new Random(); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for (int i = 0; i &amp;lt; Count; i++ )     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; list.Add(GenerateOne(rndm));      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return list;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;summary&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// Returns a list of RandomPersonName objects (Static function)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;/summary&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;param name=&amp;quot;Count&amp;quot;&amp;gt;Count of names that should be generated&amp;lt;/param&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; /// &amp;lt;returns&amp;gt;List of RandomPersonName objects&amp;lt;/returns&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public static List&amp;lt;RandomPersonName&amp;gt; StaticGenerate(int Count)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; RandomPersonNameGenerator rpng = new RandomPersonNameGenerator();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return rpng.Generate(Count);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="1" face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3796951065138584189?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3796951065138584189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3796951065138584189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3796951065138584189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3796951065138584189'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/08/generator-for-random-person-names.html' title='A generator for random person names'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_V1tbWNn9eRE/TH01TqKxW7I/AAAAAAAAAbc/GXRxYYHJCKE/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3579754581176744045</id><published>2010-08-26T10:24:00.001-07:00</published><updated>2010-09-01T08:38:40.450-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Something is wrong with the version number</title><content type='html'>&lt;p&gt;Maybe we could agree that it wasn’t a version number at all?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_V1tbWNn9eRE/THajOjZEi6I/AAAAAAAAAbQ/HMqvp_h-px0/s1600-h/version%5B8%5D.jpg"&gt;&lt;img style="border: 0px none; display: inline;" title="version" alt="version" src="http://lh5.ggpht.com/_V1tbWNn9eRE/THajPM8KC7I/AAAAAAAAAbU/Dvd3_RBoA1g/version_thumb%5B4%5D.jpg?imgmax=800" border="0" height="143" width="534" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3579754581176744045?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3579754581176744045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3579754581176744045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3579754581176744045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3579754581176744045'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/08/something-is-wrong-with-version-number.html' title='Something is wrong with the version number'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_V1tbWNn9eRE/THajPM8KC7I/AAAAAAAAAbU/Dvd3_RBoA1g/s72-c/version_thumb%5B4%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5621168364625434049</id><published>2010-08-20T10:09:00.001-07:00</published><updated>2010-08-20T10:09:45.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Error starting Error Reporting</title><content type='html'>&lt;p&gt;Keep on trying Windows, one day you will succeed…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_V1tbWNn9eRE/TG621rg6gqI/AAAAAAAAAbI/tIfUb4mJMLk/s1600-h/Error%20while%20using%20error%20reporting%5B4%5D.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Error while using error reporting" border="0" alt="Error while using error reporting" src="http://lh3.ggpht.com/_V1tbWNn9eRE/TG622Mxk8NI/AAAAAAAAAbM/UqoaYfUaPww/Error%20while%20using%20error%20reporting_thumb%5B2%5D.jpg?imgmax=800" width="534" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5621168364625434049?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5621168364625434049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5621168364625434049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5621168364625434049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5621168364625434049'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/08/error-starting-error-reporting.html' title='Error starting Error Reporting'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/TG622Mxk8NI/AAAAAAAAAbM/UqoaYfUaPww/s72-c/Error%20while%20using%20error%20reporting_thumb%5B2%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-906976177707210850</id><published>2010-08-11T08:58:00.001-07:00</published><updated>2011-11-01T08:23:15.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Update or install Flash Player without DLM</title><content type='html'>&lt;p&gt;As Adobe has released a new version of Flash Player today, I thought I should share how you can update or install Flash Player without using Adobe Download Manager (DLM).&lt;/p&gt;  &lt;p&gt;Simply use the link for the browser you want to update below. You can also bookmark them as they will always return the current version. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;[Update: Links have changed with Flash Player 11 – Thanks to &lt;/em&gt;&lt;a href="http://www.blogger.com/profile/02900836041638807955"&gt;&lt;em&gt;Explorer&lt;/em&gt;&lt;/a&gt;&lt;em&gt;] &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;For Internet Explorer:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;32 bit (x86):   &lt;br /&gt;&lt;a href="http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax_32bit.exe"&gt;http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax_32bit.exe&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;64 bit (x64):   &lt;br /&gt;&lt;a href="http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax_64bit.exe"&gt;http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax_64bit.exe&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;For any other browser (Firefox etc.)&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;32 bit (x86):   &lt;br /&gt;&lt;a href="http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_32bit.exe"&gt;http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_32bit.exe&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;64 bit (x64):   &lt;br /&gt;&lt;a href="http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_64bit.exe"&gt;http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_64bit.exe&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;To test if the installation was successful and if you have the updated version, go to this page:     &lt;br /&gt;&lt;a href="http://www.adobe.com/software/flash/about/"&gt;http://www.adobe.com/software/flash/about/&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-906976177707210850?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/906976177707210850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=906976177707210850' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/906976177707210850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/906976177707210850'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/08/update-or-install-flash-player-without.html' title='Update or install Flash Player without DLM'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3819146652957467205</id><published>2010-08-04T12:44:00.001-07:00</published><updated>2010-08-04T12:50:12.493-07:00</updated><title type='text'>My rambling thoughts about smartphones</title><content type='html'>&lt;p&gt;&lt;em&gt;To be honest, this post was on my disk for nearly two months now. I have changed it often, but still I think it’s not complete. Anyhow, I doubt that will get any better so I’m publishing it. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;As my current phone, a Samsung i780, is rather old I started to search for a replacement. I looked at the currently available phones both from a customer perspective as well as from developer view -mobile app development is still a very hot topic. &lt;/p&gt;  &lt;p&gt;After all, it came down to the “big three”: Apple iPhone, Google Android and BlackBerry. As an extra, I also checked Windows Phone 7.&lt;/p&gt;  &lt;p&gt;I didn’t know BlackBerry quite well but fortunately I have one here as a current client insisted that I use it while working on the project. This was the easiest decision of all: Looking at all the features it’s clear to me that BlackBerry is developed for big enterprises, not the normal customer. For app development, each paid application you submit will cost you 200$ (with 10 updates free). Once you have submitted 10 updates, &lt;a href="http://na.blackberry.com/eng/developers/appworld/faq.jsp"&gt;you need to pay 200$ again&lt;/a&gt;. No, not the phone I was looking for.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;For the &lt;strong&gt;Apple iPhone&lt;/strong&gt; I think you can name it “Best phone with best vendor lock-in”. Without any doubt, the iPhone 4 has the best display money can buy, fits exactly in your hand, runs quite a long time on batteries and iOS is definitely mature. On top, you get the best filled app store around. So this should be a no-brainer, right? No. &lt;/p&gt;  &lt;p&gt;Because if you move a little ahead, you end up being limited to what Steve Jobs thinks is good for you. This starts when you want to buy it: You can only get with a mobile phone contract from one vendor. Even if you sign this contract, you can’t simply exchange the SIM card as it has a SIM lock. And this is just the start: Replaceable batteries? No. SD card slot? No. Apps outside the app store? No. Developing apps with something else than Apples C/C++/Objective-C? No. Using cross compilers? No. Tethering out of the box? No. And so on. &lt;/p&gt;  &lt;p&gt;There is actually good reason for Apple to behave like this: Profit (of course) and &lt;a href="http://daringfireball.net/2010/04/why_apple_changed_section_331"&gt;control of the platform&lt;/a&gt;. Although the iPhone Developer program is rather cheap with 99$, it isn’t what I was looking for. No Steve, I don’t obey. Please keep your &lt;strike&gt;iNo&lt;/strike&gt; iPhone.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Moving over to &lt;strong&gt;Windows Phone 7&lt;/strong&gt;: When the read the first report about Microsoft developing a new “iPhone rival” I have to admit I was really think that this will be my new phone. I really thought they will simply take the pieces Apple did right, remove all the stupid parts (all those “NO” entries above) and add some extra features. &lt;/p&gt;  &lt;p&gt;After all, Microsoft should has all needed technologies at hand: Multi Touch (Surface), a great runtime with a sandbox (.NET Framework), a very good graphics engine (DirectX), a nice UI (XAML/Silverlight) and by the way: they are producing operating systems as well. &lt;/p&gt;  &lt;p&gt;Well, these were my first thoughts but as now more and more details emerge, I’ve learned that Microsoft has &lt;strong&gt;completely &lt;/strong&gt;copied the Apple way including all the great fails. &lt;/p&gt;  &lt;p&gt;To start with that you can’t install apps outside the marketplace, that you have no access to an SD card (only for “extending the internal memory”, not for you to simply exchange data) and so on. Although there are some hardware partners, they are not allowed to extend the phone (e.g. HTC Sense or Samsung TouchWiz). If all hardware is basically the same, why should any vendor build a phone then? Remember, a lot of people buy an HTC device &lt;strong&gt;because of&lt;/strong&gt; Sense. &lt;/p&gt;  &lt;p&gt;No doubt that Microsoft has currently the most advanced combination of a good runtime (.NET/Silverlight etc.) with a very good development tool (Visual Studio) but with all these Apple fails build in? Nope. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enter &lt;strong&gt;Google Android&lt;/strong&gt;: An open-source smartphone OS released under an Apache license. As the licensing cost for the OS are nearly zero (OS is free, but some Google apps will cost the manufacturer something) it’s now wonder they are dozens of phones available. There is no form factor that isn’t available. &lt;/p&gt;  &lt;p&gt;The app store is the second biggest in the world (70k vs. Apple’s 200k) but you are free to install applications outside the store. Heck, you can even create native applications and call them from your “normal” apps. Replaceable batteries, using any carrier, OS “enhancements”, tethering, cross compilers or SD card access? Yes, you can.&lt;/p&gt;  &lt;p&gt;So this is happy land, right? Nope. Android isn’t mature so far. Everywhere you will come across little quirks and major bugs. &lt;/p&gt;  &lt;p&gt;For example, there is no build-in setting to simple turn off mobile data in the night or after a given period of inactivity (There’s an app for that). The build-in calendar sometimes goes havoc if you change the synchronized accounts (need a “Clear Cache”) and can’t handle time zones. The music player can’t read MP3 tags correctly nor handle genres at all. Choosing a date using the build-in controls does not show you a calendar. A lot of apps are poorly written and will drain your battery in no time. And so on. &lt;/p&gt;  &lt;p&gt;But from my point of view, the advantages of Android out weight the failures: I ordered a Samsung Galaxy S (I9000). &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Final note:&lt;/strong&gt; Why I always want the “Install apps outside the store” feature?&lt;/p&gt;  &lt;p&gt;Because any review process is broken by design. For an example, &lt;a href="http://gizmodo.com/5603174/"&gt;read this&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;And if you still believe that “Reviewing” an app is a good way to prevent “bad” apps, &lt;a href="http://gizmodo.com/5592521/"&gt;see this&lt;/a&gt;. When this was not noticed during the &lt;strike&gt;censorship&lt;/strike&gt; review process, what else “under the hood” functions might exist in other apps? &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3819146652957467205?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3819146652957467205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3819146652957467205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3819146652957467205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3819146652957467205'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/08/my-rambling-thoughts-about-smartphones.html' title='My rambling thoughts about smartphones'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5679621848496799436</id><published>2010-07-27T11:20:00.001-07:00</published><updated>2010-07-27T11:20:00.424-07:00</updated><title type='text'>Some posts are missing here…</title><content type='html'>&lt;p&gt;Sorry for the lack of updates in the last time, but the shutdown of &lt;a href="http://www.x-setup.net/"&gt;X-Setup&lt;/a&gt; (and everything that has happened because of it) hit more than I first thought…&lt;/p&gt;  &lt;p&gt;Anyway, I should be back on track now so expect normal updates in the future again.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5679621848496799436?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5679621848496799436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5679621848496799436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5679621848496799436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5679621848496799436'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/07/some-posts-are-missing-here.html' title='Some posts are missing here…'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6296156537993898577</id><published>2010-04-07T09:34:00.000-07:00</published><updated>2010-04-08T02:44:04.141-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Java 1.6 Update 19 failed with Error 266</title><content type='html'>Just tried to install Java 1.6 Update 19 on a corporate Windows 7 Enterprise Machine and the installation failed with the following message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Data1.cab has an invalid digital signature (Error 266 returned by WinVerifyTrust)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To cut a long story short: The problem was that the file couldn’t be verified because it was signed with a new certificate by Sun. This new certificate depends on a new VeriSign certificate (Root Authority Certificate) that is by default not included in Windows 7.&lt;br /&gt;&lt;br /&gt;Normally Windows updated its list of Root Certificates automatically, but this does not work in this environment since all Internet Connections are blocked.&lt;br /&gt;&lt;br /&gt;The solution is rather simple: Download the update file manually from&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/rootsupd.exe"&gt;http://download.windowsupdate.com/msdownload/update/v3/static/trustedr/en/rootsupd.exe &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and install this file with the “/Q” switch (no reboot required).&lt;br /&gt;&lt;br /&gt;Now Windows has a current set of Root Certificates and the installation of Java will work.&lt;br /&gt;&lt;br /&gt;For some more information, see Microsoft &lt;a href="http://support.microsoft.com/kb/931125"&gt;KB931125&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6296156537993898577?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6296156537993898577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6296156537993898577' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6296156537993898577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6296156537993898577'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/04/java-16-update-19-failed-with-error-266.html' title='Java 1.6 Update 19 failed with Error 266'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-442907759269549347</id><published>2010-03-18T02:41:00.000-07:00</published><updated>2010-04-08T02:43:25.062-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Deleting printers from the command line</title><content type='html'>To quickly and silently delete a printer using a command line, use the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;rundll32 printui.dll,PrintUIEntry /dl /n "NAME_OF_PRINTER" /q&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This command will silently delete the printer and not issue any messages to the user (/q switch).&lt;br /&gt;&lt;br /&gt;There is much more you can do with this command, just enter the following to see the list of supported options:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;rundll32 printui.dll,PrintUIEntry /?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-442907759269549347?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/442907759269549347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=442907759269549347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/442907759269549347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/442907759269549347'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/03/deleting-printers-from-command-line.html' title='Deleting printers from the command line'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2656568341344371603</id><published>2010-02-13T08:50:00.001-08:00</published><updated>2010-08-20T10:05:25.853-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Easy SQL Server Backup Tool</title><content type='html'>&lt;p&gt;Although we are using a “normal” SQL Server, we have also a lot of SQL Server Express running. Mostly these are database were a daily backup is more than enough, for example for Windows Update Services.&lt;/p&gt;  &lt;p&gt;So far, we are using customs scripts for each server to backup them, but I wanted a different and more easier way to do it. Once it is set up, all you need to do to backup a new database on the server is to copy a batch file and rename it. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;First, create a folder on the server you want to backup, e.g. “C:\SQLServBkp”. Give “NETWORK-SERVICE” write access to this folder. Since SQL Server will do the backup for us, we need to make sure that the account has access to create the backup file.&lt;/p&gt;  &lt;p&gt;Secondly, make sure that you have the SQL Server Tools installed since we will use &lt;em&gt;SQLCMD.exe&lt;/em&gt;. In case you have only the database installed, you can easily download and install the &lt;a href="http://www.microsoft.com/express/Database/default.aspx#Installation_Options"&gt;SQL Server Management Tools&lt;/a&gt;. And it’s no problem to use the 2008 version even if your SQL Server Express is only 2005. &lt;/p&gt;  &lt;p&gt;Next, create a batch file named &lt;em&gt;C:\SQLServBkp\_SQLBackupWorker.bat&lt;/em&gt; with the following contents:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;SET SQLCMD_Path=C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE    &lt;br /&gt;SET SQLServerInstance=.\sqlexpress &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;"%SQLCMD_Path%" -S %SQLServerInstance% -E -e -v db=%1 -v bakfile="%~dp0%1_Backup.bak" -i"%~dp0_SQLBackupWorker.sql"&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;Please note: The last line is ONE single line.&lt;/p&gt;  &lt;p&gt;The variable &lt;em&gt;SQLCMD_Path&lt;/em&gt; points to SQLCMD.exe, the path that is used here is for the default SQL Server 2008 installation. &lt;/p&gt;  &lt;p&gt;The variable &lt;em&gt;SQLServerInstance&lt;/em&gt; is the instance of the SQL Server you want to backup; the default is “.\sqlexpress”. In case you want to backup the Windows Internal Database (for example WSUS) you need to write “\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query”. Strange syntax, but it works.&lt;/p&gt;  &lt;p&gt;Now we need a file that issues the backup command to the SQL Server, name it &lt;em&gt;C:\SQLServBkp\_SQLBackupWorker.sql&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;-- SQLBackupWorker.sql START    &lt;br /&gt;PRINT 'Running on server ' +  @@ServerName     &lt;br /&gt;PRINT 'Backing up database [$(db)] to file [$(bakfile)]'     &lt;br /&gt;BACKUP DATABASE $(db) TO DISK = '$(bakfile)' WITH INIT     &lt;br /&gt;-- SQLBackupWorker.sql END&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Finally, simply create one batch file that is named exactly as the database you wish to backup. For example, if you want to backup the database “WhatsUp”, name the file &lt;em&gt;C:\SQLServBkp\WhatsUp.bat&lt;/em&gt; and put the following contents in (one line): &lt;/p&gt;  &lt;p&gt;&lt;em&gt;call "%~dp0_SQLBackupWorker.bat" %~n0 &amp;gt;"%~dpn0.log"&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;If you want to backup a second databse, e.g. “NetFlow”, you simply create a file name &lt;em&gt;C:\SQLServBkp\NetFlow.bat&lt;/em&gt; and put the exact same contents in as above. &lt;/p&gt;  &lt;p&gt;The trick is quite simple: The batch will extract its own name and pass it over to &lt;em&gt;_SQLBackupWorker.bat&lt;/em&gt;. This will in turn use it as a name for the backup file and passes it over to &lt;em&gt;_SQLBackupWorker.sql&lt;/em&gt; which caries out the backup. &lt;/p&gt;  &lt;p&gt;Once this is all set up, give it a try and execute one of the batch files, e.g. &lt;em&gt;WhatsUp.bat&lt;/em&gt;. A log file (WhatsUp.log) is automatically created and you can review it. If it seems that nothing is working, check the instance name and make sure that NETWORK-SERVICE has write access to the folder you have created. &lt;/p&gt;  &lt;p&gt;You can simply schedule any of the batches with Task Scheduler so they run on a regular basis. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2656568341344371603?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2656568341344371603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2656568341344371603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2656568341344371603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2656568341344371603'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2010/02/easy-sql-server-backup-tool.html' title='Easy SQL Server Backup Tool'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3856159590891705933</id><published>2009-12-28T05:38:00.001-08:00</published><updated>2010-08-20T10:04:34.716-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Error'/><title type='text'>No AC Power = 100% CPU</title><content type='html'>&lt;p&gt;I just had a funny problem with a HP Notebook, running Windows 7. I usually don’t shut it down but use either &lt;a href="http://www.mydigitallife.info/2007/10/29/what-is-hybrid-sleep-and-differences-with-basic-sleep-mode-in-vista/"&gt;Hybrid Sleep&lt;/a&gt; (Hibernate + Sleep) or use hibernation directly.&lt;/p&gt;  &lt;p&gt;So as ever, I waked the laptop up, waited until it is ready and unplugged it from the AC power. Suddenly one CPU was completely busy. I had no programs open so I was wondering what was going on here. As soon as I plugged it in, the CPU load disappeared. Unplugged it, and one CPU was busy again.&lt;/p&gt;  &lt;p&gt;Trying to figure out what was going on here, I started Resource Monitor and I observed this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_V1tbWNn9eRE/Szi0xwLgnrI/AAAAAAAAAaE/9CbRkfdI3VY/s1600-h/system_irqs%5B4%5D.png"&gt;&lt;img style="border-width: 0px; display: inline;" title="system_irqs" alt="system_irqs" src="http://lh3.ggpht.com/_V1tbWNn9eRE/Szi0yopYISI/AAAAAAAAAaI/oVfYeZxthEo/system_irqs_thumb%5B2%5D.png?imgmax=800" border="0" height="322" width="549" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;“System Interrupts“ was eating all the CPU time. When I plugged the laptop back again, all was fine and system interrupts was about 1%. Unplugged, 50% again.&lt;/p&gt;  &lt;p&gt;I had no idea what could be the cause of this but and idea: I know that sometimes network cards do not like to be sent to sleep and via versa all the time. A friend of mine has a DELL notebook where the network breaks down after the system has a uptime of about two days (he sent the laptop to sleep as I do, so the system is basically always on). &lt;/p&gt;  &lt;p&gt;So I started the "&lt;em&gt;Network and Sharing Center&lt;/em&gt;, clicked on &lt;em&gt;Change Adapter Settings &lt;/em&gt;and disabled the network connection. And the CPU dropped to 1-2%. Enabled it but this time the CPU did not reacted and didn’t go up again. &lt;/p&gt;  &lt;p&gt;I plugged the laptop in again, unplugged it but no problems this time. I really seems that sometimes when the laptop is running from battery power the drivers goes nuts and crashes causing the CPU load. By disabling and enabling it again, the drivers starts fresh and everything is fine again. I also checked the driver but neither Intel nor Microsoft had a newer one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3856159590891705933?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3856159590891705933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3856159590891705933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3856159590891705933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3856159590891705933'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/12/no-ac-power-100-cpu.html' title='No AC Power = 100% CPU'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/Szi0yopYISI/AAAAAAAAAaI/oVfYeZxthEo/s72-c/system_irqs_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6510077903092648118</id><published>2009-10-17T07:27:00.001-07:00</published><updated>2010-08-20T10:05:32.276-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Windows 7 shared desktop and start menu folders</title><content type='html'>&lt;p&gt;Although we will switch ASAP from Windows XP to Windows 7, we still have a lot of clients running XP and I think it will takes us up to two years to finally switch the last machine.&lt;/p&gt;  &lt;p&gt;One of the problems in the automatic jobs we are using is that Windows 7 has new paths for both the shared desktop and the shared start menu. &lt;/p&gt;  &lt;p&gt;As an easy solution for this, we are now using this batch script. It will save the correct path to the two variables DESKTOP_FOLDER and STARTMENU_FOLDER and the real job simply uses them. That way, the scripts works on either XP or Win7. &lt;/p&gt;  &lt;p&gt;I know there is a symbolic link “Startmenu” inside \ProgramData in Win7 but some programs refuse to with the link. That’s why I’m using the “real” path here. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;IF "%PUBLIC%"=="" GOTO NO_PUBLIC   &lt;br /&gt;GOTO PUBLIC_FOUND&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:NO_PUBLIC   &lt;br /&gt;Rem PUBLIC env var not here, assuming XP    &lt;br /&gt;SET DESKTOP_FOLDER=%ALLUSERSPROFILE%\Desktop    &lt;br /&gt;SET STARTMENU_FOLDER=%ALLUSERSPROFILE%\Startmenu    &lt;br /&gt;GOTO EXEC&lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;br /&gt;&lt;em&gt;:PUBLIC_FOUND   &lt;br /&gt;Rem Public Variable found    &lt;br /&gt;SET DESKTOP_FOLDER=%PUBLIC%\Desktop    &lt;br /&gt;SET STARTMENU_FOLDER=%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu    &lt;br /&gt;GOTO EXEC&lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;br /&gt;&lt;em&gt;:EXEC   &lt;br /&gt;echo EXEC!    &lt;br /&gt;echo Desktop folder is %DESKTOP_FOLDER%    &lt;br /&gt;echo Start menu folder is %STARTMENU_FOLDER%&lt;/em&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6510077903092648118?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6510077903092648118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6510077903092648118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6510077903092648118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6510077903092648118'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/10/windows-7-shared-desktop-and-start-menu.html' title='Windows 7 shared desktop and start menu folders'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7776286073366435160</id><published>2009-10-07T12:34:00.001-07:00</published><updated>2010-12-15T12:39:36.282-08:00</updated><title type='text'>Installing Windows 7 drivers from the command line</title><content type='html'>&lt;p&gt;If a Windows 7 PC with “unknown” (aka Driver missing) will simply connect to Windows Update, check if a matching driver is found and install it. This works fine when using this at home, but it does not work if you are inside a corporate network. &lt;/p&gt;  &lt;p&gt;In this case, a &lt;a href="http://technet.microsoft.com/en-us/wsus/default.aspx"&gt;Windows Server Update Services (WSUS)&lt;/a&gt; is used and it does not contain any drivers. Therefore, you need to manually download the drivers you need, put them in a folder and then use &lt;a href="http://msdn.microsoft.com/en-us/library/ms790806.aspx"&gt;DPinst.exe&lt;/a&gt; to install the drivers.&lt;/p&gt;  &lt;p&gt;To get this tool, you need to download &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2105564e-1a9a-4bf4-8d74-ec5b52da3d00&amp;amp;displaylang=en"&gt;Windows Driver Kit Version 7.0.0&lt;/a&gt; – a hefty 610 MB download! Burn the ISO image to a CD or open it with WinRAR, and start the setup. Inside the setup, you only need to select “Tools”. &lt;/p&gt;  &lt;p&gt;Once the Installation is finished, you can copy dpinst.exe from the &lt;em&gt;\redist\DIFx\dpinst\MultiLin&lt;/em&gt; folder:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SsztSBuy4gI/AAAAAAAAAZs/uO04dtqOfJ0/image%5B8%5D.png?imgmax=800" width="346" height="116" /&gt; &lt;/p&gt;          &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Each folder contains a version of DPInst.exe for the architecture the folder is named. I decided to simply rename each version of DPInst.exe and append the architecture to it, so I can copy all version to the same folder.&lt;/p&gt;  &lt;p&gt;Create a folder on a network drive, e.g. &lt;em&gt;W7_OnlineDrivers_1&lt;/em&gt; and copy the renamed DPInst.exe files to it. My folder currently looks like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh4.ggpht.com/_V1tbWNn9eRE/SsztS9GgirI/AAAAAAAAAZw/VpmSZOQ3EGA/image%5B12%5D.png?imgmax=800" width="336" height="161" /&gt; &lt;/p&gt;            &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What DPInst.exe needs, is &lt;em&gt;DPinst.xml&lt;/em&gt; with several settings it (you could also specify them on the command line, but I liked the XML idea more). &lt;/p&gt;  &lt;p&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;   &lt;br /&gt;&amp;lt;dpinst&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;lt;search&amp;gt;   &lt;br /&gt;&amp;lt;subDirectory&amp;gt;*&amp;lt;/subDirectory&amp;gt;     &lt;br /&gt;&amp;lt;/search&amp;gt;     &lt;br /&gt;&amp;lt;enableNotListedLanguages/&amp;gt;     &lt;br /&gt;&amp;lt;suppressEulaPage/&amp;gt;     &lt;br /&gt;&amp;lt;quietInstall/&amp;gt;     &lt;br /&gt;    &lt;br /&gt;&amp;lt;!-- Only install drivers for online hardware --&amp;gt;     &lt;br /&gt;&amp;lt;scanHardware/&amp;gt;     &lt;br /&gt;    &lt;br /&gt;&amp;lt;!-- No driver signature required --&amp;gt;     &lt;br /&gt;&amp;lt;legacyMode/&amp;gt; &lt;/p&gt;  &lt;p&gt;&amp;lt;/dpinst&amp;gt;&lt;/p&gt;  &lt;p&gt;Most settings should be easy to understand, the complete reference can be found on &lt;a href="http://msdn.microsoft.com/en-us/library/ms791067.aspx"&gt;this MSDN page&lt;/a&gt;. However, the &lt;em&gt;scanHardware&lt;/em&gt; needs some explanation. &lt;/p&gt;  &lt;p&gt;If this switch is found inside the file, DPInst.exe will only install drivers that are currently connected to the computer. All other drivers are not installed. &lt;/p&gt;  &lt;p&gt;That’s the reason why I called the folder &lt;em&gt;W7_OnlineDrivers&lt;/em&gt;. Since it will install only drives that are actually needed on the system, this folder can contain dozens of drivers – drivers that aren't needed will not be installed.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;If &lt;em&gt;scanHardware&lt;/em&gt; is NOT defined, DPInst.exe will install all drivers, regardless if a device is visible or not. This is basically the same as using &lt;em&gt;pnputil.exe –a C:\&amp;lt;path&amp;gt;\*.inf&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Finally, we need a batch file to start DPInst.exe. I used the following in &lt;em&gt;_install.bat&lt;/em&gt; for this:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;quot;%~dp0dpinst_x86.exe&amp;quot; /c      &lt;br /&gt;pause&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The /c parameter simply indicates that all output should go to the console instead of a log file. That way, you can easily see what is going on. As soon as I have a x64 Test machine ready, I will expand the batch file a little bit so it will execute &lt;span style="font-style: italic"&gt;dpinst_x64.exe&lt;/span&gt; on a 64 bit machine and &lt;span style="font-style: italic"&gt;dpinst_x86.exe&lt;/span&gt; on a 32 bit machine. For now I stick with the 32 bit version.&lt;/p&gt;  &lt;p&gt;Once this is all setup, we are ready to install our first driver. The test computer I currently use had all drivers installed automatically, except for the sound card:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SsztTCK2XCI/AAAAAAAAAZ0/vs9P4KflnOI/image%5B3%5D.png?imgmax=800" width="316" height="146" /&gt;&lt;/p&gt;            &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Right click the entry with the yellow exclamation mark and go to the “Details” tab. Inside this, select “Hardware-IDs”. These will list all PCI IDs for the device. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh5.ggpht.com/_V1tbWNn9eRE/SsztTgjS85I/AAAAAAAAAZ4/jwNrNRj1-R0/image%5B16%5D.png?imgmax=800" width="359" height="232" /&gt;&lt;/p&gt;                              &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In this case, VEN_8086 and DEV_2445 should be enough to identify the device, so we will now search Windows Update for a driver:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://catalog.update.microsoft.com/v7/site/Search.aspx?q=ven_8086%26dev_2445"&gt;http://catalog.update.microsoft.com/v7/site/Search.aspx?q=ven_8086%26dev_2445&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please note that this site is using an ActiveX control and therefore you will have to use Internet Explorer. The results of this query should look something like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SsztUFWxn2I/AAAAAAAAAZ8/HWlgy-3BbIw/image%5B21%5D.png?imgmax=800" width="593" height="218" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note: Normally you should be able to pick any driver and use it, however the first one I picked (Realtek) contained a file WITHOUT a digital signature and thus DPInst.exe exited with error code 80010300. So, if there is a Microsoft driver available, use it. They always work. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Simply click on the &lt;em&gt;Add &lt;/em&gt;button of the driver you are interested in, click on &lt;span style="font-style: italic"&gt;View Basket&lt;/span&gt; and download the package, a *.CAB file.&lt;/p&gt;  &lt;p&gt;Open the CAB file (with WinRAR for example) and expand all files in it to a new folder inside the &lt;em&gt;W7_OnlineDrivers_1&lt;/em&gt; folder.&lt;/p&gt;  &lt;p&gt;Now you can give it a try and execute &lt;em&gt;_Install.bat&lt;/em&gt;. If everything has been done right, Windows will install the driver for the sound card and activate it automatically. If not, check the output for any errors.&lt;/p&gt;  &lt;p&gt;As a final note: If you download a new driver, just remove the folder containing the old one and execute DPInst.exe again. DPInst.exe will not just install new drivers, it also updates drivers. That’s a great way to keep the drivers current without any extra hassle. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE 2010-12-15&lt;/strong&gt;: See &lt;a href="http://texhex.blogspot.com/2010/12/why-dpinst-sometimes-chooses-wrong.html"&gt;this post&lt;/a&gt; why DPInst sometimes (especially with Network cards) chooses the wrong driver. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7776286073366435160?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7776286073366435160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7776286073366435160' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7776286073366435160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7776286073366435160'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/10/installing-windows-7-drivers-from.html' title='Installing Windows 7 drivers from the command line'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/SsztSBuy4gI/AAAAAAAAAZs/uO04dtqOfJ0/s72-c/image%5B8%5D.png?imgmax=800' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6814918716036457973</id><published>2009-10-07T11:36:00.001-07:00</published><updated>2009-10-07T11:36:21.493-07:00</updated><title type='text'>Installing and configuring language packs and settings from the command line in Windows 7</title><content type='html'>&lt;p&gt;The current rollout I’m working on is based on a complete unchanged image from the Windows 7 DVD and several scripts that are running once Windows is installed. &lt;/p&gt;  &lt;p&gt;We have done this to make sure that we are always able to update existing installations. That’s simply because it forces us to find the correct commands when Windows is already installed and not working on a WIM image. &lt;/p&gt;  &lt;p&gt;One of these things was to install one or more language packs and then reconfigure Windows so it uses a new language (this needs to be done on the command line and not manually of course).&lt;/p&gt;  &lt;p&gt;For this, you first need to get the language packs you want to install. Since we are using the Enterprise version of Windows 7, this was easy since there is a separate DVD (&lt;u&gt;&lt;em&gt;mu_windows_7_language_pack_x86_dvd_X15-73272.iso&lt;/em&gt;&lt;/u&gt;) which contains all language packs. &lt;/p&gt;  &lt;p&gt;I simply copied the folders we want to install (de-DE, fr-FR and es-ES) from the DVD to a share. The directory structure then looked like this: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;\\swdepot\Win7\LP\de-DE\lp.cab      &lt;br /&gt;\\swdepot\Win7\LP\fr-FR\lp.cab       &lt;br /&gt;\\swdepot\Win7\LP\es-ES\lp.cab&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;To install, simple use the &lt;a href="http://technet.microsoft.com/en-us/library/cc766010%28WS.10%29.aspx"&gt;lpksetup.exe utility&lt;/a&gt; which is included in Windows 7. Executing it with this command: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;lpksetup.exe /i * /r /s /p \\swdepot\Win7\LP\&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;This will install all language packs inside the folder “\LP”. &lt;/p&gt;  &lt;p&gt;In order to switch the language, we are using XML files that we basically designed for Vista but still work with Windows 7 (call me lazy…). &lt;/p&gt;  &lt;p&gt;To set everything a German user expect (Formats, Location, Language etc.) and to apply the same settings to any new user that logs on, we use the following XML file:&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;em&gt;&amp;lt;gs:GlobalizationServices xmlns:gs=&amp;quot;urn:longhornGlobalizationUnattend&amp;quot;&amp;gt;      &lt;br /&gt;&amp;lt;!--User List--&amp;gt;       &lt;br /&gt;&amp;lt;gs:UserList&amp;gt;       &lt;br /&gt;&amp;lt;gs:User UserID=&amp;quot;Current&amp;quot; CopySettingsToDefaultUserAcct=&amp;quot;true&amp;quot; CopySettingsToSystemAcct=&amp;quot;true&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;lt;/gs:UserList&amp;gt;       &lt;br /&gt;&amp;lt;!--User Locale--&amp;gt;       &lt;br /&gt;&amp;lt;gs:UserLocale&amp;gt;       &lt;br /&gt;&amp;lt;gs:Locale Name=&amp;quot;de-DE&amp;quot; ResetAllSettings=&amp;quot;true&amp;quot; SetAsCurrent=&amp;quot;true&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;lt;/gs:UserLocale&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;!--Display Language--&amp;gt;      &lt;br /&gt;&amp;lt;gs:MUILanguagePreferences&amp;gt;       &lt;br /&gt;&amp;lt;gs:MUILanguage Value=&amp;quot;de-DE&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;lt;gs:MUIFallback Value=&amp;quot;en-US&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;lt;/gs:MUILanguagePreferences&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;!--location--&amp;gt;      &lt;br /&gt;&amp;lt;!-- 0xF4 United States = 244 --&amp;gt;       &lt;br /&gt;&amp;lt;!-- 0x5E Germany = 94 --&amp;gt;       &lt;br /&gt;&amp;lt;gs:LocationPreferences&amp;gt;       &lt;br /&gt;&amp;lt;gs:GeoID Value=&amp;quot;94&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;lt;/gs:LocationPreferences&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;lt;/gs:GlobalizationServices&amp;gt; &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Most of the settings inside this&lt;/em&gt; file should be pretty self-explanatory, but here the link to the detailed explanation: &lt;a href="http://www.microsoft.com/globaldev/vista/vista_tools/vista_command_line_international_configuration.mspx"&gt;http://www.microsoft.com/globaldev/vista/vista_tools/vista_command_line_international_configuration.mspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;The only “odd” setting inside this file is the “GeoID”. You need to retrieve the matching ID from this page: &lt;a href="http://msdn.microsoft.com/en-us/library/ms912389%28WinEmbedded.11%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms912389%28WinEmbedded.11%29.aspx&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;To execute this file use the following command line:     &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;control intl.cpl,, /f:\\swdepot\Win7\Intl_de-DE.xml&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To switch back to English, simply replace “de-DE” with “en-US”, set the GeoID to the correct value and apply the new XML file with the command above. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6814918716036457973?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6814918716036457973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6814918716036457973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6814918716036457973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6814918716036457973'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/10/installing-and-configuring-language.html' title='Installing and configuring language packs and settings from the command line in Windows 7'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2470990564812803560</id><published>2009-10-05T11:38:00.000-07:00</published><updated>2010-08-20T10:06:27.936-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Change Windows Features for Windows 7 / Windows Server 2008 from the command line</title><content type='html'>&lt;p&gt;In case you want to add or remove feature in Windows 7 or Windows Server 2008 (R2) from the command line, the utility DISM.exe is all you need.&lt;/p&gt;  &lt;p&gt;Normally it is used to service WIM images, but it can also execute on “Online” images which means the currently running Windows.&lt;/p&gt;  &lt;p&gt;To get a list of features your Windows supports and there state (Enabled or disabled) simply type:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /Online /Get-Features&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To save the output to a file, simply use redirection:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /Online /Get-Features &amp;gt;C:\Features.txt&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To enable (install) a feature use the /Enable-Feature command :&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /online /Enable-Feature /FeatureName:MicrosoftWindowsPowerShellISE&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;To disable (uninstall) it, use the /Disable-Feature command:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /online /Disable-Feature /FeatureName:MicrosoftWindowsPowerShellISE&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;You can enable or disable several features at once:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /online /Enable-Feature /FeatureName:WindowsServerBackup /FeatureName:WindowsServerBackupCommandlet&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;However, depending on which feature you change it can happen that one feature requires another so you usually end up having several DISM calls. &lt;/p&gt;  &lt;p&gt;In case you want to automate the process fully, add the “/Quiet” parameter but remember that this will restart your computer without any question when necessary:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /online /Quiet /Enable-Feature /FeatureName:WindowsServerBackup /FeatureName:WindowsServerBackupCommandlet&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Sometimes the names in the output of DISM are different from what you see inside the “Turn Windows feature on or off” (Windows 7) or “Add/Remove features” (Server 2008). For example, the IIS feature “Logging Tools” is called “IIS-LoggingLibraries” when using DISM.&lt;/p&gt;  &lt;p&gt;To find out how the feature you are searching for is named, simply export the current list of features with this command:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /Online /Get-Features &amp;gt;C:\Features_Before.txt&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Then turn the feature on manually and once the installation is completed, use the following command:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;DISM.EXE /Online /Get-Features &amp;gt;C:\Features_After.txt&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;A simply text compare on these two files will then show which feature has changed its state from “Disabled” to “Enabled”.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2470990564812803560?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2470990564812803560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2470990564812803560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2470990564812803560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2470990564812803560'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/10/change-windows-features-for-windows-7.html' title='Change Windows Features for Windows 7 / Windows Server 2008 from the command line'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6925861589547730554</id><published>2009-09-30T13:10:00.001-07:00</published><updated>2009-10-07T11:38:56.200-07:00</updated><title type='text'>Using Group Policy Preferences to configure Windows Explorer</title><content type='html'>&lt;p&gt;One of the great new features in Windows 7 are “Preferences”. This are files, folders, registry values etc. you can easily configure using an GPO to set values on the client.&lt;/p&gt;  &lt;p&gt;As these are called “Preferences” the purpose of it is to allow the the administrator to configure something but still allow the user to change it later on. When using an policy, the user can change anything.&lt;/p&gt;  &lt;p&gt;Preparing the Windows 7 rollout, I found that some settings inside the Windows Explorer should be changed, but I only wanted to change certain values, not the entire “Folder Options” (which is also possible).&lt;/p&gt;  &lt;p&gt;Here are the list of values I’m changing using the Registry preference on all of the Windows 7 machines (all these are user settings, so the root is always HKEY_CURRENT_USER):&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Folder Options -&amp;gt; Search -&amp;gt; Always search file names and contents (ON)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Path: &lt;em&gt;Software\Microsoft\Windows\CurrentVersion\Explorer\Search\PrimaryProperties\UnindexedLocations      &lt;br /&gt;&lt;/em&gt;Name: &lt;em&gt;SearchOnly &lt;/em&gt;(REG_DWORD)     &lt;br /&gt;Value: &lt;em&gt;0&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Folder Options -&amp;gt; Search -&amp;gt; How to search -&amp;gt; Don't use the index when search in file folder for system files (ON)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Path: &lt;em&gt;Software\Microsoft\Windows\CurrentVersion\Explorer\Search\Preferences      &lt;br /&gt;&lt;/em&gt;Name: &lt;em&gt;WholeFileSystem&lt;/em&gt; (REG_DWORD)     &lt;br /&gt;Value: &lt;em&gt;1&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Folder Options -&amp;gt; View -&amp;gt; Hide extensions for known file types (OFF)&lt;/strong&gt;&lt;/p&gt; Path: &lt;em&gt;Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced    &lt;br /&gt;&lt;/em&gt;Name: &lt;em&gt;HideFileExt &lt;/em&gt;(REG_DWORD)   &lt;br /&gt;Value: &lt;em&gt;0&lt;/em&gt;   &lt;p&gt;&lt;strong&gt;Folder Options -&amp;gt; Navigation Pane -&amp;gt; Show all folders (ON) &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Path: &lt;em&gt;Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced      &lt;br /&gt;&lt;/em&gt;Name: &lt;em&gt;NavPaneShowAllFolders &lt;/em&gt;(REG_DWORD)     &lt;br /&gt;Value: &lt;em&gt;1&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Folder Options -&amp;gt; Navigation Pane -&amp;gt;Automatically expand to current folder (ON)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Path: &lt;em&gt;Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced      &lt;br /&gt;&lt;/em&gt;Name: &lt;em&gt;NavPaneExpandToCurrentFolder&lt;/em&gt; (REG_DWORD)     &lt;br /&gt;Value: &lt;em&gt;1&lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6925861589547730554?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6925861589547730554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6925861589547730554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6925861589547730554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6925861589547730554'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/09/using-group-policy-preferences-to.html' title='Using Group Policy Preferences to configure Windows Explorer'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2307549271320089625</id><published>2009-09-17T00:29:00.000-07:00</published><updated>2009-10-07T11:37:48.388-07:00</updated><title type='text'>Misusing ROBOCOPY to delete old files</title><content type='html'>We have a lot of servers that store files that are not needed after some time (for example, Logfiles). Usually these files are sometimes needed for some days but not after that.  &lt;br /&gt;  &lt;br /&gt;Therefore I needed a fast and quick way to delete old files. I found some programs that are able to do so, but I wanted a really simple solution.  &lt;br /&gt;  &lt;br /&gt;After some testing, I decided to “misuse” Robocopy for that. Actually, Robocopy has no option to delete old files but it has the strange option “/CREATE”. This option will copy all files but with 0 bytes, so the copy is very fast.  &lt;br /&gt;  &lt;br /&gt;The Batchfile that does the real work (DeleteOldFiles_Exec.bat) looks like this:  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;SET SRC=%1&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;SET PATRN=%2&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;SET DAYS=%3&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;IF NOT EXIST C:\TEMP\. md C:\TEMP&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;IF NOT EXIST C:\TEMP\TRASH\. md C:\TEMP\trash&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;%~dp0robocopy %SRC% &amp;quot;C:\TEMP\TRASH&amp;quot; %PATRN% /R:1 /s /mov /create /XA:A /minage:%days%&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;Rem /L for List only&lt;/span&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;rd C:\TEMP\TRASH /s /q&lt;/span&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;It will move the given files (%PATRN%) from the source folder (%SRC%) that are older than the given days (%DAYS%). The options for Robocopy are pretty easy except the /CREATE option (see above) and the /XA:A option which excludes all files with the ARCHIVE attribute set. This option is set since I do not want to delete any file that hasn't been backed up.  &lt;br /&gt;  &lt;br /&gt;I then call this batch like this:  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;CALL deleteoldfiles_exec &amp;quot;C:\Temp&amp;quot; *.* 10   &lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;This will delete all files (*.*) in the directory C:\Temp that are older than 10 days.    &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2307549271320089625?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2307549271320089625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2307549271320089625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2307549271320089625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2307549271320089625'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/09/misusing-robocopy-to-delete-old-files.html' title='Misusing ROBOCOPY to delete old files'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7678344559870823066</id><published>2009-08-26T12:59:00.001-07:00</published><updated>2009-08-26T13:05:41.639-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PC'/><title type='text'>Hexagon v3: Part 5 – Over clocking</title><content type='html'>&lt;p&gt;This is a post about my new custom build PC. To see all posts, check out &lt;a href="http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html"&gt;Hexagon v3: Part 1 – Main Components&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Since Hexagon v3 is now working (Vista SP2 with all updates), it’s time to get started with over clocking. After all, this is just the process of using components outside their specification to save some money ;-).&lt;/p&gt;  &lt;p&gt;As I said in a block post before, I want to over clock the CPU only. Therefore, I’m&amp;#160; concentrate on torturing and monitoring the CPU.&lt;/p&gt;  &lt;p&gt;For torturing, I use a special program by Matthias Withopf: &lt;a href="http://www.withopf.com/tools/cputempwatch/"&gt;Core2MaxPerf&lt;/a&gt; (bottom of the page). This is the only program I know that is really able to fully load a Core CPU (yes, even Prime95 isn’t able to do so). For temperature monitoring I will use another tool from Mr. Withopf: &lt;a href="http://www.withopf.com/tools/cputempwatch/"&gt;CPUTempWatch&lt;/a&gt; together with &lt;a href="http://www.almico.com/speedfan.php"&gt;SpeedFan&lt;/a&gt; by Alfredo Milani Comparetti.&lt;/p&gt;  &lt;p&gt;In case you are wondering why I use these two instead of Gigabytes’s EasyTune6: The “CPU Temperature” inside the BIOS and EasyTune6 is measured on the board and has nothing to do with the real temperature of your CPU. On the other hand, I know there are several other programs that claim to read the real temperature from the CPU directly. Well, here’s an example what you get (example from my old computer):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374358544728288114"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="11_Core2_Temp_Muahahaha" border="0" alt="11_Core2_Temp_Muahahaha" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SpWUFfZIRXI/AAAAAAAAAZE/mbBF4afc9C0/11_Core2_Temp_Muahahaha%5B6%5D.jpg?imgmax=800" width="277" height="332" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Do you find the error on this picture? If so: That’s the reason why I trust only SpeedFan and CPUTempWatch.&lt;/p&gt;  &lt;p&gt;As I started testing with Core2MaxPerf and Prime95 (with all values AUTO, no over clocking), the somewhat expected happened: The system crashed. After some testing with various BIOS settings, it turned out that the memory modules were failing. &lt;/p&gt;  &lt;p&gt;If the memory is configured to anything else than X.M.P. Memory (800 MHz/ 1600 MHz) with 1.65V voltage and the default timings (All values set to [AUTO] = 8-8-8-24), the system crashes. After that change, the system was stable. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374359773514365202"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="12_MaxPerf_BeforeOC" border="0" alt="12_MaxPerf_BeforeOC" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SpWUFq1-63I/AAAAAAAAAZc/ycbw9-ssk48/12_MaxPerf_BeforeOC%5B1%5D.jpg?imgmax=800" width="410" height="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Note: Actually I was running this for over an hour, but the print screen didn’t copied anything so I simply started Core2MaxPerf again and took the screenshot.&lt;/p&gt;  &lt;p&gt;An 8 hours &lt;a href="http://www.mersenne.org/freesoft/"&gt;Prime95&lt;/a&gt; stress test in Blend and In-place large FFT mode also worked, so I knew the system was stable and could start over clocking.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Given the crashes because of the memory modules, it was clear that the memory needs to be configured exactly as before or I would face crashes again. My initial goal was just above 3.0 GHz, so the base clock should be 151 MHz. However, this would cause the memory run outside the specification. Therefore, I created this small excel sheet to do the math:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374360432151333842"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="13_OCCalc" border="0" alt="13_OCCalc" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SpWUF-KyqAI/AAAAAAAAAZk/e4C6hEpY2AI/13_OCCalc%5B1%5D.jpg?imgmax=800" width="248" height="191" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I ended up using 160 MHz as the back clock, x10 as the memory multiplier and x20 as the Uncore multiplier. This means that both the memory and the Uncore frequency are exactly the same as before and no bad things should happen there. I also raised the CPU vCore slightly to 1,275V and the QPI Voltage to 1,280V (to make sure it’s within a 0,5V range of the memory modules voltage).&lt;/p&gt;  &lt;p&gt;Now I simply repeated all tests:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374361940593802418"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="14_MaxPerf_OC" border="0" alt="14_MaxPerf_OC" src="http://lh5.ggpht.com/_V1tbWNn9eRE/SpWUGSvylbI/AAAAAAAAAZQ/U0XTVmuIsZE/14_MaxPerf_OC%5B7%5D.jpg?imgmax=800" width="404" height="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The temperature climbed to 73°C, which is okay for me (the CPU will shut down at 100°C) but the CPU fan management of the board is not as good as it could be. &lt;/p&gt;  &lt;p&gt;If you use EasyTune6 and change the temperature control, the temperature is degreased to 69°C. That’s because the CPU cooler is than running at 1300 RPM while before it was only running at 800 RPM.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374362561527442066"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="15_MaxPerdf_OC_Fancontrol" border="0" alt="15_MaxPerdf_OC_Fancontrol" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SpWUG_ThLHI/AAAAAAAAAZU/Se1g5NUFfmc/15_MaxPerdf_OC_Fancontrol%5B4%5D.jpg?imgmax=800" width="307" height="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;However, this would require having EasyTune6 running all the time and I don’t want that. Maybe I will later on try to control the CPU fan with SpeedFan to have more control over it.&lt;/p&gt;  &lt;p&gt;The final test, Prime95 Blend for over 9 hours, worked as well:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5374363491475249874"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="16_Prime95" border="0" alt="16_Prime95" src="http://lh5.ggpht.com/_V1tbWNn9eRE/SpWUHWYOFfI/AAAAAAAAAZY/BYJG2ADPlbg/16_Prime95%5B4%5D.jpg?imgmax=800" width="628" height="310" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Just for your reference: Although Prime95 was now running on all cores for more than 9 hours, the temperature wasn’t as high as with Core2MaxPerf. That’s what I meant with “Full Load Testing can only be done with Core2MaxPerf”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well, that’s it - I’m done with the setup of Hexagon v3. If just Windows 7 would be available already…&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7678344559870823066?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7678344559870823066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7678344559870823066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7678344559870823066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7678344559870823066'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/hexagon-v3-part-5-overclocking.html' title='Hexagon v3: Part 5 – Over clocking'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/SpWUFfZIRXI/AAAAAAAAAZE/mbBF4afc9C0/s72-c/11_Core2_Temp_Muahahaha%5B6%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8789493827948437176</id><published>2009-08-21T11:44:00.001-07:00</published><updated>2009-08-26T12:59:54.883-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PC'/><title type='text'>Hexagon v3: Part 4 – Full Assembly</title><content type='html'>This is a post about my new custom build PC. To see all posts, check out &lt;a href="http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html"&gt;Hexagon v3: Part 1 – Main Components&lt;/a&gt;   &lt;br /&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The remaining assembly should be a peace of cake if you have at least build one PC in your life. &lt;/p&gt;  &lt;p&gt;Install the CPU on the motherboard (this is described very good in the manual of the main board&amp;#160; and then install the Kabuto onto it. Using push pins with a cooler of this size can be tricky, but after watching the &lt;a href="http://eiskaltmacher.de/portal/index.php?option=com_content&amp;amp;task=view&amp;amp;id=2065&amp;amp;Itemid=53&amp;amp;limit=1&amp;amp;limitstart=2"&gt;Kabuto installation video&lt;/a&gt; at &lt;a href="http://www.eiskaltmacher.de"&gt;Eiskaltmacher.de&lt;/a&gt;, this was a snap. You only need to make sure that the &lt;strong&gt;ends&lt;/strong&gt; of the heat pipes are facing upwards!&lt;/p&gt;  &lt;p&gt;When installing the memory modules, I did it (of course) wrong the first time. To enable triple channel operation, the modules must be installed into the &lt;strong&gt;white slots&lt;/strong&gt;. Not the blue ones, although the memory modules are blue also.&lt;/p&gt;  &lt;p&gt;When installing the hard disks, I noted each serial number of each drive and the SATA port it is connected to. Given how many screws you need to remove until you can exchange one, I though this would help in case of a hard disk failure.&lt;/p&gt;  &lt;p&gt;I tried my best to do the cabling right this time, but the result is still somewhat… ugly.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372482965512962002"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="08_Inlay_DSCF1453" border="0" alt="08_Inlay_DSCF1453" src="http://lh5.ggpht.com/_V1tbWNn9eRE/So7rF3uzk1I/AAAAAAAAAYU/VmilsKRhcqc/08_Inlay_DSCF1453%5B5%5D.jpg?imgmax=800" width="102" height="131" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372482950305055266"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="07_CaseBack_DSCF1448" border="0" alt="07_CaseBack_DSCF1448" src="http://lh4.ggpht.com/_V1tbWNn9eRE/So7rGSG0OnI/AAAAAAAAAYY/bqqlpzZrnqs/07_CaseBack_DSCF1448%5B11%5D.jpg?imgmax=800" width="106" height="131" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Anyway, the good news is: It came to life! So I simply installed Vista and did the typical Windows Update stuff.&lt;/p&gt;  &lt;p&gt;Since this is the first time I’m using Samsung HDs (I mostly used Hitachi drives before), I went on to change the &lt;a href="http://en.wikipedia.org/wiki/Automatic_Acoustic_Management"&gt;Automatic Acoustic Management&lt;/a&gt; (AAM). Hitachi usually delivery their drives set to &lt;em&gt;Middle&lt;/em&gt;, so the drive is not operating at full speed in favor for more silence. Therefore I decided to set the Samsung HDs to &lt;em&gt;Fast&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;This can only be changed with ES Tool from DOS. Therefore, I downloaded “Driver Free Disk for BIOS Flashing” from &lt;a href="http://www.bootdisk.com"&gt;Bootdisk.com&lt;/a&gt;, copied &lt;a href="- http://www.samsung.com/global/business/hdd/support/utilities/ES_Tool.html"&gt;ES Tool&lt;/a&gt; onto the floppy and booted. &lt;/p&gt;  &lt;p&gt;Important: ES Tool can only access the HDs when the Intel ICH is no responsible for the disk. In other words: When the drives are set to IDE and not configured as array. Even if a an array is already configured, you can always change the setting “ICH SATA Control Mode” to &lt;em&gt;IDE&lt;/em&gt; and “SATA Port 0-3 Native Mode” to &lt;em&gt;DISABLED&lt;/em&gt;, make the changes with ES Tool, and change it back again. The array will not be destroyed as long as you do not write any data on the disks.&lt;/p&gt;  &lt;p&gt;Using ES Tool is simple: When you see the DOS prompt, type ESTOOL to start it. I will then display all drives it has found. Select the first, select “AAM Mode” from the menu, change the value to &lt;em&gt;FAST&lt;/em&gt; and select &lt;em&gt;PROCESS&lt;/em&gt;. That’s it. To select another drive, simply select AUTO DETECT and repeat. &lt;/p&gt;  &lt;p&gt;By default, all HDs had AAM set to DISABLED and the actually results of this change where by far not as good as I hoped.&lt;/p&gt;  &lt;p&gt;Here are the benchmarks before the change (AAM = DISABLED):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372488520733313170"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="09a_DiskMark_AAM Off" border="0" alt="09a_DiskMark_AAM Off" src="http://lh6.ggpht.com/_V1tbWNn9eRE/So7rGkKxQiI/AAAAAAAAAYc/VEJILKVum98/09a_DiskMark_AAM%20Off%5B5%5D.jpg?imgmax=800" width="118" height="102" /&gt;&lt;/a&gt;&amp;#160; &lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372488525785048578"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="10a_Sandra_AAM_Off" border="0" alt="10a_Sandra_AAM_Off" src="http://lh5.ggpht.com/_V1tbWNn9eRE/So7rG0tnKcI/AAAAAAAAAYg/m1JCnj3rBTM/10a_Sandra_AAM_Off%5B5%5D.jpg?imgmax=800" width="149" height="127" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And here after the change (AAM = FAST):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372488905499381714"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="09b_DiskMark_AAM_Fast" border="0" alt="09b_DiskMark_AAM_Fast" src="http://lh3.ggpht.com/_V1tbWNn9eRE/So7rHXRPMlI/AAAAAAAAAYk/dK_iJuT4yWo/09b_DiskMark_AAM_Fast%5B5%5D.jpg?imgmax=800" width="120" height="102" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5372488908185281954"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="10b_Sandra_AAM_Fast" border="0" alt="10b_Sandra_AAM_Fast" src="http://lh5.ggpht.com/_V1tbWNn9eRE/So7rHknEJkI/AAAAAAAAAYo/kpEZdg0J3UY/10b_Sandra_AAM_Fast%5B5%5D.jpg?imgmax=800" width="151" height="127" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the access time was significantly improved, same values were even worse than before. As it seems, AAM set to &lt;em&gt;DISABLED&lt;/em&gt; is nearly the same as &lt;em&gt;FAST&lt;/em&gt; when using Samsung drives.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8789493827948437176?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8789493827948437176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8789493827948437176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8789493827948437176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8789493827948437176'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/hexagon-v3-part-4-full-assembly.html' title='Hexagon v3: Part 4 – Full Assembly'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_V1tbWNn9eRE/So7rF3uzk1I/AAAAAAAAAYU/VmilsKRhcqc/s72-c/08_Inlay_DSCF1453%5B5%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1873637099444087807</id><published>2009-08-19T03:14:00.000-07:00</published><updated>2009-08-19T03:33:16.149-07:00</updated><title type='text'>Media Player Classic Rollout</title><content type='html'>We just solved a problem a customer had with media playback using Windows Media Player (WMP).&lt;br /&gt;&lt;br /&gt;Basically there were two problems associated with WMP: First, several users complained that opening a file with WMP takes a long time. Secondly, a lot of users were confused by all the controls WMP offers and asked how to “clean” the interface. The help desk database showed that about 130 tickets were created about these issues in the last three months.&lt;br /&gt;&lt;br /&gt;Our first idea was to see if we could solve this problem with registry settings and/or GPO settings. However, I personally didn’t use WMP for several years now; I always use Media Player Classic (MPC). Showing Media Player Classic the users that reported one of these issues the most resulted in one reaction: “Great. Exactly what I need”. If you do not quite understand what the user means, here’s an example of the interface difference between WMP and MPC:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SovQ9hUYCrI/AAAAAAAAAXQ/L87hIdCiGL0/s1600-h/WMP.JPG"&gt;&lt;img style="margin: 0px auto 10px; text-align: left; cursor: pointer; width: 265px; height: 186px;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SovQ9hUYCrI/AAAAAAAAAXQ/L87hIdCiGL0/s320/WMP.JPG" alt="" id="BLOGGER_PHOTO_ID_5371616735903877810" border="0" /&gt;&lt;/a&gt; _ &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SovQ-LPCJuI/AAAAAAAAAXY/JMy-ldVmsO4/s1600-h/MPC.JPG"&gt;&lt;img style="margin: 0px auto 10px; text-align: left; cursor: pointer; width: 257px; height: 95px;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SovQ-LPCJuI/AAAAAAAAAXY/JMy-ldVmsO4/s320/MPC.JPG" alt="" id="BLOGGER_PHOTO_ID_5371616747155760866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sure thing, this means we will roll out MPC to 550+ computers! A very important requirement of this rollout was that the changes could be reverted back easily.  As Microsoft is constantly updating WMP, it might happen that a new version brings back a “clean” interface and is faster. At that time, MPC would be replaced by WMP again.&lt;br /&gt;&lt;br /&gt;Therefore, we have created some .REG files and some .BAT files that install MPC. These scripts will then be executed by the computer management solution of the customer.&lt;br /&gt;&lt;br /&gt;The first thing is to download MPC from &lt;a href="http://mpc-hc.sourceforge.net/"&gt;http://mpc-hc.sourceforge.net/&lt;/a&gt;, and copying these files to Program Files folder.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;md "%programfiles%\Media Player Classic\"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;copy S:\soft\MPC\MPC_prog\*.* "%programfiles%\Media Player Classic" /V /Y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After that, Windows should know that a new program is available so we’ll add MPC to the “Applications” list by using this .REG file (simply import this file with the command &lt;span style="font-family: courier new;"&gt;regedit.exe /S app.reg&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;REGEDIT4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="Media Player Classic"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"FriendlyAppName"="Media Player Classic"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\DefaultIcon]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe,0"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\shell\open]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\shell\open\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\shell\play]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Play"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\shell\play\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Applications\mplayerc.exe\SupportedTypes]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WAV"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WMA"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MP3"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"OGG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"SND"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AU"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AIF"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AIFC"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AIFF"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MIDI"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MPEG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MPG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MP2"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"VOB"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AC3"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"DTS"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"ASX"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"M3U"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"PLS"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WAX"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"ASF"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WM"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WMA"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"WMV"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"AVI"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"CDA"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"JPEG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"JPG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"GIF"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"PNG"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"BMP"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"D2V"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MP4"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"SWF"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"MOV"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"QT"=""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"FLV"=""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After this, users can already right click any supported file type, select “Open with..” and choose “Media Player Classic”. However, when doing so this won’t work because Windows does not know where the file “mplayerc.exe” is. This REG file will help Windows to locate it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;REGEDIT4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mplayerc.exe]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;@="C:\\Program Files\\Media Player Classic\\mplayerc.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"Path"="C:\\Program Files\\Media Player Classic\\"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Although it is of course possible to include the complete path in the first REG, we are using the AppPaths here because this gives us one location where MPLAYERC.exe is located. This will be more important later on.&lt;br /&gt;&lt;br /&gt;The next step is to associate the needed files with MPC. As said earlier, we are trying to accomplish this as least changes as possible. Therefore we are simply adding to each file type that should open with MPC, a new command “Play2” and make this command the default. That way, switching back to Windows Media Player just requires changing the default command.&lt;br /&gt;&lt;br /&gt;Please note that we are only changing those files that customer is using (often or sometimes) and leaving all other, even if MPC supports them, alone:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;REGEDIT4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .wav = soundrec (#1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "play"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\SoundRec\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\SoundRec\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\SoundRec\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .mpeg = mpegfile (#2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "play"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mpegfile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mpegfile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mpegfile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .avi = avifile (#3)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "play"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\avifile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\avifile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\avifile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .mp3 = mp3file (#4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "play"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mp3file\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mp3file\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\mp3file\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .mid = midfile (#5)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "play"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\midfile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\midfile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\midfile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .MKV -&gt; Not existsting by default (#6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\.mkv]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="MKVFile"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\MKVFile\DefaultIcon]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe,0"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\MKVFile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\MKVFile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\MKVFile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .divx = divxFile (#7)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; default "open"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\divxFile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\divxFile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\divxFile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;; .FLV -&gt; Not existing by default (#8)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\.flv]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="Flash.VideoFile"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Flash.VideoFile\DefaultIcon]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe,0"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Flash.VideoFile\shell]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="play2"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Flash.VideoFile\shell\play2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="&amp;amp;Open"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;[HKEY_CLASSES_ROOT\Flash.VideoFile\shell\play2\command]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@="mplayerc.exe \"%L\""&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see, we are reusing the AppPath from above by executing “mplayerc.exe” without any path. If you want to install MPC in a different folder, just change the AppPath and everything else will still work. We simply find that a simpler solution then entering the complete path in every command, although Windows needs some milliseconds more to locate mplayerc.exe.&lt;br /&gt;&lt;br /&gt;Once all these REG files have been imported (&lt;span style="font-family: courier new;"&gt;REGEDIT.EXE /S &lt;/span&gt;&lt;filename&gt;&lt;span style="font-family: courier new;"&gt;(SOMETHING).reg&lt;/span&gt;), give it a try if all files are opened with MPC as expected. In case you need test files, some very good ones could be found at &lt;a href="http://www.jhepple.com/support/sample_movies1.htm"&gt;Fx Sound and Magic&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;&lt;/filename&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1873637099444087807?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1873637099444087807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1873637099444087807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1873637099444087807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1873637099444087807'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/media-player-classic-rollout.html' title='Media Player Classic Rollout'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SovQ9hUYCrI/AAAAAAAAAXQ/L87hIdCiGL0/s72-c/WMP.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2581176434717585319</id><published>2009-08-15T11:41:00.001-07:00</published><updated>2009-08-21T11:57:00.330-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PC'/><title type='text'>Hexagon v3: Part 3 – Case Assembly</title><content type='html'>&lt;p&gt;This is a post about my new custom build PC. To see all posts, check out &lt;a href="http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html"&gt;Hexagon v3: Part 1 – Main Components&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Finally, all parts for Hexagon v3 have arrived. Time to get this rolling.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370246531726741090"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="01_Standoff_DSCF1376" border="0" alt="01_Standoff_DSCF1376" align="left" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SocBOjeVaMI/AAAAAAAAAW0/dzt6Q04iM1o/01_Standoff_DSCF13763.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;Starting with the assembly, I first installed the standoffs for the motherboard into the case. While it’s empty, this is very easy to do. I used all available screw holes of the EX58-UD5, so at the end I installed nine standoffs.&lt;/p&gt;  &lt;p&gt;Next was to completely disassembled the Twelve Hundred. As I said, I want to exchange all fans it has with the SilentWings ones.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370249791468500978"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="02_CaseFans1_DSCF1384" border="0" alt="02_CaseFans1_DSCF1384" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SocBO5UXMWI/AAAAAAAAAW4/04A297w_Ve0/02_CaseFans1_DSCF13843.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;I started with the two case fans at the back. It’s a complete no brainer, you only need to remember to push out the two speed&amp;#160; switches from the back of the case. &lt;/p&gt;  &lt;p&gt;A little bit more work is needed for the three drive bays. The problem is that the SilentWings use push pins and require a slightly bigger hole than the screws Antec uses. Left is the picture of the fan holder as delivered, on the right after the rework.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370251041837871634"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="03_DriveBay_B_DSCF1390" border="0" alt="03_DriveBay_B_DSCF1390" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SocBPdtBHpI/AAAAAAAAAW8/bpmGs7qVCG8/03_DriveBay_B_DSCF13906.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370251044272996434"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="03_DriveBay_A_DSCF1388" border="0" alt="03_DriveBay_A_DSCF1388" src="http://lh5.ggpht.com/_V1tbWNn9eRE/SocBPslPvzI/AAAAAAAAAXA/hFdyVODYEj4/03_DriveBay_A_DSCF13886.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370255909769657442"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="04_DriveBay_SW1_DSCF1412" border="0" alt="04_DriveBay_SW1_DSCF1412" align="left" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SocBQeJ-FKI/AAAAAAAAAXI/ViC4_tXUbww/04_DriveBay_SW1_DSCF14123.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370256163206690018"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="05_FanSpare_DSCF1417" border="0" alt="05_FanSpare_DSCF1417" align="right" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SocBQEh7qBI/AAAAAAAAAXE/yNLTDAifxWQ/05_FanSpare_DSCF14174.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;I only changed three holes, because one isn’t usable (speed controller knob) but three will keep the fan in place also. Once finished, I had four fan holders, three of them are for the front of the drive bays, one for the back (extra CPU cooling). Oh, and I also have five Antec TriCool spare fans now :-).&lt;/p&gt;  &lt;p&gt;Assembling the drive bays again isn’t quite a problem. However, due to the size of the push pins the air filter needs some force to be installed again.&lt;/p&gt;  &lt;p&gt;After that, I temporary installed the main board to get an idea how the cabling should be. Given that both the DVD drive and the floppy are installed with those ugly, old, wide and non flexible cables, I decided to install them at the bottom. That way, the cable aren’t going through the entire case. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/T3XH3X/Hexagon_v3#5370258867547635506"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="06_Bottom_Front_DSCF1422" border="0" alt="06_Bottom_Front_DSCF1422" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SocBQolsaAI/AAAAAAAAAXM/t1ZAc20tDG0/06_Bottom_Front_DSCF14223.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;Getting the floppy drive installed was the hardest part of the entire assembly. I spent nearly an hour to get it done right. To me, it looks like nobody at Antec has ever used that floppy spare. I ended up securing the adapter, as it chipped out somehow all the time, with the extra cover I installed for the power LED.&lt;/p&gt;  &lt;p&gt;So the complete assignment of the bays is as follows (from the top):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;1-3: One drive bay with two HDs &lt;/li&gt;    &lt;li&gt;4-6: One drive bay with extra fan on the back (no HDs) &lt;/li&gt;    &lt;li&gt;7-9: One drive bay with two HDs &lt;/li&gt;    &lt;li&gt;10: extra cover with power LED &lt;/li&gt;    &lt;li&gt;11: Floppy &lt;/li&gt;    &lt;li&gt;12: DVD &lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2581176434717585319?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2581176434717585319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2581176434717585319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2581176434717585319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2581176434717585319'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/hexagon-v3-part-3-case-assembly.html' title='Hexagon v3: Part 3 – Case Assembly'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_V1tbWNn9eRE/SocBOjeVaMI/AAAAAAAAAW0/dzt6Q04iM1o/s72-c/01_Standoff_DSCF13763.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8346309006268608548</id><published>2009-08-09T11:39:00.001-07:00</published><updated>2009-08-21T11:56:42.711-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PC'/><title type='text'>Hexagon v3: Part 2 – Case fans</title><content type='html'>&lt;p&gt;This is a post about my new custom build PC. To see all posts, check out &lt;a href="http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html"&gt;Hexagon v3: Part 1 – Main Components&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When it comes to cooling, there are two characteristics that are mutually excluded. You want to fans to be silent, means you don’t hear them. On the other hand, your computer wants as much fresh air as it can get which means the fan should run at full power. And this causes noise. &lt;/p&gt;  &lt;p&gt;The problem is based how fans work: An engine will spin a propeller that will blow fresh air to the area you need it. The higher the need of fresh air (air flow, measured in &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM – cubic feet per minute&lt;/a&gt;), the faster the propeller needs to spin. And this will simply cause more noise. An example might help:&lt;/p&gt;  &lt;p&gt;A Silent Eagle SE 120mm (which is designed to be silent) run at 12 volts will spin at 1250 RPM (rounds per minute) and has a loudness of 1,1 &lt;a href="http://en.wikipedia.org/wiki/Sone"&gt;Sone&lt;/a&gt;. This means: It has a loudness of “very calm talking”. You can hear it, but it’s not disturbing. The air flow of it is in this case 26 &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;If you now slow this fan down to 9 volts, it will spin with only 750 RPM and its loudness will go below 0.1 &lt;a href="http://en.wikipedia.org/wiki/Sone"&gt;Sone&lt;/a&gt;. This means: It has a loudness of “calm breathing”, equals “You just can’t hear it” equals “Silence”. However, the air flow is reduced to 19 &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;To have the same air flow (&lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt;) as before, you would need two fans (38 &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt; in total), but still completely silent. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;To have a good air flow but also a silent operation, you should go for a fan that is running at low RPMs. To balance the reduced air flow, simply add more fans. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;(I should add that an even better solution is to use a bigger fan, for example replacing a 120mm with a 200mm model. However, given how cases are build today, this isn’t an option. If the case expects a 120mm fan, you just can’t install a 200mm fan.)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;That was also the reason why I choose the &lt;a href="http://www.antec.com/Believe_it/product.php?id=ODg4"&gt;Antec Twelve Hundred&lt;/a&gt; as my case: It has three 120mm fans in front, two 120mm at the back and one 200mm fan on the top. The only problem with the fans that Antec delivers: You can only switch them between Low, Medium and High. Even when set to “Low”, the 120mm fans are running with 1200 rpm which is far too much for me. The 200mm fan on top of the case runs at “Low” 400 rpm (82 &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt;) so this should not be a problem. &lt;/p&gt;  &lt;p&gt;I know currently of exactly two fans that have a good airflow together with a silent operation:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.be-quiet.net/be-quiet.net/index.php?StoryID=478&amp;amp;websiteLang=en"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/Sn8Xw20j_DI/AAAAAAAAAVc/I0JNfwW69l4/image3.png?imgmax=800" width="66" height="73" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.be-quiet.net/be-quiet.net/index.php?StoryID=478&amp;amp;websiteLang=en"&gt;be quiet! SilentWings USC 120mm&lt;/a&gt; (My number one choice)&lt;/p&gt;  &lt;p&gt;Comes with 3-pin connector (not 4-pin for PMW!), 7V adapter to &lt;a href="http://en.wikipedia.org/wiki/Molex"&gt;4-pin Molex&lt;/a&gt; (7 volt, 900 RPM) and a 12V adapter to &lt;a href="http://en.wikipedia.org/wiki/Molex"&gt;4-pin Molex&lt;/a&gt; (12 volt, 1500 RPM). The fan case is decoupled, so vibrations will not cause more noise. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sharkoon.com/html/produkte/luefter/silent_eagle_se/index_en.html"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/Sn8XxOX21cI/AAAAAAAAAVg/wlnqoYLUtuA/image4.png?imgmax=800" width="73" height="73" /&gt;&lt;/a&gt;&lt;a href="http://www.sharkoon.com/html/produkte/luefter/silent_eagle_se/index_en.html"&gt;Sharkoon Silent Eagle SE&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Comes with several adapter cables :&amp;#160; &amp;quot;Standard&amp;quot;: 4-pin to 4-pin PWM (color: white), &amp;quot;Low Noise&amp;quot; (black): 4-pin to &lt;a href="http://en.wikipedia.org/wiki/Molex"&gt;4-pin Molex&lt;/a&gt; 12V (1250 RPM), &amp;quot;Silent&amp;quot; (red): 4-pin to &lt;a href="http://en.wikipedia.org/wiki/Molex"&gt;4-pin Molex&lt;/a&gt; 9V (750 RPM) and &amp;quot;Ultra Silent&amp;quot; (blue): 4-pin to &lt;a href="http://en.wikipedia.org/wiki/Molex"&gt;4-pin Molex&lt;/a&gt; 7V (300 RPM).&lt;/p&gt;  &lt;p&gt;I choose the SilentWings over the Silent Eagle SE for a simple reason: When run in silent mode (7V for the SilentWings, 9V for the Silent Eagle SE), the SilentWings is running at 900 RPM while the Silent Eagle SE is running at 750 RPM. This means that the SilentWings has a better air flow with more &lt;a href="http://en.wikipedia.org/wiki/Cubic_feet_per_minute"&gt;CFM&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/_V1tbWNn9eRE/Sn8XxQKyqrI/AAAAAAAAAVk/04ZCDZuiiQs/s1600-h/cooler33.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="cooler3" border="0" alt="cooler3" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/Sn8Xx3PHyZI/AAAAAAAAAVo/t16GY_U81oQ/cooler3_thumb.jpg?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt;One more thing: When installing a fan, always make sure the install it in the right direction. Yes, I know this must sound odd but I also installed a fan in the wrong direction once. Simply have a look at the fan you want to install and check the arrows every fan has (click the picture to enlarge it). &lt;/p&gt;  &lt;p&gt;This SilentWings has two arrows: The arrow on the left points to left and indicates that this is the direction the propeller is moving (in this case, to the left). The right arrow shows you in which direction the airflow is. In this case, the airflow will be bottom up, this means the fan will accelerate the air from the bottom to to the top. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8346309006268608548?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8346309006268608548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8346309006268608548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8346309006268608548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8346309006268608548'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/hexagon-v3-part-2-case-fans.html' title='Hexagon v3: Part 2 – Case fans'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_V1tbWNn9eRE/Sn8Xw20j_DI/AAAAAAAAAVc/I0JNfwW69l4/s72-c/image3.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1283565760806830239</id><published>2009-08-05T09:14:00.001-07:00</published><updated>2009-08-05T09:14:10.804-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>ServicePrincipalNameCheck.cs – Check your SPN</title><content type='html'>&lt;p&gt;In case you are programming with &lt;a href="http://en.wikipedia.org/wiki/Windows_Communication_Foundation"&gt;Windows Communication Foundation (WCF)&lt;/a&gt;, you might want to use Kerberos authentication (instead of NTLM) one day. An example of an WCF client and server that use this security mode can be &lt;a href="http://msdn.microsoft.com/en-us/library/ms735117.aspx"&gt;found on MSDN&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Kerberos authentication is faster than NTLM and more secure. The bad thing is, in order Kerberos is able to authenticate, it will need a ticket and for that it needs a service principal name (SPN) inside Active Directory. &lt;/p&gt;  &lt;p&gt;I don’t want to explain all the details about SPNs, since other people already have done this already: &lt;a href="http://blogs.technet.com/tristank/archive/2006/05/08/spns-r-fn.aspx"&gt;3 Simple Rules to Kerberos Authentication/Delegation SPNs&lt;/a&gt; and &lt;a href="http://blogs.neudesic.com/blogs/rinat_shagisultanov/archive/2006/08/03/206.aspx"&gt;Using WCF service in load balanced environment with Kerberos delegation&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;However, since I just finished the third projects were missing SPNs have caused a, well, not-as-planned, project start, I have created a class that can check SPNs. &lt;/p&gt;  &lt;p&gt;The idea behind is quite simple: When the server starts, it will use this class to check if all necessary SPNs are set. If not, the class will return FALSE and you can use the Log property to log an error. That way, the admin is aware that there is a problem.&lt;/p&gt;  &lt;p&gt;Please note that this class is intent for self-hosting services. This means, it will check if a SPN of &lt;em&gt;SERVICENAME/HOSTNAME:PORT&lt;/em&gt; exists, e.g. &lt;em&gt;CalcService/SERVER01:45563&lt;/em&gt;. If you plan to use it from IIS hosted services as well, you need to change this. &lt;/p&gt;  &lt;p&gt;Anyway, here we go:&lt;/p&gt;  &lt;p&gt;using System;   &lt;br /&gt;using System.Collections.Specialized;    &lt;br /&gt;using System.Collections.Generic;    &lt;br /&gt;using System.Text;    &lt;br /&gt;using System.DirectoryServices;    &lt;br /&gt;using System.DirectoryServices.ActiveDirectory;    &lt;br /&gt;using System.Net; &lt;/p&gt;  &lt;p&gt;namespace PleaseChangeMeIDoNotLikeMe&lt;/p&gt;  &lt;p&gt;{   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; /*    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * This class is intent to check the SPN (Service principal Names) inside a domain environment.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * You need a SPN as soon as your client wants to use Kerberos authentication, for example: &lt;a href="http://msdn.microsoft.com/en-us/library/ms735117.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms735117.aspx&lt;/a&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * Create this class with the service name you want to use and the port, e.g. “MyService” and 8081.&amp;#160; After that, call the function Check();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * Given that the current computer name is “DaServer”, this class will search if a SPN of &amp;quot;MyService/DaServer&amp;quot; and     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * &amp;quot;MyService/DaServer.yourdnsdomain.ext&amp;quot; exists.     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * If either of these two does not exist, Check will result FALSE. If more than one exists, it will also return FALSE.    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * Please note: SPN are NOT case sensitive when used in Windows only environments, but are case sensitive when using with UNIX clients.    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; * More information about SPN can be found here: &lt;a href="http://technet.microsoft.com/en-us/library/cc731241%28WS.10%29.aspx"&gt;http://technet.microsoft.com/en-us/library/cc731241%28WS.10%29.aspx&lt;/a&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; *&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; */ &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; //Copyright (C) 2009 Xteq Systems - &lt;a href="http://www.xteq.com/"&gt;http://www.xteq.com/&lt;/a&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; //Copyright (C) 2009 TeX Hex - &lt;a href="http://www.texhex.info"&gt;http://www.texhex.info&lt;/a&gt; - &lt;a href="http://texhex.blogspot.com/"&gt;http://texhex.blogspot.com/&lt;/a&gt;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public sealed class ServicePrincipalNameCheck    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string _service = string.Empty;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; int _port = 0; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StringBuilder _log = new StringBuilder(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StringCollection _adsPaths = new StringCollection();   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StringCollection _spns = new StringCollection(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public ServicePrincipalNameCheck(string ServiceName, int Port)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (string.IsNullOrEmpty(ServiceName))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw new ArgumentException(&amp;quot;ServiceName must be filled&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _service = ServiceName; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (Port &amp;lt;= 0)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw new ArgumentException(&amp;quot;Port must not be zero&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _port = Port;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public string Log   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; get    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return _log.ToString();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public bool Check()   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log = new StringBuilder();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _adsPaths.Clear();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _spns.Clear(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string computerName = System.Environment.MachineName;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string fqdn = Dns.GetHostEntry(computerName).HostName; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(string.Format(&amp;quot;Computer NetBIOS name: {0}&amp;quot;, computerName));   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(string.Format(&amp;quot;Computer FQDN: {0}&amp;quot;, fqdn));    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bool bCheckResult1=CheckInternal(computerName);   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bool bCheckResult2 = CheckInternal(fqdn); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bool bCheckHostCount = true; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //Write out found AD objects   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Found computer(s):&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (_adsPaths.Count &amp;gt; 0)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (string sHost in _adsPaths)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(sHost);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;(none)&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //Check if we have more than one entry in _adsPath. If so, several hosts have registered our SPN   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //which is normally not that good idea    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (_adsPaths.Count &amp;gt; 1)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Error: More than one AD host was found!&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bCheckHostCount = false;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //Write out found SPN   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Found SPN(s) (might include other SPNs as well)&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (_spns.Count &amp;gt; 0)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (string sSPN in _spns)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(sSPN);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;(none)&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return bCheckResult1 &amp;amp;&amp;amp; bCheckResult2 &amp;amp;&amp;amp; bCheckHostCount;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; private bool CheckInternal(string Computer)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string serviceName = string.Format(&amp;quot;{0}/{1}:{2}&amp;quot;, _service, Computer, _port); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Checking for SPN: &amp;quot; + serviceName); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bool bResult = false; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string filter = string.Format(&amp;quot;(serviceprincipalname={0})&amp;quot;, serviceName); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; using (Domain localDomain = Domain.GetCurrentDomain())   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; using (DirectorySearcher search = new DirectorySearcher(localDomain.GetDirectoryEntry()))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; search.Filter = filter;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; search.SearchScope = SearchScope.Subtree; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SearchResultCollection resultColl = search.FindAll(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (resultColl.Count &amp;lt;= 0)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Error: No SPN found!&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bResult = false;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (resultColl.Count &amp;gt; 1)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;Error: More than one matching SPN found!&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bResult = false;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine(&amp;quot;SPN check okay&amp;quot;);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; bResult = true;    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ProcessResults(resultColl);   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; _log.AppendLine();   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return bResult;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; void ProcessResults(SearchResultCollection resultColl)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ResultPropertyValueCollection rpvc; &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (SearchResult res in resultColl)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpvc = res.Properties[&amp;quot;adsPath&amp;quot;];    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SaveResults(rpvc, _adsPaths); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rpvc = res.Properties[&amp;quot;serviceprincipalname&amp;quot;];   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SaveResults(rpvc, _spns);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; private void SaveResults(ResultPropertyValueCollection rpvc, StringCollection sColl)   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (Object propValue in rpvc)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; string s=propValue.ToString();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (sColl.Contains(s) == false)    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sColl.Add(s);    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; } &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; }   &lt;br /&gt;}&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1283565760806830239?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1283565760806830239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1283565760806830239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1283565760806830239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1283565760806830239'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/08/serviceprincipalnamecheckcs-check-your.html' title='ServicePrincipalNameCheck.cs – Check your SPN'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-292556399842819282</id><published>2009-07-22T10:16:00.001-07:00</published><updated>2009-07-22T10:27:18.979-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Windows XP SP3 plus Internet Explorer 8 plus Microsoft Update equals malicious add-on (DEP) error</title><content type='html'>&lt;p&gt;Yesterday I installed a netbook from scratch. Everything went fine.&lt;/p&gt;  &lt;p&gt;After installing XP SP3 and IE8 I wanted to switch Windows Update to Microsoft Update. Currently this PC has no Office installed but I wanted to make sure that I don’t miss an update if I ever decide to install it.&lt;/p&gt;  &lt;p&gt;Okay, clicked on Microsoft Update inside Windows Update and IE8 stalled. After a few moments I get an Data Execution Prevention error and IE was telling me that an malicious add-on was the cause of this. WTF!?!? &lt;/p&gt;  &lt;p&gt;After trying to fix this unsuccessfully, I though that goggling might be an good idea. &lt;/p&gt;  &lt;p&gt;Bingo, shortly after I came across a discussion about this on &lt;a href="http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/thread/484400fc-6dcc-472e-ab74-0ee1242086b1"&gt;Microsoft Answers&lt;/a&gt;. Once more the solution Microsoft has declared as “answer” was not the answer, but a user named &lt;a href="http://social.answers.microsoft.com/Profile/en-US/?user=Valeyard&amp;amp;referrer=http%3a%2f%2fsocial.answers.microsoft.com%2fForums%2fen-US%2fInternetExplorer%2fthread%2f484400fc-6dcc-472e-ab74-0ee1242086b1&amp;amp;rh=3F9hRGtRLfAQV%2fwTFD2z3Ths%2bAbLfwhHKhQ%2f42j8PkQ%3d&amp;amp;sp=forums"&gt;Valeyard&lt;/a&gt; had the solution:&lt;/p&gt;  &lt;p&gt;Inside &lt;em&gt;Tools&lt;/em&gt; – &lt;em&gt;Internet Options&lt;/em&gt; – &lt;em&gt;Advanced&lt;/em&gt; (&lt;em&gt;Security&lt;/em&gt; section) disable/uncheck the option &lt;em&gt;Enable memory protection to help mitigate online attacks&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;Did that, restart the PC and Microsoft Update worked just fine.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-292556399842819282?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/292556399842819282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=292556399842819282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/292556399842819282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/292556399842819282'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/07/windows-xp-sp3-plus-internet-explorer-8.html' title='Windows XP SP3 plus Internet Explorer 8 plus Microsoft Update equals malicious add-on (DEP) error'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-380548946450859070</id><published>2009-07-21T03:13:00.000-07:00</published><updated>2009-07-22T10:32:13.514-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Backup Exec 12.5: Error "The Backup Exec Server Service detected a schema version mismatch."</title><content type='html'>You need to love Symantec...   &lt;br /&gt;  &lt;br /&gt;I just did an update from Backup Exec 12.0 to 12.5. Since the last update (11 to 12.0) &lt;a href="http://texhex.blogspot.com/2008/02/backup-exec-12-error-backup-exec-server.html"&gt;failed with a version schema error&lt;/a&gt;, I though this time I will wait until at least SP1 is available.   &lt;br /&gt;  &lt;br /&gt;No guess what? Software installation okay, restarted the server and here we go again: &lt;span style="font-weight: bold"&gt;The Backup Exec Server Service detected a schema version mismatch.&lt;/span&gt; ÜBERFAIL SYMANTEC!   &lt;br /&gt;  &lt;br /&gt;Fortunately, the fix is &lt;a href="http://texhex.blogspot.com/2008/02/backup-exec-12-error-backup-exec-server.html"&gt;nearly the same as the last time&lt;/a&gt;. Using SQL Server Management Studio, open the following files and execute them. Please remember to switch the database (normally it will say MASTER inside the tool bar) to the &lt;span style="font-style: italic"&gt;BEDB &lt;/span&gt;database before executing any of those.   &lt;br /&gt;  &lt;br /&gt;#1: &lt;span style="font-style: italic"&gt;C:\Program Files\Symantec\Backup Exec\betopcat.sql&lt;/span&gt;   &lt;br /&gt;#2: &lt;span style="font-style: italic"&gt;C:\Program Files\Symantec\Backup Exec\dbupgrade12.0.sql&lt;/span&gt;   &lt;br /&gt;#3: &lt;span style="font-style: italic"&gt;C:\Program Files\Symantec\Backup Exec\dbupgrade12.0-viewandsp.sql&lt;/span&gt;   &lt;br /&gt;  &lt;br /&gt;After that, everything should be fine.   &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight: bold"&gt;Appendix:&lt;/span&gt;   &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new"&gt;To: &lt;/span&gt;Product manager of Backup Exec&lt;span style="font-family: courier new"&gt;&lt;/span&gt;   &lt;br /&gt;&lt;span style="font-family: courier new"&gt;From:&lt;/span&gt; TeX HeX   &lt;br /&gt;&lt;span style="font-family: courier new"&gt;Subject:&lt;/span&gt; Whoever is in charge for the schema upgrade process within BE...   &lt;br /&gt;  &lt;br /&gt;Fire him!   &lt;br /&gt;  &lt;br /&gt;'nuff said.     &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-380548946450859070?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/380548946450859070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=380548946450859070' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/380548946450859070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/380548946450859070'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/07/backup-exec-125-error-backup-exec.html' title='Backup Exec 12.5: Error &amp;quot;The Backup Exec Server Service detected a schema version mismatch.&amp;quot;'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-4558525551030984624</id><published>2009-07-20T05:05:00.000-07:00</published><updated>2009-07-20T05:14:22.322-07:00</updated><title type='text'>Trine or Bust!</title><content type='html'>If you haven't bought &lt;a href="http://trine-thegame.com/site/"&gt;TRINE&lt;/a&gt; so far, you're missing something really cool.&lt;br /&gt;&lt;br /&gt;I bought my copy on Sunday and playing it sense then.  It's a side-scrolling action/puzzle game and it's just a h*** lot of fun.&lt;br /&gt;&lt;br /&gt;You can get it for XBOX 360, PS3 and &lt;a href="http://store.steampowered.com/app/35700/"&gt;PC (using Steam)&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-4558525551030984624?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/4558525551030984624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=4558525551030984624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4558525551030984624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4558525551030984624'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/07/trine-or-bust.html' title='Trine or Bust!'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-693979903752051493</id><published>2009-07-17T13:27:00.001-07:00</published><updated>2009-07-17T13:29:48.657-07:00</updated><title type='text'>Hexagon v3: Building my new PC</title><content type='html'>&lt;p&gt;Sorry for the lack of updates in the last time, but first I needed to get &lt;a href="http://www.x-setup.net/"&gt;X-Setup Pro 9.2&lt;/a&gt; out of the door and after that I had my three weeks summer holiday.&lt;/p&gt;  &lt;p&gt;Soon after I got &lt;a href="http://www.bmw-motorrad.de/de/de/bikes/sport/k1300s/k1300s_main.html"&gt;my new BMW K1300S&lt;/a&gt; which causes me to drive around like crazy. If you are interested, have a look &lt;a href="http://gpsies.de/mapUser.do?username=TeXHeX"&gt;at my tracks&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Back to computer, I have a new project: My new custom build PC called Hexagon v3. See the next post for the introduction.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-693979903752051493?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/693979903752051493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=693979903752051493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/693979903752051493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/693979903752051493'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/07/hexagon-v3-building-my-new-pc.html' title='Hexagon v3: Building my new PC'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5177219494979102936</id><published>2009-07-17T10:09:00.001-07:00</published><updated>2009-08-26T13:05:31.043-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PC'/><title type='text'>Hexagon v3: Part 1 - Components</title><content type='html'>&lt;p&gt;This is a post about my new custom build PC. See the other posts as well:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html"&gt;Part 1 – Main Components&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://texhex.blogspot.com/2009/08/hexagon-v3-part-2-case-fans.html"&gt;Part 2 – Case fans&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://texhex.blogspot.com/2009/08/hexagon-v3-part-3-case-assembly.html"&gt;Part 3 – Case assembly&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://texhex.blogspot.com/2009/08/hexagon-v3-part-4-full-assembly.html"&gt;Part 4 – Full assembly&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://texhex.blogspot.com/2009/08/hexagon-v3-part-5-overclocking.html"&gt;Part 5 – Over clocking&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;My custom PCs are always named HEXAGON or OCTAGON (that’s because there are some weeks where I use them both and Windows does not like equally named computers within the same network). Each new build gets an version number because I’m a programmer and I like version numbers :-).&amp;#160; I’m writing this on OCTAGON v2, so the new PC will be HEXAGON v3.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hexagon v3 Main Components&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://ark.intel.com/Product.aspx?id=37147"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh4.ggpht.com/_V1tbWNn9eRE/SmCwP3Q46XI/AAAAAAAAAUw/MEbUqE7TtWc/image%5B21%5D.png?imgmax=800" width="96" height="73" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;CPU: &lt;a href="http://ark.intel.com/Product.aspx?id=37147"&gt;Intel Core i7 920&lt;/a&gt; (Bloomfield)&lt;/p&gt;  &lt;p&gt;I like the features it has like the integrated memory controller (although this idea is stolen from AMD) with the triple channel interface. As it looks like, you can overclock the 920 very good so I hope I can each 3.2 GHz with it. I know that new Core i7 “Lynnfield” are on their way, but they will no longer have the triple channel for the memory.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.giga-byte.com/Products/Motherboard/Products_Overview.aspx?ProductID=2986"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" align="left" src="http://lh4.ggpht.com/_V1tbWNn9eRE/SmCwQfWyAAI/AAAAAAAAAU4/K_vmlzKQXw8/image%5B22%5D.png?imgmax=800" width="96" height="81" /&gt;&lt;/a&gt; Main board: &lt;a href="http://www.giga-byte.com/Products/Motherboard/Products_Overview.aspx?ProductID=2986"&gt;&lt;strike&gt;Gigabyte GA-EX58-UD4P&lt;/strike&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; As it seems this is EOL, replaced with &lt;a href="http://www.giga-byte.com/Products/Motherboard/Products_Overview.aspx?ProductID=2958"&gt;Gigabyte GA-EX58-UD5&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;X58 chipset (not that you have a choice for the i7…), with Intel Controller Hub v10 RAID (ICH10R). I plan to use RAID 1+0 (Mirroring and Stripping) and the ICH10R will allow me just that. Also, it comes with EasyTune a software normally designed to over clock from Windows but I want to use it to read the current temperatures, voltages etc. directly from the board. It has Dual Bios so if flashing the production BIOS fails, you can still access the board. Great if you were stupid enough to flash a board during a storm… &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.scythe-eu.com/en/products/cpu-cooler/kabuto-cpu-cooler.html"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh4.ggpht.com/_V1tbWNn9eRE/SmDfdVxWdqI/AAAAAAAAAVE/4U2JJgiN1To/image48.png?imgmax=800" width="96" height="85" /&gt;&lt;/a&gt; CPU Cooler: &lt;a href="http://www.scythe-eu.com/en/products/cpu-cooler/kabuto-cpu-cooler.html"&gt;Scythe Kabuto&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A top blower cooler, which should help cooling the components around the CPU. With a 120mm fan and a airflow of about 74 CFM (cubic feet per minute) it should operate silent but also keep the CPU cool.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.coolermaster.com/products/product.php?act=detail&amp;amp;id=4199"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh4.ggpht.com/_V1tbWNn9eRE/SmCyZT4edLI/AAAAAAAAAVI/wfj5BDz7vZc/image38.png?imgmax=800" width="96" height="96" /&gt;&lt;/a&gt;PSU: &lt;a href="http://www.coolermaster.com/products/product.php?act=detail&amp;amp;id=4199"&gt;Cooler Master Silent Pro M600&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Very silent, very good efficiency in low to medium workloads and very good protection against surges, bursts etc. Its 600 watts should be enough since I don’t plane to build a SLI system (two or more graphic cards). If you want build a pure gaming PC with SLI, there are better PSUs for that. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.patriotmemory.com/products/detailp.jsp?prodline=5&amp;amp;catid=23&amp;amp;prodgroupid=110&amp;amp;id=763&amp;amp;type=1"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SmDfeCH1kII/AAAAAAAAAVQ/LwqSfX71jIE/image39.png?imgmax=800" width="96" height="72" /&gt;&lt;/a&gt; Memory: &lt;a href="http://www.patriotmemory.com/products/detailp.jsp?prodline=5&amp;amp;catid=23&amp;amp;prodgroupid=110&amp;amp;id=763&amp;amp;type=1"&gt;Patriot Viper Series DDR3 6GB (3 x 2GB) PC3-12800 Low Latency DIMM Kit (PVT36G1600LLK)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is on the &lt;a href="http://www.giga-byte.com/FileList/MemorySupport/motherboard_memory_ga-ex58-ud4p.pdf"&gt;list of supported memory modules&lt;/a&gt; from Gigabyte and DDR3-1600 MHz speed will give me enough bandwidth when I try to overclock the CPU. And if overclocking fails: They look good too. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.samsung.com/global/business/hdd/productmodel.do?group=72&amp;amp;type=61&amp;amp;subtype=78&amp;amp;model_cd=443&amp;amp;ppmi=1170"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh3.ggpht.com/_V1tbWNn9eRE/SmDfeSrdSFI/AAAAAAAAAVU/J0fYkxXsYSw/image43.png?imgmax=800" width="84" height="73" /&gt;&lt;/a&gt; Hard disks: &lt;a href="http://www.samsung.com/global/business/hdd/productmodel.do?group=72&amp;amp;type=61&amp;amp;subtype=78&amp;amp;model_cd=443&amp;amp;ppmi=1170"&gt;Samsung EcoGreen F2 HD103SI&lt;/a&gt; (four times)&lt;/p&gt;  &lt;p&gt;932 GB is more than I need, but it’s good to know that I never ever get the “HD full” message again. Beside this, this is a 5400 rpm (rounds per minute) drive and still has a performance of 105-121 MB/sec. This looked to me like the ideal compromise between silent operation and good performance. The switch between slower/silent and faster/louder will be explained in a different post.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.antec.com/Believe_it/product.php?id=ODg4"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh6.ggpht.com/_V1tbWNn9eRE/SmDfe_XCrgI/AAAAAAAAAVY/CMZiazOR-Fs/image52.png?imgmax=800" width="73" height="73" /&gt;&lt;/a&gt; Case: &lt;a href="http://www.antec.com/Believe_it/product.php?id=ODg4"&gt;Antec Twelve Hundred&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This case has three 120 mm fan on the front, two 120 mm on the back and a 200 mm fan on the top. This should allow a very good cooling and (with good fans) a very silent operation. If you think I choose it because of the “cool” blue fans it has: No, since I will replace all (except one) of them. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5177219494979102936?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5177219494979102936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5177219494979102936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5177219494979102936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5177219494979102936'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/07/hexagon-v3-part-1-components.html' title='Hexagon v3: Part 1 - Components'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_V1tbWNn9eRE/SmCwP3Q46XI/AAAAAAAAAUw/MEbUqE7TtWc/s72-c/image%5B21%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7739888530805051129</id><published>2009-04-18T03:56:00.001-07:00</published><updated>2009-04-18T03:56:41.278-07:00</updated><title type='text'>Xteq GetOSVersion 3.1 available</title><content type='html'>&lt;p&gt;We have just updated &lt;a href="http://www.xteq.com/products/geto/"&gt;Xteq GetOSVersion&lt;/a&gt; (XQGetOSVer) to Version 3.1, now supporting also Windows 7.&lt;/p&gt;  &lt;p&gt;XQGetOSVer returns a number for each detected OS (Windows 95 up to Windows Server 2008 and Windows 7) and can therefore easily be used for batch files where you want to execute special commands depending on the OS in use. It is released as freeware, so you can use it right away.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7739888530805051129?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7739888530805051129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7739888530805051129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7739888530805051129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7739888530805051129'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/04/xteq-getosversion-31-available.html' title='Xteq GetOSVersion 3.1 available'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6138649884107693470</id><published>2009-04-16T08:04:00.001-07:00</published><updated>2009-04-16T08:06:18.771-07:00</updated><title type='text'>Removing Live Search from Internet Explorer 8</title><content type='html'>This week, we had to prepare an Internet Explorer 8 rollout at a customers side. This customer had very strict requirements which Accelerators, Links and Search providers should be installed.   &lt;p&gt;We thought this should be no problem with the &lt;a href="http://technet.microsoft.com/en-us/ie/bb219517.aspx"&gt;Internet Explorer Administration Kit (IEAK)&lt;/a&gt; so we created a package with it. We added the search providers, accelerators and links the customer wanted to have and imported them with IEAK to the package we wanted to created while also activating the option that no default items should be added. &lt;/p&gt;  &lt;p&gt;Using VMWare Workstation we then tested our package (did I mentioned which great invention Snapshots are?) and everything looked quite good except that the search box beside the address bar still showed Live Search (not as default, but anyway) like this:&lt;/p&gt;  &lt;p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SedJWY3djjI/AAAAAAAAATI/6uoaqY_1kT0/s1600-h/IE8WithLiveSearch.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 223px;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SedJWY3djjI/AAAAAAAAATI/6uoaqY_1kT0/s400/IE8WithLiveSearch.JPG" alt="" id="BLOGGER_PHOTO_ID_5325305733369925170" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After several tests we are sure this wasn't a failure inside the package, but instead some "by design" issue. Tracking this down inside the registry we found that IE8 get's the list of Search providers from  &lt;br /&gt;&lt;em&gt;HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes&lt;/em&gt;.   &lt;br /&gt;However, it also checks   &lt;br /&gt;&lt;em&gt;&lt;strong&gt;HKEY_LOCAL_MACHINE&lt;/strong&gt;\Software\Microsoft\Internet Explorer\SearchScopes&lt;/em&gt;   &lt;br /&gt;and if it finds a search provider there that is not already shown, it will simply display it as well. And Live Search did come from this HKLM key. &lt;/p&gt;  &lt;p&gt;We resolved this issue by NOT adding any search provider inside the package and executing two batch files after the installation of IE.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;IESearchProvider_UserSet.bat&lt;/em&gt; will remove Live Search from the HKCU SearchScopes, add Google (from &lt;em&gt;IESearchProvider_GoogleSearch_User.reg&lt;/em&gt;) and make this the default.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;IESearchProvider_ComputerSet.bat&lt;/em&gt; will remove Live Search from the &lt;strong&gt;HKLM&lt;/strong&gt; SearchScopes, add Google (from &lt;em&gt;IESearchProvider_GoogleSearch_Computer.reg&lt;/em&gt;) and make this the default.&lt;/p&gt;  &lt;p&gt;Both scripts work identically, except one check HKCU and the other HKLM. Both check if the Google search provider is already installed (we have created our own GUID for this) and if not it will be added, set as the default and finally deleting the Live search provider. &lt;/p&gt;  &lt;p&gt;We have added these commands to the Internet Explorer GPO (..UserSet.bat to the user scripts, ...ComputerSet to the computer scripts). And don't worry: This script will work even if IE8 is not rolled out, IE7 can use the Google search provider as well.&lt;/p&gt;  &lt;p&gt;You can download all files &lt;a href="http://www.texhex.info/download/IE8SearchProvider.zip"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6138649884107693470?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6138649884107693470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6138649884107693470' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6138649884107693470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6138649884107693470'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/04/removing-live-search-from-internet.html' title='Removing Live Search from Internet Explorer 8'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SedJWY3djjI/AAAAAAAAATI/6uoaqY_1kT0/s72-c/IE8WithLiveSearch.JPG' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7357395142552127070</id><published>2009-04-07T07:18:00.000-07:00</published><updated>2009-04-16T07:27:42.690-07:00</updated><title type='text'>A script for fixing WMI problems</title><content type='html'>&lt;p&gt;The last two months, I was helping a client to get his network running smoothly again. One of the topics were strange errors within various applications and problems with machines that did not received any update from the central Windows Server Update Services.&lt;/p&gt;  &lt;p&gt;To cut a long story short, this all was caused by the WMI (Windows Management Instrumentation) service not working correctly. One very often rolled out image was broken in that area so 70% of all computers had a broken WMI installation.&lt;/p&gt;  &lt;p&gt;After some research, I created a WMI Fixer batch file that was able to fix the WMI installation of nearly all machines (&amp;gt;400), except three we were forced to reinstall. &lt;/p&gt;  &lt;p&gt;I took the idea from a script of David H. Lipman from &lt;a href="http://www.pcreview.co.uk/forums/thread-1898592.php"&gt;this forum post&lt;/a&gt;, added some checking logic and also added some code from the &lt;a href="http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx"&gt;WMI Isn't Working&lt;/a&gt; page. &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;@cls     &lt;br /&gt;echo off      &lt;br /&gt;Rem       &lt;br /&gt;Rem Original by David H. Lipman: &lt;/em&gt;&lt;a href="http://www.pcreview.co.uk/forums/thread-1898592.php"&gt;&lt;em&gt;http://www.pcreview.co.uk/forums/thread-1898592.php&lt;/em&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;Rem See also: &lt;/em&gt;&lt;a href="http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx"&gt;&lt;em&gt;http://www.microsoft.com/technet/scriptcenter/topics/help/wmi.mspx&lt;/em&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;Rem &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;SET WMIRoot=%windir%\system32\wbem     &lt;br /&gt;SET Rep_Bad=Repository_bad &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo WMI Fixer Batch v1.2     &lt;br /&gt;echo Copyright (C) 2008 Xteq Systems      &lt;br /&gt;echo &lt;/em&gt;&lt;a href="http://www.xteq.com/"&gt;&lt;em&gt;http://www.xteq.com/&lt;/em&gt;&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;echo. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Setting TEMP as current directory     &lt;br /&gt;cd /d %TEMP% &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;if exist %WMIRoot% goto Stop_Services     &lt;br /&gt;echo WMI doesn't seem to be installed here! Starting WMICore.exe...      &lt;br /&gt;wmicore /s      &lt;br /&gt;echo Creating folder WBEM&amp;#160; &lt;br /&gt;mkdir %WMIROOT% &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:Stop_Services     &lt;br /&gt;echo Trying to stop service...      &lt;br /&gt;net stop winmgmt /y &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Using kill switch to make sure WMI has stopped...     &lt;br /&gt;winmgmt /kill &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Switching to %WMIRoot%     &lt;br /&gt;cd /d %WMIRoot% &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Checking if folder %Rep_Bad% exists and delete it if necessary      &lt;br /&gt;if exist %Rep_Bad% rd %Rep_Bad% /s /q &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Moving current Repository to %Rep_Bad%..     &lt;br /&gt;rename Repository %Rep_Bad% &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Registering all DLL files...     &lt;br /&gt;echo on      &lt;br /&gt;@for %%i in (*.dll) do RegSvr32 -s %%i      &lt;br /&gt;@echo off &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo Registering all EXE files...     &lt;br /&gt;for %%i in (*.exe) do call :FixSrv %%i      &lt;br /&gt;REM for %%i in (*.mof,*.mfl) do Mofcomp %%i      &lt;br /&gt;Rem not used &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;net start winmgmt     &lt;br /&gt;echo Done!      &lt;br /&gt;goto Ende &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:FixSrv     &lt;br /&gt;if /I (%1) == (mofcomp.exe) goto SkipSrv      &lt;br /&gt;if /I (%1) == (wmic.exe) goto SkipSrv      &lt;br /&gt;if /I (%1) == (wbemcntl.exe) goto SkipSrv      &lt;br /&gt;if /I (%1) == (wbemtest.exe) goto SkipSrv &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;echo on     &lt;br /&gt;%1 /RegServer      &lt;br /&gt;@echo off      &lt;br /&gt;:SkipSrv      &lt;br /&gt;goto LongTail &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:Ende &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;pause     &lt;br /&gt;exit 0 &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;:LongTail &lt;/em&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7357395142552127070?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7357395142552127070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7357395142552127070' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7357395142552127070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7357395142552127070'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/04/script-for-fixing-wmi-problems.html' title='A script for fixing WMI problems'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5690853301129015997</id><published>2009-03-04T02:18:00.000-08:00</published><updated>2009-03-04T02:24:07.534-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Creating a self-signed certificate for SSL</title><content type='html'>In case you want to secure an internal web server with an SSL certificate you normally can get a certificate from your PKI Administrator.&lt;br /&gt;&lt;br /&gt;However, if you only want to test something a self-signed certificate will also do the trick. The only drawback: Since it's self-signed, user will get a certificate warning when connecting to the server. For test environment however, this should be okay.&lt;br /&gt;&lt;br /&gt;I'm using the MAKECERT.EXE command from Visual Studio for this. The command to create the cert is as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"%ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\makecert" -r -pe -n "CN=my-server.corp.acme.com" -b 01/01/2000 -e 01/01/2036 -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localMachine -sky exchange -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@echo.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@echo Now start mmc.exe, add the snap-in "Certificates" and&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@echo acceess the certificate store of the local computer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@echo Below "My certificates" the newly create certifcate will be located!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;@echo.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;pause&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once this command has completed, open MMC.EXE, add the "Certificates" snap-in, select "Local computer" as the scope and the newly created certificate will be inside the "My certificates" folder.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5690853301129015997?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5690853301129015997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5690853301129015997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5690853301129015997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5690853301129015997'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/03/creating-self-signed-certificate-for.html' title='Creating a self-signed certificate for SSL'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1210168436417326307</id><published>2009-02-26T00:32:00.000-08:00</published><updated>2009-03-04T02:18:08.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Adobe Flash Player Update</title><content type='html'>Once again, there is a &lt;a href="http://www.h-online.com/security/Adobe-patches-critical-hole-in-Flash-Player-but-PDF-hole-remains-open--/news/112717"&gt;security hole in Adobe Flash&lt;/a&gt; and everyone should update to version 10.0.22.87 (open &lt;a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507&amp;amp;sliceId=1"&gt;Flash Player Version Display&lt;/a&gt; in case you want to know the version of your Flash Player).&lt;br /&gt;&lt;br /&gt;Home users can easily go to the &lt;a href="http://get.adobe.com/flashplayer/"&gt;Get Flash page&lt;/a&gt; from Adobe and update their player. No big deal.&lt;br /&gt;&lt;br /&gt;However, in a company with more than 500 computers, users are normally not allowed to install any software and any ActiveX/XPI download is blocked. Means: All these users can't update their flash player; it must be installed by the IT.&lt;br /&gt;&lt;br /&gt;Normally this isn't a big problem at all since the Flash player for Internet Explorer is just an OCX file that you can easily replace. Starting with version 10, Adobe patches the security ACL for this file and denies the user EVERYONE the access to write the attributes for the OCX. Before they do this, they set the attributes of the file to READ-ONLY.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Boink&lt;/span&gt;, you can't copy the new OCX file because it's marked READ-ONLY. ATTRIB –R does also not help, because the ACL on the file prevent you from doing this. To make a long story short: In order to update Adobe Flash manually you need to perform the following steps.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Get a new Flash OCX from Adobe. Easiest way possible is to use one machine that is directly connected to the internet and update Flash from the &lt;a href="http://get.adobe.com/flashplayer/"&gt;Get Flash Page&lt;/a&gt; page.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Copy the Flash OCX from C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx to a network share where all machines have access to.&lt;/li&gt;&lt;li&gt;Use the following batch file which will first delete the old Flash OCX, then patch the ACLs on the file, which will allow us to change the attributes using ATTRIB (remove READ-ONLY) which ultimately allows us to copy the OCX file.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SET FOLDER=%SYSTEMROOT%\system32\Macromed\Flash&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SET OLDFILE1=%FOLDER%\Flash10a.ocx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SET NEWFILE=%~dp0flash10b.ocx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SET NEWFILE_DEST=%FOLDER%\Flash10b.ocx&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;IF NOT EXIST %FOLDER%. GOTO ENDE &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;IF EXIST %OLDFILE% DEL %OLDFILE1%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CACLS %NEWFILE_DEST% /E /R Everyone&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;CACLS %NEWFILE_DEST% /E /R Jeder&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo j|CACLS %NEWFILE_DEST% /E /G Users:F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo y|CACLS %NEWFILE_DEST% /E /G Users:F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo j|CACLS %NEWFILE_DEST% /E /G Benutzer:F&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo y|CACLS %NEWFILE_DEST% /E /G Benutzer:F&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ATTRIB -R %NEWFILE_DEST%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;COPY %NEWFILE% %NEWFILE_DEST% /Y /V&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;regsvr32.exe %NEWFILE_DEST% /S&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;:ende&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note: This script will not install Flash, it will just update it. And it only updates Flash for Internet Explorer, not for Firefox or any other Browser.  That every call to CACLS is duplicated is simply due to the fact that we also have German machines which expect "J" for JA instead of "Y" for YES.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1210168436417326307?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1210168436417326307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1210168436417326307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1210168436417326307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1210168436417326307'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/02/adobe-flash-player-update.html' title='Adobe Flash Player Update'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7812794892285508906</id><published>2009-02-04T01:22:00.000-08:00</published><updated>2009-02-05T00:38:18.559-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>.Net DateTime vs. TickCount compare operations</title><content type='html'>Yesterday, a friend of mine called me. He is writing a small program for a client and this program should execute simple operations at a given time. These operations don't take very long, but there will be a lot of checks in a second to make sure that the operation starts (nearly) exactly at the given time.&lt;br /&gt;&lt;br /&gt;My friend has concerns that a simple "TriggerDate&gt;DateTime.UtcNow" would take to long so he started to use Environment.Ticks. The Ticks operation is for sure faster, because this is only a simple addition and comparsion. However, the ticks will go from Int.MinValue to Int.MaxValue in about 49 days, when the counter will flip back to Int.MinValue. This caused him a lot of headache.&lt;br /&gt;&lt;br /&gt;I first tried to improve his code, when I realized I first need to determine how much slower is a DateTime comparison. So I wrote the following small test code:&lt;br /&gt;&lt;br /&gt;     private void CheckDateTime()&lt;br /&gt;     {&lt;br /&gt;DateTime dtStart = dtNow   new TimeSpan(0, 0, 5);&lt;br /&gt;long iCount = 0;&lt;br /&gt;&lt;br /&gt;         DateTime dtNow = DateTime.UtcNow;&lt;br /&gt;&lt;br /&gt;         for (; DateTime.UtcNow &amp;lt; dtStart; iCount  )&lt;br /&gt;         {&lt;br /&gt;         }&lt;br /&gt;         PrintResult(dtNow, iCount);&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     private void CheckTicks()&lt;br /&gt;     {&lt;br /&gt;int iTick = Environment.TickCount &amp;amp; int.MaxValue;&lt;br /&gt;         int iTickStart = iTick   (5 * 1000);&lt;br /&gt;&lt;br /&gt;         long iCount = 0;&lt;br /&gt;&lt;br /&gt;         DateTime dtNow = DateTime.UtcNow;&lt;br /&gt;&lt;br /&gt;         for (; (Environment.TickCount &amp;amp; int.MaxValue) &amp;lt; iTickStart; iCount  )&lt;br /&gt;         {&lt;br /&gt;         }&lt;br /&gt;         PrintResult(dtNow, iCount);&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     private void PrintResult(DateTime starttime, long Operations)&lt;br /&gt;     {&lt;br /&gt;         DateTime dtNewNow = DateTime.UtcNow;&lt;br /&gt;&lt;br /&gt;         TimeSpan elapsed = starttime - dtNewNow;&lt;br /&gt;&lt;br /&gt;         textBox1.Text  = "Time: "   elapsed.TotalSeconds.ToString()   "\r\n";&lt;br /&gt;         textBox1.Text  = "Operations: "   Operations.ToString()   "\r\n";&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The result: On a standard 1.8 GHz Intel Core 2 machine (E2160), I had 192 million DateTime comparisons in about 5 seconds and 593 million TickCount comparisons. This means: My computer is able to do a whopping &lt;span style="font-weight: bold;"&gt;39 millions DateTime comparisons/second&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;120 million TickCount comparisons/second&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Conclusion: Yes, DateTime is slower than checking Ticks, but given these figures you really don't need to care about this difference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7812794892285508906?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7812794892285508906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7812794892285508906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7812794892285508906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7812794892285508906'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/02/net-datetime-vs-tickcount-compare.html' title='.Net DateTime vs. TickCount compare operations'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6859096556750981227</id><published>2009-02-02T10:17:00.000-08:00</published><updated>2009-02-02T10:21:00.203-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Calculating when an integer identity column will be exhausted</title><content type='html'>Last week, we had an interesting discussion with a client which data type an identity column on a table should have. We are working with this client on a redesign of an in-house LOB.&lt;br /&gt;&lt;br /&gt;In particular, we were discussing one table that we expecting to have one to two new rows per second each day. The customer wanted to define the identity as bigint, while we said that integer (int) is enough and faster for sure.  What would you think how long it takes until an integer column as identity will "explode" on this table? Two Month? Three Years?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well, if we calculate with three changes per second it would actually take 23 years!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/SYc5DFXnj4I/AAAAAAAAASU/yTKY-gF4Ueo/s1600-h/int_exhausted_calc.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 378px;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/SYc5DFXnj4I/AAAAAAAAASU/yTKY-gF4Ueo/s400/int_exhausted_calc.jpg" alt="" id="BLOGGER_PHOTO_ID_5298266211768307586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In case you find this Excel file useful, you can &lt;a href="http://www.texhex.info/download/Int_Exhausted_Calc.zip"&gt;download it here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6859096556750981227?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6859096556750981227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6859096556750981227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6859096556750981227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6859096556750981227'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/02/calculating-when-integer-identity.html' title='Calculating when an integer identity column will be exhausted'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_V1tbWNn9eRE/SYc5DFXnj4I/AAAAAAAAASU/yTKY-gF4Ueo/s72-c/int_exhausted_calc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3875080602492354953</id><published>2009-01-30T02:00:00.000-08:00</published><updated>2009-02-04T01:26:51.499-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>IF EXIST for directories</title><content type='html'>Sometimes you simply need to use batch files, although they are something from the past. In a current project, a custom made service wanted to copy a given file using a batch file. This didn't worked on all machines, because the customer has started to roll out MUI installations where the userprofile folder differs:&lt;br /&gt;&lt;br /&gt;Default Windows XP (German) profile folder: &lt;span style="font-style: italic;"&gt;C:\Dokumente und Einstellungen\&lt;/span&gt;&lt;br /&gt;Default Windows XP (MUI) profile folder: &lt;span style="font-style: italic;"&gt;C:\Document and Settings\&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The solution (seems) rather simple:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;IF EXIST "%SYSTEMDRIVE%\Dokumente und Einstellungen" GOTO DEUTSCH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Well, this doesn't work because IF EXIST can only check for files, but not for folders. The trick is to append "\." at the end because every folder contains this "virtual file". Therefore, the batch would look like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;IF EXIST "%SYSTEMDRIVE%\Dokumente und Einstellungen\." GOTO DEUTSCH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;GOTO ENGLISH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;:DEUTSCH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;echo German XP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;goto ende&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;:ENGLISH&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;echo English or MUI XP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;goto ende&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;:ende&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;pause&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3875080602492354953?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3875080602492354953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3875080602492354953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3875080602492354953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3875080602492354953'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/01/if-exist-for-directories.html' title='IF EXIST for directories'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7063968718070299267</id><published>2009-01-21T02:32:00.000-08:00</published><updated>2009-02-02T10:22:07.818-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>DHCP Error: Service provider could not loaded or initialized</title><content type='html'>I just had to fix a Windows XP machine that displayed the following error message in event log:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Event Type: Warning&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Event Source: Dhcp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Event Category: None&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Event ID: 1006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Description:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Your computer was unable to automatically configure the IP parameters for the Network Card with the network address XXXXXXX. The following error occurred during configuration: The requested service provider could not be loaded or initialized.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The computer did not receive any DHCP address and instead always used a automatically assigned one (169.x.x.x).  Trying &lt;span style="font-style: italic;"&gt;ipconfig /renew&lt;/span&gt; also resulted in the exact same message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;An error occurred while renewing interface Local Area Connection. The requested service provider could not loaded or initialized.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This has happened after the removal of an UMTS (3G) Network card. The solution is rather simple: Just enter&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;netsh winsock reset catalog&lt;/span&gt; (&lt;a href="http://windowsxp.mvps.org/winsock.htm"&gt;More information&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;inside a command prompt After that command, the computer was back to normal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7063968718070299267?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7063968718070299267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7063968718070299267' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7063968718070299267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7063968718070299267'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/01/dhcp-error-service-provider-could-not.html' title='DHCP Error: Service provider could not loaded or initialized'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7107562104079453583</id><published>2009-01-12T08:06:00.000-08:00</published><updated>2009-01-12T08:11:52.921-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Amazon A9 gone mad</title><content type='html'>Normally Amazon finds what I'm looking for. But searching for a "Fritz! Box", a router with WLAN, VoIP options etc. in &lt;span style="font-style: italic;"&gt;Black &lt;/span&gt;(&lt;span style="font-style: italic;"&gt;schwarz &lt;/span&gt;in German) resulted in these three results.&lt;br /&gt;&lt;br /&gt;The first result one is okay, result two is not really what I was searching for but the last result is really insane: Swimmies!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SWtrR_eTCSI/AAAAAAAAASM/BfzERyfD3Xo/s1600-h/amazon_gonebad2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 502px; height: 229px;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SWtrR_eTCSI/AAAAAAAAASM/BfzERyfD3Xo/s400/amazon_gonebad2.JPG" alt="" id="BLOGGER_PHOTO_ID_5290440144117238050" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7107562104079453583?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7107562104079453583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7107562104079453583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7107562104079453583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7107562104079453583'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/01/amazon-a9-gone-mad.html' title='Amazon A9 gone mad'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SWtrR_eTCSI/AAAAAAAAASM/BfzERyfD3Xo/s72-c/amazon_gonebad2.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-4274338562054673447</id><published>2009-01-06T23:30:00.000-08:00</published><updated>2009-01-06T23:32:26.703-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Please replace the non-existent hard drive</title><content type='html'>I just love HP ProLiant Servers. I think I have set up nearly 100 of those in my carrier, and exactly one really failed every (main board broken). You get great support and even new drivers for servers that are out of production for three years.&lt;br /&gt;&lt;br /&gt;However, the following message I received yesterday was just so funny:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/SWRaUhLgBbI/AAAAAAAAARs/ogaGAks1ceQ/s1600-h/smartarray_replace.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 562px; height: 96px;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/SWRaUhLgBbI/AAAAAAAAARs/ogaGAks1ceQ/s400/smartarray_replace.JPG" alt="" id="BLOGGER_PHOTO_ID_5288451170990294450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;BTW: Yes I know the message comes from the fact that the drive I added had still some array information on it. But it's funny anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-4274338562054673447?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/4274338562054673447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=4274338562054673447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4274338562054673447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4274338562054673447'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2009/01/please-replace-non-existent-hard-drive.html' title='Please replace the non-existent hard drive'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_V1tbWNn9eRE/SWRaUhLgBbI/AAAAAAAAARs/ogaGAks1ceQ/s72-c/smartarray_replace.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-623327080240783634</id><published>2008-12-22T13:27:00.001-08:00</published><updated>2008-12-22T13:52:17.907-08:00</updated><title type='text'>RPO and RTO</title><content type='html'>As soon as you start to deal with backup strategies, you will come across two abbreviations you need to deal with: RTO and RPO.&lt;br /&gt;&lt;br /&gt;Recovery Time Objective (RTO) simply means the time in minutes until a crashed system is up and running again. For example, if your backup server is able to restore your entire file server within 60 minutes, you have a RTO of 60. &lt;br /&gt;&lt;br /&gt;However, this does not say anything about if the data you have restored were from one hour ago, yesterday or from last year. This is defined by the Recovery Point Objective (RPO).&lt;br /&gt;&lt;br /&gt;A quick example: You save your file server every night at 20:00 (8pm). One day, all data on this server is lost at 11:00 (11am). You then do the restore and everything is up and running again at 13:00 (1pm). &lt;br /&gt;&lt;br /&gt;In this example, you had an Recovery Time Objective (RTO) of 120 minutes (11:00 - 13:00). The Recovery Point Objective (RPO) was however 15 hours (20:00 - 11:00).&lt;br /&gt;&lt;br /&gt;Dealing with these values can be quite challenging, but sometimes the biggest problem is not to confuse RTO with RPO.&lt;br /&gt;&lt;br /&gt;I simply remember RTO as "Ready to gO" (after a crash) so RPO means how old the backup can be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-623327080240783634?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/623327080240783634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=623327080240783634' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/623327080240783634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/623327080240783634'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/12/rpo-and-rto.html' title='RPO and RTO'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2196429673414298187</id><published>2008-12-19T11:57:00.001-08:00</published><updated>2009-02-02T10:22:24.639-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Fixing the local Live Mesh client</title><content type='html'>&lt;p&gt;In case you are also playing with &lt;a href="http://www.mesh.com/"&gt;Live Mesh from Microsoft&lt;/a&gt;, you might end up that the synchronization between your local Live Mesh client and the server goes havoc.&lt;/p&gt;  &lt;p&gt;In my case, I didn't had any folders in my mesh but my local client still showed several folders as being available inside the mesh. Trying to delete them from the "Live Mesh Folders" resulted in this nice error message:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Request to MOE failed with status code     &lt;br /&gt;404 Resource not found&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If this happens to you, simply should down the Live Mesh client, then search the your computer where MOE.exe is located. On my Vista box, it was &lt;em&gt;C:\Users\TeX HeX\AppData\Local\Microsoft\Live Mesh\GacBase\&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Inside that folder, you will find a folder called Store. Simply delete it and start the client again. Although it will have forgotten all settings, the "Zombie" folders are gone as well. &lt;/p&gt;  &lt;p&gt;BTW: In case the client does not accept a folder inside the "Synchronize folder with this computer" (Error 400): Check if the folder is not on a removable medium (USB Stick, SD Card). Live mesh seems to accept hard drives only at this time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2196429673414298187?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2196429673414298187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2196429673414298187' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2196429673414298187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2196429673414298187'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/12/fixing-local-live-mesh-client.html' title='Fixing the local Live Mesh client'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3707512095026441896</id><published>2008-11-18T11:29:00.000-08:00</published><updated>2008-11-18T11:34:39.611-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Fable 2 bug collection</title><content type='html'>Don't get me wrong: Fable II is a great game and I enjoyed playing it. However, sometimes the engine just fails badly. But it funny anyhow....&lt;br /&gt;&lt;br /&gt;Grilled chicken&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2phG56MNmSE&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/2phG56MNmSE&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Flying dead body&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/3L_0xW6C2aE&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/3L_0xW6C2aE&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Dog wayfinding (sort of)&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/FgEJEO4w2iQ&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/FgEJEO4w2iQ&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Fancy lady twins&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/SYxrauPrZPI&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/SYxrauPrZPI&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3707512095026441896?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3707512095026441896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3707512095026441896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3707512095026441896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3707512095026441896'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/11/fable-2-bug-collection.html' title='Fable 2 bug collection'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-4340844705293175525</id><published>2008-11-18T09:44:00.000-08:00</published><updated>2008-11-18T10:00:42.557-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>10.000G - Finally</title><content type='html'>After playing for three years, I was finally able to pass 10K of "G" points on XBOX Live. Yeah!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_V1tbWNn9eRE/SSL_OxzLt3I/AAAAAAAAAOM/PdxmhACHEkU/s1600-h/10000g2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 232px; height: 144px;" src="http://3.bp.blogspot.com/_V1tbWNn9eRE/SSL_OxzLt3I/AAAAAAAAAOM/PdxmhACHEkU/s320/10000g2.jpg" alt="" id="BLOGGER_PHOTO_ID_5270055143328167794" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-4340844705293175525?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/4340844705293175525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=4340844705293175525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4340844705293175525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4340844705293175525'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/11/finally.html' title='10.000G - Finally'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_V1tbWNn9eRE/SSL_OxzLt3I/AAAAAAAAAOM/PdxmhACHEkU/s72-c/10000g2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5684455236667256804</id><published>2008-11-11T23:13:00.000-08:00</published><updated>2008-11-11T23:39:24.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>SSIS XML Destination</title><content type='html'>Today, I needed to create a transmogrification that reads from a SQL Server table and creates a XML file.&lt;br /&gt;&lt;br /&gt;The destination format included 98% mandatory fields and only two percent of data from the table. Easy: Read the data from SQL Server into a very simple XML file and then use a XSLT style sheet to transform it into the destination XML format.&lt;br /&gt;&lt;br /&gt;First problem: SSIS does not have a XML destination. Fortunately, I found the following code that you can use inside a destination script component (Create a new data flow, drop a script component on it, select “Destination” as type and then copy and paste this code into the component, overwriting any existing code).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Imports System&lt;br /&gt;Imports System.Data&lt;br /&gt;Imports System.Math&lt;br /&gt;Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper&lt;br /&gt;Imports Microsoft.SqlServer.Dts.Runtime.Wrapper&lt;br /&gt;Imports System.IO&lt;br /&gt;Imports System.Reflection&lt;br /&gt;&lt;br /&gt;Public Class ScriptMain&lt;br /&gt; Inherits UserComponent&lt;br /&gt;&lt;br /&gt; Private rootElement As String = "Root"&lt;br /&gt; Private rowElement As String = "Row"&lt;br /&gt;&lt;br /&gt; Private targetFile As String&lt;br /&gt; Private xmlWriter As StreamWriter&lt;br /&gt; Private columns As Integer()&lt;br /&gt; Private columnames As String()&lt;br /&gt;&lt;br /&gt; Public Overrides Sub AcquireConnections(ByVal Transaction As Object)&lt;br /&gt;     targetFile = CType(Me.Connections.Destination.AcquireConnection(Nothing), String)&lt;br /&gt; End Sub&lt;br /&gt;&lt;br /&gt; Public Overrides Sub PreExecute()&lt;br /&gt;     xmlWriter = New StreamWriter(targetFile, False)&lt;br /&gt;     xmlWriter.WriteLine(FormatElement(rootElement))&lt;br /&gt;&lt;br /&gt;     Dim input As IDTSInput90 = ComponentMetaData.InputCollection(0)&lt;br /&gt;&lt;br /&gt;     ReDim columns(input.InputColumnCollection.Count)&lt;br /&gt;     columns = Me.GetColumnIndexes(input.ID)&lt;br /&gt;&lt;br /&gt;     Dim column As IDTSInputColumn90&lt;br /&gt;     ReDim columnames(input.InputColumnCollection.Count)&lt;br /&gt;&lt;br /&gt;     Dim counter As Integer&lt;br /&gt;     counter = 0&lt;br /&gt;&lt;br /&gt;     For Each column In Me.ComponentMetaData.InputCollection(0).InputColumnCollection&lt;br /&gt;         columnames(counter) = column.Name&lt;br /&gt;         counter = counter   1&lt;br /&gt;     Next&lt;br /&gt;&lt;br /&gt; End Sub&lt;br /&gt;&lt;br /&gt; Public Overrides Sub PostExecute()&lt;br /&gt;     xmlWriter.WriteLine(FormatElement(rootElement, True))&lt;br /&gt;     xmlWriter.Close()&lt;br /&gt; End Sub&lt;br /&gt;&lt;br /&gt; Public Overrides Sub ProcessInput(ByVal InputID As Integer, ByVal Buffer As Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer)&lt;br /&gt;&lt;br /&gt;     While Buffer.NextRow()&lt;br /&gt;         xmlWriter.Write(FormatElement(rowElement))&lt;br /&gt;&lt;br /&gt;         Dim counter As Integer&lt;br /&gt;         counter = 0&lt;br /&gt;&lt;br /&gt;         For Each index As Integer In columns&lt;br /&gt;             Dim value As Object = Buffer(index)&lt;br /&gt;             xmlWriter.Write(FormatElement(columnames(counter).ToString())   value.ToString()   FormatElement(columnames(counter).ToString(), True))&lt;br /&gt;             counter = counter   1&lt;br /&gt;         Next&lt;br /&gt;&lt;br /&gt;         xmlWriter.WriteLine(FormatElement(rowElement, True))&lt;br /&gt;     End While&lt;br /&gt; End Sub&lt;br /&gt;&lt;br /&gt; Private Function FormatElement(ByVal elementName As String) As String&lt;br /&gt;     Return FormatElement(elementName, False)&lt;br /&gt; End Function&lt;br /&gt;&lt;br /&gt; Private Function FormatElement(ByVal elementName As String, ByVal closingTag As Boolean) As String&lt;br /&gt;     Dim returnValue As String&lt;br /&gt;&lt;br /&gt;     If closingTag Then&lt;br /&gt;         returnValue = "&amp;lt;/"&lt;br /&gt;     Else&lt;br /&gt;         returnValue = "&amp;lt;"&lt;br /&gt;     End If&lt;br /&gt;&lt;br /&gt;     returnValue  = elementName   "&amp;gt;"&lt;br /&gt;     Return returnValue&lt;br /&gt; End Function&lt;br /&gt;&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Please note: I ripped this code from somewhere on the internet but I was not able to find out the original author.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using this code, you will get a very simple XML file that you can transmogrify using XSLT. Because this should happen within SSIS, the best way to use a command-line XSLT processor and the best one I was able to find was &lt;a href="http://www.xmllab.net/Products/nxslt2/tabid/73/Default.aspx"&gt;nsxlt2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Just drop an “Execute process” component to launch nsxlt2 and configure the arguments like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;\\srv\test\Source.xml \\srv\test\SimpleXML2Destination.xslt -o \\srv\\test\DestFormat.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And you are done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5684455236667256804?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5684455236667256804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5684455236667256804' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5684455236667256804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5684455236667256804'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/11/ssis-xml-destination.html' title='SSIS XML Destination'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5701049976387708161</id><published>2008-11-05T03:38:00.000-08:00</published><updated>2008-11-05T03:40:27.142-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>For more information: Go 404</title><content type='html'>Update found, for more details go to "File not Found". Great Symantec!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SRGF_CXYCiI/AAAAAAAAAOE/o86yq1QhWOI/s1600-h/BE12_liveupdate_desc_404.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 304px;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SRGF_CXYCiI/AAAAAAAAAOE/o86yq1QhWOI/s400/BE12_liveupdate_desc_404.JPG" alt="" id="BLOGGER_PHOTO_ID_5265136757385988642" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5701049976387708161?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5701049976387708161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5701049976387708161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5701049976387708161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5701049976387708161'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/11/for-more-information-go-404.html' title='For more information: Go 404'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SRGF_CXYCiI/AAAAAAAAAOE/o86yq1QhWOI/s72-c/BE12_liveupdate_desc_404.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1701294596773681809</id><published>2008-11-02T10:01:00.000-08:00</published><updated>2008-11-18T10:09:59.390-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>No Flatrate + Boy + XBOX = Lots of trouble</title><content type='html'>Got a call from a friend of mine. He was complaining that he must have a Trojan horse on his computer since his ISP told him he had downloaded more than 4 GB of data (he only has a 500MB/month rate).&lt;br /&gt;&lt;br /&gt;After checking his computer for some time and didn't find anything, I suddenly heard a sound I knew: It was Castle Crashers on XBOX.&lt;br /&gt;&lt;br /&gt;So I got to the room of his boy, saw a XBOX 360 and opened the downloads:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/SSMEnfbaN0I/AAAAAAAAAOc/Ka8oX07pTxs/s1600-h/XBOX_Download2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 240px; height: 320px;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/SSMEnfbaN0I/AAAAAAAAAOc/Ka8oX07pTxs/s320/XBOX_Download2.jpg" alt="" id="BLOGGER_PHOTO_ID_5270061065451484994" border="0" /&gt;&lt;/a&gt;So much for my "You must have a unknown virus" theory...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1701294596773681809?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1701294596773681809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1701294596773681809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1701294596773681809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1701294596773681809'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/11/no-flatrate-boy-xbox-lots-of-trouble.html' title='No Flatrate + Boy + XBOX = Lots of trouble'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_V1tbWNn9eRE/SSMEnfbaN0I/AAAAAAAAAOc/Ka8oX07pTxs/s72-c/XBOX_Download2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-8784335669976872158</id><published>2008-10-22T11:07:00.001-07:00</published><updated>2008-10-22T11:08:29.404-07:00</updated><title type='text'>Eee PC 901 SSD and SD card performance/benchmark</title><content type='html'>Because I take my Eee PC 901 always with me, I'm pretty sure it will be broken in less than two years. The last Subnotebook I had had was broken because it fell down a stairway. That's when I decided I will never carry a 1k € notebook with me anymore, and use a Netbook in the future.&lt;br /&gt;&lt;br /&gt;Knowing that, I wanted to store my user profile on a disk that I can easily detach from the EEE when it's broken. The C:\ SSD is build-in so no chance to detach is. Only solution left: Either the D:\ drive (the 12 GB SSD) or a Secure Digital card. Because I have a lot of different SD cards around here, I have done some performance test with CrystalDiskMark. The list below shows the results, sorted by Random Write 4 KB (bigger values are better).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_V1tbWNn9eRE/SP9sC_Dm3-I/AAAAAAAAANc/FuH4VcPylDY/s1600-h/eee901_hd_perf.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_V1tbWNn9eRE/SP9sC_Dm3-I/AAAAAAAAANc/FuH4VcPylDY/s320/eee901_hd_perf.jpg" alt="" id="BLOGGER_PHOTO_ID_5260041688334131170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I now have my user profile on a Kingston Ultimate 133x disk and so far everything works fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-8784335669976872158?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/8784335669976872158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=8784335669976872158' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8784335669976872158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/8784335669976872158'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/10/eee-pc-901-ssd-and-sd-card.html' title='Eee PC 901 SSD and SD card performance/benchmark'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_V1tbWNn9eRE/SP9sC_Dm3-I/AAAAAAAAANc/FuH4VcPylDY/s72-c/eee901_hd_perf.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-4381551045927392895</id><published>2008-10-14T10:06:00.000-07:00</published><updated>2008-10-14T10:08:15.250-07:00</updated><title type='text'>ImageCodr.org Update</title><content type='html'>I just made some changes on &lt;a href="http://www.imagecodr.org/"&gt;ImageCodr.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Some bug fixing: We had a typo inside the footer which is now corrected. Also, the example picture we were using is no longer licensed under a CC license, so clicking on the example link resulted in an error. We are now using &lt;a href="http://www.flickr.com/photos/aussiegall/370467465/"&gt;a new photo which is also just looking great&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Finally, some people wanted to have a tooltip when hovering over the image or the CC license button (currently we only fill the ALT tag for screen readers). &lt;a href="http://www.imagecodr.org/"&gt;ImageCodr&lt;/a&gt; does now also fill the TITLE attribute which will cause Firefox and other browsers to display a tooltip as well.&lt;br /&gt;&lt;br /&gt;No idea what ImageCodr does? &lt;a href="http://www.imagecodr.org/get.php?url=http://flickr.com/photos/aussiegall/370467465/sizes/m"&gt;See this example!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-4381551045927392895?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/4381551045927392895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=4381551045927392895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4381551045927392895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/4381551045927392895'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/10/imagecodrorg-update.html' title='ImageCodr.org Update'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6596064162037610543</id><published>2008-10-08T00:45:00.000-07:00</published><updated>2009-02-02T10:22:41.031-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>MySQL Administrator Backup Error 2003 (10061)</title><content type='html'>I just tried to use MySQL Administrator to make a scheduled backup. As instructed, I created a backup project and saved the connection info.&lt;br /&gt;&lt;br /&gt;Using the GUI the Backup worked, but executing the command line (that is run with Scheduled Tasks) didn’t work. It simply log the following to the event log:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Can't connect to MySQL server on 'localhost' (10061) (Error 2003).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I looked at the command it generates and couldn’t find an error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;"C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe" "-UDC:\Documents and Settings\Administrator.ACME\Application Data\MySQL\" "-cROOT-LOCAL" "-bpFullBackup" "-btD:\MySQL5\backup\" "-bxFullBackup"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Until I realized that the extra “-“ inside my saved connection “&lt;span style="font-style: italic;"&gt;ROOT-LOCAL&lt;/span&gt;” might confuse MySQL Administrator. I renamed this connection info to "&lt;span style="font-style: italic;"&gt;ROOTLOCAL&lt;/span&gt;" and change the parameter in the command line: Bingo, everything is working.&lt;br /&gt;&lt;br /&gt;Great, even today argument parsers are causing trouble…&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6596064162037610543?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6596064162037610543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6596064162037610543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6596064162037610543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6596064162037610543'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/10/mysql-administrator-backup-error-2003.html' title='MySQL Administrator Backup Error 2003 (10061)'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-7277111502674772577</id><published>2008-09-25T06:47:00.000-07:00</published><updated>2008-09-25T06:50:03.083-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>What is the exact difference between these three?</title><content type='html'>I can't decide what to buy, can you help me?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SNuXANbmwoI/AAAAAAAAANU/YVGSzkGQc8U/s1600-h/hpundefinied.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SNuXANbmwoI/AAAAAAAAANU/YVGSzkGQc8U/s400/hpundefinied.JPG" alt="" id="BLOGGER_PHOTO_ID_5249955820491686530" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-7277111502674772577?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/7277111502674772577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=7277111502674772577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7277111502674772577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/7277111502674772577'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/09/what-is-exact-difference-between-these.html' title='What is the exact difference between these three?'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SNuXANbmwoI/AAAAAAAAANU/YVGSzkGQc8U/s72-c/hpundefinied.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6431780302535886052</id><published>2008-09-17T23:25:00.001-07:00</published><updated>2008-09-25T06:39:40.129-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>Windows Search Server (SharePoint): An unexpected error has occurred.</title><content type='html'>I have a sort of a „Love/Hate“ relationship with SharePoint. I like the product because I think it offers a lot you can do with it, but I hate it when it comes to troubleshooting.&lt;br /&gt;&lt;br /&gt;This time, I have setup Windows Search Server 2008 and it works just perfectly on our site. I then gave the URL to somebody else from a different site and he only got &lt;span style="font-style: italic;"&gt;An unexpected error has occurred&lt;/span&gt;. Great, here we go again.&lt;br /&gt;&lt;br /&gt;The first thing is to turn on real error messages, not this stupid “Something went wrong, but I won’t tell you”.&lt;br /&gt;&lt;br /&gt;To do so, open the &lt;span style="font-style: italic;"&gt;web.config&lt;/span&gt; file for your site. For a default installation, this file will be located at &lt;span style="font-style: italic;"&gt;C:\Inetpub\wwwroot\wss\VirtualDirectories\80&lt;/span&gt;. Open it in Notepad and search for &lt;span style="font-style: italic;"&gt;customErrors mode="On"&lt;/span&gt;. Replace it with &lt;span style="font-style: italic;"&gt;customErrors mode="Off"&lt;/span&gt;. To get more details, we will also turn on the call stack (in which procedure the error is actually happening). Search for  &lt;span style="font-style: italic;"&gt;CallStack=”false”&lt;/span&gt; and change it to &lt;span style="font-style: italic;"&gt;CallStack="true"&lt;/span&gt; (this is in the &lt;span style="font-style: italic;"&gt;SafeMode &lt;/span&gt;section).&lt;br /&gt;&lt;br /&gt;Once we have done this, we were getting (somewhat) more detailed error messages:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Object reference not set to an instance of an object.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[NullReferenceException: Object reference not set to an instance of an object.]&lt;/span&gt; &lt;span style="font-style: italic;"&gt;   Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnLoad(EventArgs e) +94&lt;/span&gt; &lt;span style="font-style: italic;"&gt;   System.Web.UI.Control.LoadRecursive() +65&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On another machine we were getting this error:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Object reference not set to an instance of an object.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[NullReferenceException: Object reference not set to an instance of an object.]&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Microsoft.Office.Server.Administration.SqlSessionStateResolver.System.Web.IPartitionResolver.ResolvePartition(Object key) +77&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The server was also now logs a lot of ASP.NET errors 1309 into the Application event log. Somehow I cam across a post from &lt;a href="http://hiddensharepointfeatures.blogspot.com/2008/06/use-of-aam-for-internet-facing.html"&gt;Chinmay Vartak&lt;/a&gt; showing the same error message (but for a different problem) and the steps he pointed out were the solution.&lt;br /&gt;&lt;br /&gt;The problem was that on the remote site the name of the server was resolvable, but pointed to a wrong IP address. Although we were using a FQN (&lt;span style="font-style: italic;"&gt;http://servername.site.acme.com&lt;/span&gt; instead of just &lt;span style="font-style: italic;"&gt;http://servername&lt;/span&gt;) to access the server, internally WSS was not using the FQN but just the server name. So, all you need to do is to tell SharePoint to always use the FQN.&lt;br /&gt;&lt;br /&gt;To do this, go to the Central Administration of the server and select &lt;span style="font-style: italic;"&gt;Operations &lt;/span&gt;-&gt; &lt;span style="font-style: italic;"&gt;Alternate access mappings&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/SNH0cvkvbbI/AAAAAAAAAM0/tiJ3BDFsK54/s1600-h/wss_null_ref_1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/SNH0cvkvbbI/AAAAAAAAAM0/tiJ3BDFsK54/s320/wss_null_ref_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5247243815507422642" border="0" /&gt;&lt;/a&gt;Click on &lt;span style="font-style: italic;"&gt;Edit Public URLs&lt;/span&gt; and change the entry for &lt;span style="font-style: italic;"&gt;Default&lt;/span&gt; to be a FQN and click on &lt;span style="font-style: italic;"&gt;Save&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_V1tbWNn9eRE/SNH0hqaIfQI/AAAAAAAAAM8/hj2B_EcOuFs/s1600-h/wss_null_ref_2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_V1tbWNn9eRE/SNH0hqaIfQI/AAAAAAAAAM8/hj2B_EcOuFs/s320/wss_null_ref_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5247243900020096258" border="0" /&gt;&lt;/a&gt;In case you want to use SSL (https) also, you will need to create an entry for this also by using &lt;span style="font-style: italic;"&gt;Add internal URLs&lt;/span&gt; and enter the https FQN URL for this server. When you have done this also, Alternate access mappings should show a list similar to this one:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_V1tbWNn9eRE/SNH3_D7jbCI/AAAAAAAAANE/Vj3M4VbL_CE/s1600-h/wss_null_ref_3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_V1tbWNn9eRE/SNH3_D7jbCI/AAAAAAAAANE/Vj3M4VbL_CE/s320/wss_null_ref_3.JPG" alt="" id="BLOGGER_PHOTO_ID_5247247703622249506" border="0" /&gt;&lt;/a&gt;Now all this stupid errors should be gone and everyone can access your server with either http or https.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6431780302535886052?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6431780302535886052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6431780302535886052' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6431780302535886052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6431780302535886052'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/09/windows-search-server-sharepoint.html' title='Windows Search Server (SharePoint): An unexpected error has occurred.'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_V1tbWNn9eRE/SNH0cvkvbbI/AAAAAAAAAM0/tiJ3BDFsK54/s72-c/wss_null_ref_1.JPG' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3482194879246730876</id><published>2008-09-12T07:43:00.000-07:00</published><updated>2008-09-15T00:20:17.680-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>SideBySide Event Log Error</title><content type='html'>Just came across a computer that was going havoc and displayed this funny error message in the system event log (Rough translation of the original version in German):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Dependend assembly "Microsoft.VC80.MFC” could not be found. “Last Error”: The references Assembly is not installed on this computer. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After search a little bit around, I finally found out that VC80 stand for Visual C++ 2005 (internally 8.0). And because Microsoft installs all newer Visual C++ runtime files as side by side assemblies into C:\WINDOWS\WinSXS, you don’t get the normal “DLL not found” but this message.&lt;br /&gt;&lt;br /&gt;Well, the solution is easy: Just download and install the Visual C++ 2005 Redistributable Package from here&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please note that there is also a new package available (Visual C++ 2008 Redistributable Package) but this will install the files for Microsoft.VC90. Also note that you need to download and install the version that matches your computer. If you are using a 64bit Version of Windows, you will need to download the x64 version, not the x86 one I linked above.&lt;br /&gt;&lt;br /&gt;And for your reference:&lt;br /&gt;Visual C++ 2003 = Version 7.0&lt;br /&gt;Visual C++ 2005 = Version 8.0&lt;br /&gt;Visual C++ 2008 = Version 9.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3482194879246730876?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3482194879246730876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3482194879246730876' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3482194879246730876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3482194879246730876'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/09/sidebyside-event-log-error.html' title='SideBySide Event Log Error'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6043293279452942933</id><published>2008-09-04T10:01:00.001-07:00</published><updated>2008-09-25T06:41:15.428-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Mozilla Firefox in "Jelly mode"</title><content type='html'>&lt;p&gt;In case your are using a &lt;a href="http://en.wikipedia.org/wiki/Netbook"&gt;Netbook&lt;/a&gt; with an &lt;a href="http://en.wikipedia.org/wiki/Solid-state_drive"&gt;Solid-state drive&lt;/a&gt; (SSD), like the &lt;a href="http://eeepc.asus.com/global/901.htm"&gt;Asus EeePC 901&lt;/a&gt;, you will notice that Firefox 3 from time to time behaves like being in "jelly mode": it stops responding for a few seconds and simply freezes. Although this "jelly mode" will only last a few seconds, it will drive you mad if you try to use it for more than five minutes. Fortunately this can be fixed with some easy tricks and less than 10 minutes of time. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;We got reports about this issue from several users of &lt;a href="http://www.x-setup.net/"&gt;X-Setup Pro&lt;/a&gt; and they all asked us if there is a way to make Firefox faster and get rid of this jelly mode. Since we couldn't explain why this would happen, and we wanted to test X-Setup Pro on a netbook anyway, we bought a EeePC 901. After doing the typical "original setup, driver download and install, Windows Update check" procedure we installed Firefox 3.01 and within the first five minutes we were experiencing the jelly mode as well.&lt;/p&gt;  &lt;p&gt;With the help of &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx"&gt;Process Monitor&lt;/a&gt;, &lt;a href="http://drivegleam.dirtcellar.net/"&gt;DriveGLEAM&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Solid-state_drive"&gt;Wikipedia&lt;/a&gt; and &lt;a href="http://kb.mozillazine.org/Urlclassifier2.sqlite"&gt;mozillaZine&lt;/a&gt; we are pretty sure what this is causing. While using Firefox, it will perform a lot of small write operations to several &lt;a href="http://www.sqlite.org/"&gt;SQlite&lt;/a&gt; databases (e.g. urlclassifier2.sqlite or places.sqlite) and other files like configuration files of add-ons or files for the cache. While this is fine with a normal HD, this causes a lot of stress for an SSD. SSDs are fast when reading data but very slow when writing. Although Firefox will only perform small write operations the SSD is not fast enough to perform this in time and causing Firefox to wait. And this is exactly what we are calling the "Firefox jelly mode".&lt;/p&gt;  &lt;p&gt;The solution is quite simple: Move the Firefox profile (where all these write operations take place) to a location that is faster. But: The EeePC 901 only has two SSDs (C: and D:) plus an SD slot, meaning that there is no fast location available. This means, the only solution that is left is a &lt;a href="http://en.wikipedia.org/wiki/Ram_disk"&gt;RAM disk&lt;/a&gt;. The people at &lt;a href="http://www.mydigitallife.info/2007/05/27/free-ramdisk-for-windows-vista-xp-2000-and-2003-server/"&gt;My Digital Life&lt;/a&gt; have written about this some weeks ago and made a package we can use right away. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://depositfiles.com/files/916161"&gt;Download the package&lt;/a&gt; and extract it to a folder on your HD (SSD), e.g. &lt;em&gt;C:\ProgramFiles\RamDisk&lt;/em&gt;. From there, start &lt;em&gt;RAMDISK.exe&lt;/em&gt; and click on the right on &lt;em&gt;Install Ramdisk&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img src="http://lh5.ggpht.com/T3XH3X/SMAUCVdrsRI/AAAAAAAAAMU/gtfAlANCA2Q/s288/ramdisk1.JPG" /&gt; &lt;/p&gt;  &lt;p&gt;After a few seconds, the controls on the left will be selectable and we can choose which size this RAM disk should have. Since the 901 I'm using has 2 GB of memory, I selected 128M (128 MB) for size, if you netbook as only 1 GB, you might want to use 64 MB. All other settings (Drive: R:, Fixed Media) remain unchanged. Click OK and the program should report &lt;em&gt;Success&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;The next thing we need to do is to prepare the RAM disk, since it is currently set to use FAT instead of NTFS. Create a new Batch file in the same folder where &lt;em&gt;RAMDISK.exe&lt;/em&gt; is located and name it &lt;em&gt;Setup.bat&lt;/em&gt;. This batch will create some folders and save the image (with the folders) to the registry. Since we are using a RAM disk, rebooting the computer will wipe the entire contents of the R: drive. With the batch, we are creating an image of the drive and store it to the registry. When the computer is booted, the RAM disk is re-created from this image automatically. &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;@echo off &lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;echo This will setup the RAM Disk&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;pause &lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;format /FS:NTFS /Q /V:RamDisk /A:512 R:    &lt;br /&gt;chkdsk /L:2048 R:     &lt;br /&gt;CACLS R:\ /G Administrators:F &lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;MKDIR R:\TEMP    &lt;br /&gt;MKDIR R:\FFCache     &lt;br /&gt;MKDIR R:\IECache     &lt;br /&gt;MKDIR R:\Stuff &lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;rdutil R: registry &lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;span style="font-family:Courier New;"&gt;pause&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Execute the batch. Press return to get things rolling, then enter &lt;em&gt;RamDisk&lt;/em&gt; to confirm you want to format the R: drive, confirm the format again (&lt;em&gt;Y&lt;/em&gt;) and once again (&lt;em&gt;Y&lt;/em&gt;). If you now open Explorer, you should have an R: drive with several folder in it. Please note: If you ever change your mind about the size of the RAM disk and change it using  &lt;em&gt;RAMDisk.exe &lt;/em&gt;you need to execute this batch again! &lt;/p&gt;  &lt;p&gt;Next, we need to create a profile in Firefox that will be stored on the RAM disk. Using Explorer, open &lt;em&gt;R:&lt;/em&gt;, change to the folder &lt;em&gt;Stuff&lt;/em&gt; and create a new folder named &lt;em&gt;RamDiskProfile&lt;/em&gt;. Now open a command prompt (&lt;em&gt;Start - Run - cmd.exe&lt;/em&gt;) and change to the path where Firefox is installed, e.g. &lt;em&gt;cd "c:\program files\Mozilla Firefox"&lt;/em&gt;. Execute &lt;em&gt;firefox.exe -ProfileManager.&lt;/em&gt; Click on New profile and enter as name &lt;em&gt;RamDiskProfile&lt;/em&gt;. As folder, select &lt;em&gt;R:\Stuff\RamDiskProfile&lt;/em&gt;. Back in the profile selection, click &lt;em&gt;Start Firefox&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/fPr8sZaHB_UDkdpkMfgDlg?authkey=j2ZV1wtvG64"&gt;&lt;img src="http://lh3.ggpht.com/T3XH3X/SMArXzgH9PI/AAAAAAAAAMc/gg9RJ4ly-rA/s288/firefox1.JPG" width="213" height="166" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If everything works as expected, you should see the &lt;em&gt;Welcome to Firefox&lt;/em&gt; page. Notice: Do not, repeat, DO NOT copy your existing profile! At least on my 901, several files inside the profile had direct likes in it (e.g. C:\Documents and Settings\TeX HeX\...). If you simply copy your existing profile you will end up having some of the files will be written on the SSD again.&lt;/p&gt;  &lt;p&gt;What we now need to do is to change the location where this Firefox profile will put the cache files to. In the address bar, type &lt;em&gt;about:config&lt;/em&gt; and confirm the warning that appears. Right-click anywhere in the list and select &lt;em&gt;New&lt;/em&gt; -&amp;gt; &lt;em&gt;String&lt;/em&gt;. As name of the new value type &lt;em&gt;browser.cache.disk.parent_directory&lt;/em&gt;. As value for it, type &lt;em&gt;R:\FFCache&lt;/em&gt;. Close Firefox.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://picasaweb.google.co.uk/lh/photo/vaneuYeKd0utB3ONVg2vQw?authkey=j2ZV1wtvG64"&gt;&lt;img src="http://lh5.ggpht.com/T3XH3X/SMArX06NoKI/AAAAAAAAAMk/nuLc7KsRDSY/s288/firefox2.JPG" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Now we will create a backup of this profile to the SSD. Use &lt;em&gt;Start&lt;/em&gt; -&amp;gt; &lt;em&gt;Run&lt;/em&gt; again and type &lt;em&gt;%APPDATA%, &lt;/em&gt;which will display the folder where your personal data is normally saved. Open the folder &lt;em&gt;Mozilla&lt;/em&gt;, then &lt;em&gt;Firefox&lt;/em&gt; and then &lt;em&gt;Profiles&lt;/em&gt;. Copy the folder R:\Stuff\RamDiskProfile there. &lt;/p&gt;  &lt;p&gt;Okay, we are almost there. Create a new batch file that is used to start Firefox with the profile from the RAM disk. It will copy the files from the &lt;em&gt;RamDiskProfile &lt;/em&gt;(from &lt;em&gt;%APPDATA%)&lt;/em&gt; to the R: drive, wait for Firefox to exit (= you are done with browsing) and copy then any files that were changed back to &lt;em&gt;%APPDATA%&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;@echo off  &lt;br /&gt;echo.   &lt;br /&gt;echo Launching Firefox from RAM disk...   &lt;br /&gt;echo. &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;IF NOT EXIST R:\Stuff\RamDiskProfile\. mkdir R:\Stuff\RamDiskProfile &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;REM The xcopy command is one line until the "cd" command  &lt;br /&gt;xcopy "%APPDATA%\Mozilla\Firefox\Profiles\RamDiskProfile\*.*" "R:\Stuff\RamDiskProfile" /S /I /Y /H /Q   &lt;br /&gt;cd /D "R:\Stuff\RamDiskProfile"   &lt;br /&gt;attrib -a *.* /S &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;echo.  &lt;br /&gt;echo Firefox launched, this window will close when Firefox is closed   &lt;br /&gt;start /wait "Firefox from RAM disk" "%ProgramFiles%\Mozilla Firefox\firefox.exe" -profile R:\Stuff\RamDiskProfile &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;echo.  &lt;br /&gt;echo Copying files back from RAM disk...   &lt;br /&gt;REM The xcopy command is one line    &lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier New;"&gt;xcopy "R:\Stuff\RamDiskProfile\*.*" "%APPDATA%\Mozilla\Firefox\Profiles\RamDiskProfile"  /S /I /Y /H /Q /M&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Now you also know why we have changed the location of the cache files earlier on: Because the cache files are now longer part of the profile (but instead on &lt;em&gt;R:\FFCache),&lt;/em&gt; they don't need to be copied back. Of course, if you want to have your cache persistent, you can easily delete the &lt;em&gt;browser.cache.disk.parent_directory&lt;/em&gt; from &lt;em&gt;about:config&lt;/em&gt; and the cache files will be copied as well.&lt;/p&gt;  &lt;p&gt;Start the batch file and give it a try, I'm pretty sure you will think you have just got a new computer. No more jelly mode, and the speed is what you were expecting from Firefox. &lt;/p&gt;  &lt;p&gt;To verify that everything has worked, type &lt;em&gt;about:cache&lt;/em&gt; into the address bar and look at the two cache directories, both should be pointing to R. One thing you need to keep in mind: In case you install an add-in or a theme, Firefox is offering to restart it with a single click. Don't do this since the batch will close when Firefox exists. Simply close it manually and restart it again using the batch. &lt;/p&gt;  &lt;p&gt;Some other things you can do with the RAM disk: There is already a folder called &lt;em&gt;TEMP&lt;/em&gt; so you can simply reconfigure your environment variables TEMP and TMP to use this folder. And finally, the folder &lt;em&gt;IECache&lt;/em&gt; can be used to put the temporary internet files there. &lt;/p&gt;  &lt;p&gt;Enjoy!   &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6043293279452942933?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6043293279452942933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6043293279452942933' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6043293279452942933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6043293279452942933'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/09/mozilla-firefox-in-mode.html' title='Mozilla Firefox in &amp;quot;Jelly mode&amp;quot;'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/T3XH3X/SMAUCVdrsRI/AAAAAAAAAMU/gtfAlANCA2Q/s72-c/ramdisk1.JPG' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6235688104115974741</id><published>2008-08-25T10:57:00.001-07:00</published><updated>2008-09-25T06:41:03.019-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Automatically generating PowerShell *.Types.ps1xml and *.Format.ps1xml</title><content type='html'>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;I helped a friend of mine a lot with this, so I thought I should share this. He currently works at a customer's site to create a PowerShell snap-in for administrating the customer its home-grown LOB. It's quite an application, used by 5000+ users and supported by about 20 administrators.&lt;/p&gt;  &lt;p&gt;So far, the administrators are freaking out because administration this LOB is a snap with the cmdlets he has written. As more and more administrators use the PowerShell to administrate the LOB, more features requests are coming in and a lot of them are about how the objects are displayed inside PowerShell (see &lt;a href="http://msdn.microsoft.com/en-us/library/cc136149%28VS.85%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc136149(VS.85).aspx&lt;/a&gt; for more details).&lt;/p&gt;  &lt;p&gt;The PowerShell needs two files to format the returned objects proberly: &lt;i&gt;[NAME]. Types.ps1xml&lt;/i&gt; (general information) and &lt;i&gt;[NAME].Format.ps1xml &lt;/i&gt;(table based output). These are very simple structured XML files but keeping these files manually in sync with your development and the feature requests can be a pain.&lt;/p&gt;  &lt;p&gt;Because it was my idea that my friend should design a PowerShell snap-in instead of the originally planned COM interfaces, I searched for a solution. Since I found none, I wrote it myself (surprise!). &lt;/p&gt;  &lt;p&gt;The good: The solution works as expected and my friend is happy. The bad: The code has no unit testing, works by using string constants and string.Format() and has some limitations (e.g. only a single Alias per property while the PS could support 100+ alias for the same property). However, you can use the code a starting point for your own solution.&lt;/p&gt;  &lt;p&gt;My solution is based around the custom attributes [xPSObjectAttribute], [xPSPropertyAttribute] and [xPSSortPropertyAttribute]. During development, you simply decorate an object that is returned by a cmdlets with [xPSObject]. Oh, BTW: the &lt;i&gt;xPS&lt;/i&gt; simple stands for "PowerShell Extension".&lt;/p&gt;  &lt;p&gt;Within the object you then decorate a property with the [xPSProperty] attribute and define several properties on it. For example:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSProperty&lt;/span&gt;(Default = &lt;span style="color:blue;"&gt;true&lt;/span&gt;, Alias = &lt;span style="color: rgb(163, 21, 21);"&gt;"FullName")&lt;/span&gt;] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%;font-size:10;" courier="courier"  lang="EN-US"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name&lt;span style="color: rgb(43, 145, 175);"&gt; &lt;/span&gt;&lt;/span&gt;    &lt;/p&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;When you later on run the PSTypeXMLFormatXMLGenerator:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="color: rgb(43, 145, 175); line-height: 115%;font-size:10;" courier="courier"  lang="EN-US"&gt;xPSXMLOutput&lt;/span&gt;&lt;span style="line-height: 115%;font-size:10;" courier="courier"  lang="EN-US"&gt; output = &lt;span style="color: rgb(43, 145, 175);"&gt;PSTypeXMLFormatXMLGenerator&lt;/span&gt;.GetPS1XML(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;TestClass&lt;/span&gt;));&lt;/span&gt;&lt;span style="" lang="EN-US"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You will get a type XML (some parts have been omitted):&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;&amp;lt;Type&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;  &amp;lt;Name&amp;gt;TestApp1.TestClass&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;  &amp;lt;Members&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;    &amp;lt;MemberSet&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;     &amp;lt;Name&amp;gt;PsStandardMembers&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;     &amp;lt;Members&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;      &amp;lt;NoteProperty&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;        &amp;lt;Name&amp;gt;DefaultDisplayProperty&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;        &amp;lt;Value&amp;gt;&lt;b&gt;FullName&lt;/b&gt;&amp;lt;/Value&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;      &amp;lt;/NoteProperty&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;      &amp;lt;PropertySet&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;        &amp;lt;Name&amp;gt;DefaultDisplayPropertySet&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;           &amp;lt;ReferencedProperties&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;             &amp;lt;Name&amp;gt;&lt;b&gt;FullName&lt;/b&gt;&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;...&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;       &amp;lt;AliasProperty&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;          &amp;lt;Name&amp;gt;&lt;b&gt;FullName&lt;/b&gt;&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;          &amp;lt;ReferencedMemberName&amp;gt;&lt;strong&gt;Name&lt;/strong&gt;&amp;lt;/ReferencedMemberName&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;       &amp;lt;/AliasProperty&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;You can also change in which sequence the properties should be listed by PowerShell:&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSProperty&lt;/span&gt;(Default = &lt;span style="color:blue;"&gt;true&lt;/span&gt;, Sequence = 10, Alias = &lt;span style="color: rgb(163, 21, 21);"&gt;"FullName"&lt;/span&gt;)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%;font-size:10;" courier="courier"  lang="EN-US"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSProperty&lt;/span&gt;(Sequence = 20)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;int&lt;/span&gt; Size &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The result XML:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;...     &lt;br /&gt;   &amp;lt;Name&amp;gt;DefaultDisplayPropertySet&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;   &amp;lt;ReferencedProperties&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;       &amp;lt;Name&amp;gt;&lt;strong&gt;FullName&lt;/strong&gt;&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;       &amp;lt;Name&amp;gt;&lt;strong&gt;Size&lt;/strong&gt;&amp;lt;/Name&amp;gt;      &lt;br /&gt;...&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;To provide on which properties the PowerShell should sort a list of this object, use the [xPSSortProperty] attribute (can be applied to several properties):&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSSortProperty&lt;/span&gt;(SortID = 1)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%;font-size:10;" courier="courier"  lang="EN-US"&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSSortProperty&lt;/span&gt;(SortID = 20)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;int&lt;/span&gt; Size &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;XML:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;     &amp;lt;Name&amp;gt;DefaultKeyPropertySet&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;     &amp;lt;ReferencedProperties&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;           &amp;lt;Name&amp;gt;Name&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;           &amp;lt;Name&amp;gt;Size&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier New;"&gt;     &amp;lt;/ReferencedProperties&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;For the table based output, PSTypeXMLFormatXMLGenerator does also generate a format XML. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSProperty&lt;/span&gt;(Default = &lt;span style="color:blue;"&gt;true&lt;/span&gt;, Sequence = 1, Alias = &lt;span style="color: rgb(163, 21, 21);"&gt;"FullName"&lt;/span&gt;, ColumnWidth = 30)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;    &lt;/span&gt;[&lt;span style="color: rgb(43, 145, 175);"&gt;xPSProperty&lt;/span&gt;(Sequence = 2, ColumnName = &lt;span style="color: rgb(163, 21, 21);"&gt;"Size (K)"&lt;/span&gt;, ColumnRightAligned = &lt;span style="color:blue;"&gt;true&lt;/span&gt;, ColumnScript = &lt;span style="color: rgb(163, 21, 21);"&gt;"[int]($_.Size / 1024)"&lt;/span&gt;)] &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal;"&gt;&lt;span courier="courier"  lang="EN-US" style="font-size:10;"&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=";font-size:10;color:blue;" courier="courier"  &gt;public&lt;/span&gt;&lt;span courier="courier"  style="font-size:10;"&gt; &lt;span style="color:blue;"&gt;int&lt;/span&gt; Size &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Resulting XML:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;&amp;lt;View&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;&amp;lt;Name&amp;gt;TestClass&amp;lt;/Name&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;&amp;lt;ViewSelectedBy&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;   &amp;lt;TypeName&amp;gt;TestApp1.TestClass&amp;lt;/TypeName&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;&amp;lt;/ViewSelectedBy&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;&amp;lt;TableControl&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;   &amp;lt;TableHeaders&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;TableColumnHeader&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;        &amp;lt;Label&amp;gt;&lt;b&gt;FullName&lt;/b&gt;&amp;lt;/Label&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;        &amp;lt;Width&amp;gt;&lt;b&gt;30&lt;/b&gt;&amp;lt;/Width&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;/TableColumnHeader&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;TableColumnHeader&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;        &amp;lt;Label&amp;gt;&lt;b&gt;Size (K)&lt;/b&gt;&amp;lt;/Label&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;        &amp;lt;Alignment&amp;gt;&lt;b&gt;Right&lt;/b&gt;&amp;lt;/Alignment&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;/TableColumnHeader&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;...&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;  &amp;lt;TableRowEntry&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;TableColumnItem&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;         &amp;lt;PropertyName&amp;gt;&lt;b&gt;Name&lt;/b&gt;&amp;lt;/PropertyName&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;/TableColumnItem&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;TableColumnItem&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;         &amp;lt;ScriptBlock&amp;gt;&lt;b&gt;[int]($_.Size / 1024)&lt;/b&gt;&amp;lt;/ScriptBlock&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;      &amp;lt;/TableColumnItem&amp;gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:courier ;"&gt;...&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;I guess you are getting the basic idea how this class works. For your reference, here's a screen shot what the [xPSProperty] Attribute supports:&lt;/p&gt;  &lt;p&gt;  &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/SLLzZNgHBCI/AAAAAAAAAL0/B5IILErDGXM/s1600-h/xPSPropertyScreenshot.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5238516931031925794" style="margin: 0px 10px 10px 0px; float: left;" alt="" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/SLLzZNgHBCI/AAAAAAAAAL0/B5IILErDGXM/s320/xPSPropertyScreenshot.jpg" border="0" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt; &lt;br /&gt; &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Once again, this class is not fully tested and should be seen as a basis for your own solution. If you use it, you would make me happy to leave a comment or provide a back link. Download the source and a sample application &lt;a href="http://www.texhex.info/download/PSTypeXMLFormatXML.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6235688104115974741?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6235688104115974741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6235688104115974741' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6235688104115974741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6235688104115974741'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/08/automatically-generating-powershell.html' title='Automatically generating PowerShell *.Types.ps1xml and *.Format.ps1xml'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/SLLzZNgHBCI/AAAAAAAAAL0/B5IILErDGXM/s72-c/xPSPropertyScreenshot.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5575715942300224207</id><published>2008-08-22T03:38:00.000-07:00</published><updated>2008-09-25T06:41:49.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>SQL Server string filter and replacement function</title><content type='html'>Often when I need to transmogrify data in SQL Server, I create custom stored procedures or update statement that filters incoming data. For example, a raw data import includes part numbers with letters while the system where this should go only allows 0-9 and “_”. &lt;br /&gt;&lt;br /&gt;For a current project, I had to filter a lot of data so I decided to write a reusable function that NOT defines what is NOT allowed but simple the other way around: Define what you want. &lt;br /&gt;&lt;br /&gt;I came across a &lt;a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79083"&gt;interesting forum discussion&lt;/a&gt; that about such an function, but none of the solutions was exactly was I wanted. The main reason was that I wanted the function to be used as a filter and replacement at the same time. I give you a quick example. &lt;br /&gt;&lt;br /&gt;Suppose you need a replacement that allows numbers only: &lt;br /&gt;&lt;br /&gt;Input is “&lt;span style="font-style: italic;"&gt;a12345abc&lt;/span&gt;”, replacement character is “&lt;span style="font-style: italic;"&gt;*&lt;/span&gt;”, return should be “&lt;span style="font-weight: bold;"&gt;*12345*&lt;/span&gt;”. Please note that a single replacement character (“*”) is at the end, although the string ends with three non-numeric characters. &lt;br /&gt;&lt;br /&gt;Now the same as a filter: Input is “&lt;span style="font-style: italic;"&gt;a12345abc&lt;/span&gt;”, replacement character is “” (&lt;span style="font-style: italic;"&gt;empty&lt;/span&gt;) , return should be “&lt;span style="font-weight: bold;"&gt;12345&lt;/span&gt;”. &lt;br /&gt;&lt;br /&gt;I ended up by creating my own function “&lt;span style="font-weight: bold;"&gt;funcFilterString_ASCII&lt;/span&gt;” (roughly based on a solution in the forum by Peter Larsson from Helsingborg, Sweden). Usage is rather simple: @Source is the string that should be filtered, @Filter is the regex like filter and @Replacement is the character any no match should be replaced with (or empty if no matches should be removed). &lt;br /&gt;&lt;br /&gt;Some examples: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;print dbo.funcFilterString_ASCII('John Doe - 12345 New York _10', '[0-9]', '') &lt;/span&gt; &lt;br /&gt;-- returns &lt;span style="font-weight: bold;"&gt;1234510&lt;/span&gt; &lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &lt;br /&gt;print dbo.funcFilterString_ASCII('John Doe - 12345 New York _10', '[0-9]', '*') &lt;/span&gt; &lt;br /&gt;-- returns &lt;span style="font-weight: bold;"&gt;*12345*10&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;print dbo.funcFilterString_ASCII('John Doe - 12345 New York _10', '[0-9_]', '') &lt;/span&gt; &lt;br /&gt;-- returns &lt;span style="font-weight: bold;"&gt;12345_10&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;print dbo.funcFilterString_ASCII('John Doe - 12345 New York _10', '[23]', '*')&lt;/span&gt; &lt;br /&gt;-- returns &lt;span style="font-weight: bold;"&gt;*23*&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;print dbo.funcFilterString_ASCII('John Doe - 12345 New York _10', '[^0-9]', '*') &lt;/span&gt; &lt;br /&gt;-- returns &lt;span style="font-weight: bold;"&gt;John Doe - * New York _*&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;To use it, simply copy the source below to a query window, change to the database where you want to have it and execute the SQL. Enjoy! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the source: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  &lt;br /&gt;CREATE FUNCTION [dbo].[funcFilterString_ASCII]   &lt;br /&gt;(   &lt;br /&gt;@Source VARCHAR(max), -- the string that contains characters to be replaced   &lt;br /&gt;@Filter VARCHAR(max), -- the regex what should be filterd   &lt;br /&gt;@Replacement VARCHAR(1) -- replace anything that does not match @Filter with this char (set to '' to remove non-matches)    &lt;br /&gt;)   &lt;br /&gt;/*   &lt;br /&gt;Example   &lt;br /&gt;  &lt;br /&gt;declare @s varchar(500)   &lt;br /&gt;print '--Test string ---'   &lt;br /&gt;select @s='John Doe - 12345 New York - YYY_XXX - No 10 USD$' CHAR(13) CHAR(10) 'New Line'   &lt;br /&gt;print @s   &lt;br /&gt;print '--Results---'   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[0-9]', '') -- returns only 12345   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[0-9]', '*') -- returns *12345*    &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[0-9_]', '') -- returns only numbers and "_" = 12345_10   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[0-9a-zA-z]', '') -- returns the entire string but without any special chars    &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[0-9a-zA-z]', '*') -- returns the entire string but any special chars have been replaced   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[^' CHAR(13) CHAR(10) ']', '_') -- replace CR/LF with _   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[^' CHAR(13) CHAR(10) ']', '') -- remove CR/LF   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[e]', '*') -- returns only *e*e*e*e   &lt;br /&gt;print dbo.funcFilterString_ASCII(@s, '[^e]', '*') -- entire string, but all "e" are "*"   &lt;br /&gt;  &lt;br /&gt;*/   &lt;br /&gt;  &lt;br /&gt;RETURNS VARCHAR(max)   &lt;br /&gt;AS   &lt;br /&gt;BEGIN   &lt;br /&gt;-- Created by TeX HeX of Xteq System    &lt;br /&gt;-- http://www.texhex.info/   &lt;br /&gt;  &lt;br /&gt;DECLARE @Index int   &lt;br /&gt;SET @Index = DATALENGTH(@Source)   &lt;br /&gt;  &lt;br /&gt;DECLARE @dest varchar(max)   &lt;br /&gt;DECLARE @curr varchar(1)   &lt;br /&gt;DECLARE @last_add varchar(1)   &lt;br /&gt;  &lt;br /&gt;SET @DEST=''   &lt;br /&gt;SET @last_add=''   &lt;br /&gt;  &lt;br /&gt;-- Pass #1: Replacement   &lt;br /&gt;WHILE @Index &amp;gt; 0 BEGIN   &lt;br /&gt;SET @curr=SUBSTRING(@Source, @Index, 1)   &lt;br /&gt;  &lt;br /&gt;-- collate is only needed for VARCHAR types    &lt;br /&gt;IF @curr COLLATE Latin1_General_BIN LIKE @Filter BEGIN   &lt;br /&gt;-- no replacement, copy from source    &lt;br /&gt;SET @DEST=@DEST @curr    &lt;br /&gt;  &lt;br /&gt;SET @last_add=@curr   &lt;br /&gt;--SET @last_add_ignored=0   &lt;br /&gt;END ELSE BEGIN   &lt;br /&gt;-- do replacement. If @Replacement is empty, do not add anything   &lt;br /&gt;IF @Replacement!='' BEGIN   &lt;br /&gt;-- check if the last char we added was @Replacement    &lt;br /&gt;-- if so, do not add it again   &lt;br /&gt;IF @last_add!=@Replacement BEGIN   &lt;br /&gt;SET @DEST=@DEST @Replacement   &lt;br /&gt;  &lt;br /&gt;SET @last_add=@Replacement   &lt;br /&gt;END    &lt;br /&gt;END   &lt;br /&gt;END   &lt;br /&gt;  &lt;br /&gt;SET @Index=@Index-1   &lt;br /&gt;END    &lt;br /&gt;  &lt;br /&gt;-- Pass #2: Reverse the string, because we build @Dest from reverse   &lt;br /&gt;SET @DEST=Reverse(@Dest)    &lt;br /&gt;  &lt;br /&gt;-- Pass #3: Remove any left over spaces   &lt;br /&gt;SET @DEST=RTRIM(LTRIM(@Dest))   &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;RETURN @DEST   &lt;br /&gt;END   &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5575715942300224207?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5575715942300224207/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5575715942300224207' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5575715942300224207'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5575715942300224207'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/08/sql-server-string-filter-and.html' title='SQL Server string filter and replacement function'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-2107135208529706559</id><published>2008-08-15T03:46:00.000-07:00</published><updated>2008-08-15T04:11:48.156-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Thanks for the eh, "detailed" description</title><content type='html'>The 100.000$ question: What does this error message mean?&lt;br /&gt;&lt;br /&gt;A) Nothing!&lt;br /&gt;&lt;br /&gt;B) Go figure!&lt;br /&gt;&lt;br /&gt;C) Enterprise NX-01 hull breach!&lt;br /&gt;&lt;br /&gt;D) Maybe something went wrong, but I won't tell you!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_V1tbWNn9eRE/SKVkGcvZdvI/AAAAAAAAALs/5YQtOwMx0kY/s1600-h/SPS_Gatherer.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_V1tbWNn9eRE/SKVkGcvZdvI/AAAAAAAAALs/5YQtOwMx0kY/s320/SPS_Gatherer.jpg" alt="" id="BLOGGER_PHOTO_ID_5234700203845056242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-2107135208529706559?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/2107135208529706559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=2107135208529706559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2107135208529706559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/2107135208529706559'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/08/thanks-for-eh-detailed-description.html' title='Thanks for the eh, &quot;detailed&quot; description'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_V1tbWNn9eRE/SKVkGcvZdvI/AAAAAAAAALs/5YQtOwMx0kY/s72-c/SPS_Gatherer.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6506345406185613162</id><published>2008-08-07T10:34:00.001-07:00</published><updated>2008-09-25T06:41:37.727-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Improving the SGH-i780</title><content type='html'>&lt;p&gt;After nearly three years with a &lt;a href="http://www.palm.com/us/products/smartphones/treo650/"&gt;Palm Treo 650&lt;/a&gt;, I decided to buy a new mobile Email machine. Because I now have a full Exchange account, I needed to get a Windows Mobile Device this time.&lt;/p&gt;  &lt;p&gt;Evaluating several devices (&lt;a href="http://www.htc.com/uk/product.aspx?id=8648"&gt;HTC S730&lt;/a&gt;, &lt;a href="http://www.motorola.com/motoinfo/product/details.jsp?globalObjectId=181"&gt;Motorola Q9&lt;/a&gt;, &lt;a href="http://www.palm.com/us/products/smartphones/treo750/"&gt;Palm Treo 750&lt;/a&gt;) I thought the phone that best suits me would be the Samsung &lt;a href="http://pdadb.net/index.php?m=specs&amp;amp;id=866&amp;amp;view=1"&gt;SGH-i780&lt;/a&gt;. Especially because it has no D-Pad, but instead a touch pad that is easy to use and makes handling a snap. &lt;/p&gt;  &lt;p&gt;However, as soon as you want to scroll down a longer email, or viewing a normal website there is one thing were the touch pad sucks: Scrolling. Because of the mouse-like handling you always have to move the cursor to the scrollbars and click on it. This is just plain time consuming. After a short while you will miss a simple D-Pad desperately.&lt;/p&gt;  &lt;p&gt;Good: The SGH-i780 has a two buttons on the left side (Volume Up and Down) and another button on the right side (Short press: Mini Media Player, Long press: Camera) that could be used to simulate Up/Down and Enter. Bad: You can't reconfigure these buttons with the normal settings Samsung offers. &lt;/p&gt;  &lt;p&gt;... until you get &lt;a href="http://ae.inc.ru/aebplus.php"&gt;AE Button Plus from Alexander Eltsyn&lt;/a&gt; which allows you to reconfigure any (yes, really any) key your device has. You can even double and triple (!) assign any key. &lt;/p&gt;  &lt;p&gt;With this software for just 8$ I simply reconfigured the three button to be up, down and Enter (Long press on the Camera key is still the camera) and now I can work on my emails without using the touch pad.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6506345406185613162?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6506345406185613162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6506345406185613162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6506345406185613162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6506345406185613162'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/08/improving-sgh-i780.html' title='Improving the SGH-i780'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3482148903106194460</id><published>2008-07-28T11:56:00.001-07:00</published><updated>2011-01-06T12:47:37.724-08:00</updated><title type='text'>HTML code for Flickr images – made easy</title><content type='html'>&lt;a href="http://www.flickr.com/creativecommons/"&gt;Flickr&lt;/a&gt; currently hosts more than 75 million images that are licensed under a &lt;a href="http://creativecommons.org/"&gt;Creative Commons&lt;/a&gt; license, and a lot of them can be used even on commercial pages (depending on the exact Creative Commons license).&lt;br /&gt;&lt;br /&gt;If you want to freshen up your homepage and want to link to some images from Flickr, you need to take some steps. You need to find out the correct URL of the photo and it must be linked back to the photo page; you must give the author proper credits and link back to the authors profile page; show that the photo is licensed under a Creative Commons license and finally include describing text on the image for people using screen readers.&lt;br /&gt;&lt;br /&gt;After doing this several times, I got tired of it and created a small website that automates this process: &lt;a href="http://www.imagecodr.org/"&gt;ImageCodr.org&lt;/a&gt;. You simply pass it the URL (as seen in your browser) of the photo page and it will generate ready to use HTML code. &lt;a href="http://imagecodr.org/get.php?url=http://flickr.com/photos/aussiegall/370467465/sizes/s"&gt;Here is an example of the result&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A small link that you can drop on your browser’s toolbar is also available on the &lt;a href="http://www.imagecodr.org/get.php"&gt;Get code!&lt;/a&gt; page, so you can simply click this when viewing an interesting photo.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3482148903106194460?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3482148903106194460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3482148903106194460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3482148903106194460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3482148903106194460'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/07/html-code-for-flickr-images-made-easy.html' title='HTML code for Flickr images – made easy'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5612124653795205040</id><published>2008-07-08T10:50:00.000-07:00</published><updated>2008-09-17T10:52:49.219-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>GTA IV: Stupid AI driver</title><content type='html'>Yes, the AI in GTA IV is sometimes far from perfect...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-03640806573763411 visible ontop" href="http://www.youtube.com/v/2gx4Lr2Qj7M&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/a&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2gx4Lr2Qj7M&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/2gx4Lr2Qj7M&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5612124653795205040?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5612124653795205040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5612124653795205040' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5612124653795205040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5612124653795205040'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/07/gta-iv-stupid-ai-driver.html' title='GTA IV: Stupid AI driver'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1220307369002538163</id><published>2008-06-18T03:01:00.000-07:00</published><updated>2008-07-18T03:19:41.931-07:00</updated><title type='text'>Digital Photo Display Feed</title><content type='html'>Surfing the Internet while searching for picture for my digital photo display, I came across two brilliant artists I would like to share with you.&lt;br /&gt;&lt;br /&gt;First is &lt;a href="http://tomwilcox.deviantart.com/"&gt;Tom Wilcox at deviant ART&lt;/a&gt; which makes stunning 3D pictures, a little bit like &lt;a href="http://www.digitalblasphemy.com/"&gt;&lt;span style="font-family:Trebuchet MS, Arial, Verdana, Comic Sans MS, sans-serif, serif;"&gt;Ryan Bliss &lt;/span&gt;from Digital Blasphemy&lt;/a&gt;. If you &lt;a href="http://tomwilcox.deviantart.com/gallery/#_featured--3"&gt;have a look at the works of art Tom designs&lt;/a&gt;, you will easily notice that you can look at them for hours and still notice new details you didn't saw until then. Just brilliant!&lt;br /&gt;&lt;br /&gt;Second is &lt;a href="http://www.hamaddarwish.com/"&gt;Hamad Darwish&lt;/a&gt;, a photographer that makes simply beautiful landscape photographs, the ones you stare at and won't believe this is still planet earth. Two pictures of him are even included as Wallpaper within Windows Vista, but &lt;a href="http://www.flickr.com/photos/darwishh/sets/72157594510047657/"&gt;the entire set contains much more pictures&lt;/a&gt;. More pictures can be found at &lt;a href="http://www.hamaddarwish.com/gallery.html"&gt;his Gallery&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1220307369002538163?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1220307369002538163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1220307369002538163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1220307369002538163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1220307369002538163'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/06/digital-photo-display-feed.html' title='Digital Photo Display Feed'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5582536083569282950</id><published>2008-06-02T10:50:00.000-07:00</published><updated>2008-09-17T10:55:26.278-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Army Of Two: Game bug</title><content type='html'>And yet again I'm hit by a invisible wall...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-03640806573763411 visible ontop" href="http://www.youtube.com/v/BN52kOmYbd0&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;/a&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/BN52kOmYbd0&amp;amp;hl=en&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.youtube.com/v/BN52kOmYbd0&amp;amp;hl=en&amp;amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5582536083569282950?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5582536083569282950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5582536083569282950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5582536083569282950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5582536083569282950'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/06/army-of-two-game-bug.html' title='Army Of Two: Game bug'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-1401830982031899302</id><published>2008-06-01T06:47:00.000-07:00</published><updated>2008-12-10T15:40:24.935-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><title type='text'>Asterisk Dialer</title><content type='html'>Once you have an &lt;a href="http://www.asterisk.org/"&gt;Asterisk&lt;/a&gt; based VoIP PBX (for example &lt;a href="http://www.trixbox.org/"&gt;TrixBox&lt;/a&gt;) running for more than one hour, you will have a great need for a possibility to dial directly from Office Outlook. You might also know this as TAPI for Asterisk.&lt;br /&gt;&lt;br /&gt;I have tested several options and programs that allow you to do this, and the best I found so far is the &lt;a href="http://www.voip.com.sg/asterisk/voip_asterisk_outlook_dialer.html"&gt;Asterisk Outlook Dialer&lt;/a&gt; (&lt;span style="font-weight: bold;"&gt;Freeware!&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;It contains of a small PHP file you install on the Asterisk server and a local extension that integrates into Office Outlook (tested successfully with Office Outlook 2007). Entering a number into the box and hitting &lt;span style="font-style: italic;"&gt;Dial&lt;/span&gt; will call the PHP file which in turns informs Asterisk to call your phone and connect you.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_V1tbWNn9eRE/SI8gCfe7CiI/AAAAAAAAALE/GZ4RF9bdBa0/s1600-h/aod_screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_V1tbWNn9eRE/SI8gCfe7CiI/AAAAAAAAALE/GZ4RF9bdBa0/s320/aod_screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5228432919583459874" border="0" /&gt;&lt;/a&gt;You only need to change the PHP file (originate.php) to include a context, username and password that can perform the actions on Asterisk. For example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$sContext = "from-internal";&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;&lt;br /&gt;$UserName="AstTapi";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$Password = "D1QdC1xbkJ";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you have installed the extension, you need to configure it directly in Outlook using Tools -&gt; Options -&gt; Asterisk Dialer&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/SI8kk39YpwI/AAAAAAAAALM/CyKdNa7TahE/s1600-h/aod_screen2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 175px; height: 202px;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/SI8kk39YpwI/AAAAAAAAALM/CyKdNa7TahE/s320/aod_screen2.jpg" alt="" id="BLOGGER_PHOTO_ID_5228437908315744002" border="0" /&gt;&lt;/a&gt;The only glitch I have found was that non numeric chars inside the number (e.g. “+49..”) will cause the call to fail. Therefore you should patch the PHP file a little bit more.&lt;br /&gt;&lt;br /&gt;Replace the part where you need to enter the context, username and password with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//Number patching&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$sNumber = preg_replace("/[^\+0-9]/", "", $sNumber);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$sNumber = str_replace("+49", "00", $sNumber);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$sNumber = str_replace("+", "000", $sNumber);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;//User information&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$sContext = "from-internal";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$UserName="AstTapi";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$Password = "D1QdC1xbkJ";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This line will strip out any chars that are not either numbers or the “+” sign. That way a number like “+49 (6232) 3987-x312” will become “+4962323987312”.&lt;br /&gt;&lt;br /&gt;The next two lines will change the number as required by the backend PBX. A call from Germany to Germany needs to be initiated with “00”, a call to any other country needs to be initiated with “000”. You might need to change these two lines to meet your requirements.&lt;br /&gt;&lt;br /&gt;In case you wish to mass deploy this extension, simply perform a normal installation on a given computer and enter the URL of the PHP file directly inside the setup (e.g. http://trixbox1.corp.acme.com/originate.php). Once setup has finished, copy “AsteriskDialer.dll” and “AsteriskDialer.ini” to any network folder. Inside that folder create a batch file with the following content:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;md "%ProgramFiles%\AsteriskDialer"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;copy "%~dp0AsteriskDialer.dll" "%ProgramFiles%\AsteriskDialer" /Y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;copy "%~dp0AsteriskDialer.ini" "%ProgramFiles%\AsteriskDialer" /Y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;regsvr32.exe "%ProgramFiles%\AsteriskDialer\AsteriskDialer.dll" /s&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;reg add HKLM\Software\AsteriskDialer /v IniFilePath /t REG_SZ /d "%ProgramFiles%\AsteriskDialer\AsteriskDialer.ini" /f&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And that’s it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-1401830982031899302?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/1401830982031899302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=1401830982031899302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1401830982031899302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/1401830982031899302'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/06/asterisk-dialer.html' title='Asterisk Dialer'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_V1tbWNn9eRE/SI8gCfe7CiI/AAAAAAAAALE/GZ4RF9bdBa0/s72-c/aod_screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5261990297842409342</id><published>2008-05-07T10:48:00.001-07:00</published><updated>2008-09-25T06:42:40.963-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Removing lines from the output of a command line program</title><content type='html'>&lt;p&gt;In case you need to deal with command line programs, you sometimes face the following challenge: the programs return too much data!&lt;/p&gt;  &lt;p&gt;For example, Xteq Systems offers &lt;a href="http://www.xteq.com/products/geto/"&gt;GetOSVersion&lt;/a&gt; which returns the current Windows version you are using. However, it also contains an header line so the complete example output is this:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;font-size:78%;"&gt;Xteq GetOSVersion 3.0 - Copyright (C) 2008 Xteq Systems - &lt;/span&gt;&lt;a href="http://www.xteq.com/"&gt;&lt;span style="font-family:Courier;font-size:78%;"&gt;http://www.xteq.com/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;font-size:78%;"&gt;You are using Windows Vista (6.0) with Service Pack 1, return code is 9    &lt;br /&gt;(PlatformID 2; Major: 6; Minor: 0; Build: 6001)&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Not that big deal if you (as an human) reads that but in case you want to export this data into a text file with the following command:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;font-size:78%;"&gt;XQGetOsVer.exe /B &amp;gt;%TEMP%\result.txt&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;you will also of course get the header line you do not want to have. However, these is an easy solution for this: the FOR command. I won't get into the details what you can do with it (a lot and if you are interested use "help FOR" inside the command shell), but to solve the current problem we can simply use these two lines:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;"&gt;del %TEMP%\result.txt     &lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;"&gt;for /F "skip=3 delims=" %%i in ('XQGetOSVer.exe /B') do @echo %%i &amp;gt;&amp;gt;%TEMP%\result.txt &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;First, we delete the file RESULT.TXT and then we execute the FOR command with two special parameters: SKIP=3 indicates that the first three lines from the output of XQGetOSVer.exe should be skipped and thus, the header is removed. The option DELIMS= indicates that we do not have delimiters so we get every line as is. &lt;/p&gt;  &lt;p&gt;The part of DO indicates what we want to do with the remaining lines and use the ECHO command to write them to RESULT.TXT. We are using &amp;gt;&amp;gt; to indicate that we will append to this file (hence the DEL command first) to make sure we get all lines, not just one.&lt;/p&gt;  &lt;p&gt;The result is exactly what we wanted:&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:Courier;"&gt;You are using Windows Vista (6.0) with Service Pack 1, return code is 9    &lt;br /&gt;(PlatformID 2; Major: 6; Minor: 0; Build: 6001)&lt;/span&gt; &lt;/p&gt;  &lt;p&gt;No header, just the the data.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-5261990297842409342?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/5261990297842409342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=5261990297842409342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5261990297842409342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/5261990297842409342'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/05/removing-lines-from-output-of-command.html' title='Removing lines from the output of a command line program'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3399970423099205341</id><published>2008-04-28T10:36:00.001-07:00</published><updated>2008-04-28T10:36:38.930-07:00</updated><title type='text'>Moving an Intel ICH7R RAID (Intel Matrix Storage Controller) to a new main board</title><content type='html'>&lt;p&gt;After struggling nearly four weeks with my computer and being most of the time offline, I finally managed it to build a new computer (Asus P5W, Thermaltake Shark etc.) that is running just fine. &lt;/p&gt;  &lt;p&gt;However, I used an RAID-1 before and the big question was: Will the new motherboard accepts this RAID or do I need to start everything from scratch? &lt;/p&gt;  &lt;p&gt;In general, if you plan to use an RAID-1 later on but currently have only one HD ready, it is no problem to prepare this: Switch the IDE/SATA mode in your BIOS from &amp;#8220;Standard&amp;#8221; or &amp;#8220;AHCI&amp;#8221; to &amp;#8220;RAID&amp;#8221; and enable the ICH7R boot ROM. Then just install Windows (F6 disk for Windows XP needed, Vista has those drivers build-in) as you would normally do. Later on, download and install the Intel Matrix Storage Manager on Windows. Once you have the second disk, simply plug it in, start Windows and start Intel Matrix Storage Manager. Inside it, just select that you want to have a RAID-1 and on the fly, an RAID-1 will be created. &lt;/p&gt;  &lt;p&gt;Basically, this was my idea when attaching one of the old HDs (with my RAID1) to the new motherboard. I especially selected the Asus P5W because the chipset and ICR (Intel 975X with ICH7R) where the same as on my old Shuttle SD39P2 board. &lt;/p&gt;  &lt;p&gt;But to my surprise, the Intel chip is much more intelligent: As soon as I attached one of the drives and booted, the ICH7R notices this one disk, showed the name I gave the RAID volume and Windows started as always. Once Windows was finished installing new components, I simply shut down and attached the second drive. Inside the Boot ROM the second drive was displayed as &amp;#8220;Unknown&amp;#8221; drive but once Windows started, the Matrix Storage Manager informed me that it is rebuilding my array. Two hours later, the RAID-1 was OK again and I did not lose a single file! &lt;/p&gt;  &lt;p&gt;Kudos to Intel for this!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3399970423099205341?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3399970423099205341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3399970423099205341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3399970423099205341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3399970423099205341'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/04/moving-intel-ich7r-raid-intel-matrix.html' title='Moving an Intel ICH7R RAID (Intel Matrix Storage Controller) to a new main board'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-3464317402549526579</id><published>2008-04-10T06:32:00.000-07:00</published><updated>2008-09-25T06:42:55.895-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><title type='text'>Retrieving Windows SharePoint Services user access rights from the database</title><content type='html'>&lt;span style="font-family:verdana;"&gt;I case you ever need to know which access rights a given user has on your Windows SharePoint Services (WSS) site, you may find the following SQL scripts useful.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;This SQL script (simply execute it against the database that has your WSS content) accepts either an email address (&lt;/span&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;@search_email &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;= 'John.Doe@acme.org') or the Windows login name (&lt;/span&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;@search_account&lt;/span&gt;&lt;span style="font-family:verdana;"&gt;='ACME\JohnD').&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;If the given user is found, it will return three tables: The data of the user as WSS sees it, the groups to which the user belongs and finally to which sites the user has access to.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DECLARE @search_email varchar(100)&lt;br /&gt;DECLARE @search_account varchar(100)&lt;br /&gt;&lt;br /&gt;SET @search_email='John.Doe@acme.org&lt;br /&gt;--SET @search_account='ACME\JohnD'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DECLARE @userid int&lt;br /&gt;&lt;br /&gt;-- Retrieve user ID&lt;br /&gt;IF (@search_account is null) BEGIN&lt;br /&gt;  select @userid=tp_ID from userinfo where tp_Email = @search_email&lt;br /&gt;END ELSE BEGIN&lt;br /&gt;  select @userid=tp_ID from userinfo where tp_Login = @search_account&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;-- Show found user&lt;br /&gt;SELECT '' as 'User Info',&lt;br /&gt;       tp_ID,tp_Login,tp_Title from userinfo where tp_ID=@userid&lt;br /&gt;&lt;br /&gt;-- Show group membership&lt;br /&gt;SELECT '' as 'Group membership',&lt;br /&gt;      ID,Title,Description from groups where id in&lt;br /&gt;      ( SELECT groupid from groupmembership where memberid=@userid  )&lt;br /&gt;      order by Title&lt;br /&gt;&lt;br /&gt;-- Show Access rights&lt;br /&gt;SELECT '' as 'Access rights',&lt;br /&gt;      Title, FulLURL from Webs where id in&lt;br /&gt;      ( SELECT WebId FROM WebMembers WHERE (UserId = @userid) )&lt;br /&gt;      order by Title&lt;br /&gt;GO&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-3464317402549526579?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/3464317402549526579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=3464317402549526579' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3464317402549526579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/3464317402549526579'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/04/retrieving-windows-sharepoint-services.html' title='Retrieving Windows SharePoint Services user access rights from the database'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-595937855095327764</id><published>2008-03-15T08:24:00.000-07:00</published><updated>2008-12-10T15:40:26.778-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>The .NET Dataset for Stored Procedures in Visual Studio – the easy way</title><content type='html'>&lt;span style="" lang="EN-US"&gt;In case you need to call or retrieve data from a lot of stored procedures in SQL Server. You basically have two options: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;A) “Hardcore” &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;You create your own class and define a SqlCommand object for each stored procedure manually. While doing this, tell your wife you can't see her for the next weeks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;B) “Lazy man”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;You use a dataset and let Visual Studio do the hard work. You use those generated procedure, tell your boss how many hours this took and leave early to enjoy your weekend.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;The last option seems to be better IMHO, but the DataSet has some funny glitches that can make using it a pain. I’ll try to sort them out here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 1: Create a dataset&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;Easy, just right-click your project, select “Add item” and choose “Dataset”. In this case, the dataset is called “DataSetStoredProcedures”. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_V1tbWNn9eRE/R9vrTd2TtlI/AAAAAAAAAIM/F6_6VtfgFGU/s1600-h/datasetsps1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_V1tbWNn9eRE/R9vrTd2TtlI/AAAAAAAAAIM/F6_6VtfgFGU/s320/datasetsps1.jpg" alt="" id="BLOGGER_PHOTO_ID_5177990916254971474" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 2: Move the generated dataset&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;To not clutter the project, create a new folder (right-click project, “Add” -&gt; “New Folder”) called “DatabaseDataset”. Drag and drop “DataSetStoredProcedures.xsd” there. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/R9vrZN2TtmI/AAAAAAAAAIU/EuHIyrR4e4w/s1600-h/datasetsps2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/R9vrZN2TtmI/AAAAAAAAAIU/EuHIyrR4e4w/s320/datasetsps2.jpg" alt="" id="BLOGGER_PHOTO_ID_5177991015039219298" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 3: Add stored procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;Select “View” -&gt; “Server Explorer” to display the Server Explorer window. Right-click “Data Connections” and select “Add Connection”. Define the properties so Visual Studio can connect to the database. Open the new entry in the tree view and move to “Stored Procedures”.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_V1tbWNn9eRE/R9vrzd2TtoI/AAAAAAAAAIk/7IVXq6moShQ/s1600-h/datasetsps3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_V1tbWNn9eRE/R9vrzd2TtoI/AAAAAAAAAIk/7IVXq6moShQ/s320/datasetsps3.jpg" alt="" id="BLOGGER_PHOTO_ID_5177991466010785410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;In case you haven’t opened DataSetStoredProcedures.xsd, simply double-click it. Simply drag and drop the stored procedures you want to use to this window.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;You may be asked how the connection should be called that will be used to execute this stored procedure, simply choose a name that makes sense to you. Once this all has being done, the project should look something like this:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/R9vr992TtpI/AAAAAAAAAIs/Cj5dW2dp36A/s1600-h/datasetsps4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/R9vr992TtpI/AAAAAAAAAIs/Cj5dW2dp36A/s320/datasetsps4.jpg" alt="" id="BLOGGER_PHOTO_ID_5177991646399411858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 4: Check the stored procedures&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" face="verdana"&gt;&lt;span style="" lang="EN-US"&gt;At any time, you can simply click on a stored procedure, open the properties window and click on the “…” button for the Parameters:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" face="verdana"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/R9vsE92TtqI/AAAAAAAAAI0/3QUJHA5lw0k/s1600-h/datasetsps5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/R9vsE92TtqI/AAAAAAAAAI0/3QUJHA5lw0k/s320/datasetsps5.jpg" alt="" id="BLOGGER_PHOTO_ID_5177991766658496162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" face="verdana"&gt;&lt;span style="" lang="EN-US"&gt;You should do this simply because sometimes the generation is not done right. For example, in this project there is a user defined function (yes, you can also add UDFs) called “fncLTC2UTC” that return an SQL Server datetime value. However, the dataset converted this to “Object”. By using the parameters collection, you can simply change the value of @RETURN from object to DateTime.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" face="verdana"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 5: The glitches, Part I&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" face="verdana"&gt;&lt;span style="" lang="EN-US"&gt;By using the object browser, you can have a look at the namespace layout:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_V1tbWNn9eRE/R90aat2TtsI/AAAAAAAAAJE/oMdx0DBU4hE/s1600-h/datasetsps6.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_V1tbWNn9eRE/R90aat2TtsI/AAAAAAAAAJE/oMdx0DBU4hE/s400/datasetsps6.jpg" alt="" id="BLOGGER_PHOTO_ID_5178324192832239298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;span style="" lang="EN-US"&gt;The project where we have added all this is called “x.server”. Because we have created a subfolder to put the dataset in, the namespace of the dataset has become “x.server.DatabaseDataset”. Beside this, the stored procedures where create in a sub object “QueriesTableAdapter” that has the namespace “x.server.DatabaseDataSet.DataSetStoredProceduresTableAdapters”:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;span style="" lang="EN-US"&gt;Now this is a hell of a namespace we need to add it before we can call a stored procedure:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;span style="line-height: 115%;font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span style="line-height: 115%;font-size:10;" lang="EN-US" &gt; x.server.DatabaseDataset.DataSetStoredProceduresTableAdapters;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;            &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;class&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;JustTesting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Test1()&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;QueriesTableAdapter&lt;/span&gt; qta = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;QueriesTableAdapter&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;qta.procClientAuthentication_GetLoginData(…&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;      &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-weight: bold;"&gt;Step 6: The glitches, Part II&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;br /&gt;Beside this namespace glitch, there is another one: By default, the dataset insists on using the connection string that each stored procedure has attached to (Properties viewer) and you can not to change this. In case you do not want to have the database connection inside app.config this would normally stop the use of the dataset.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 7: The solution&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;However, both glitches can easily be fixed. Within your normal namespace (e.g. “x.server”) simply define a class like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;            &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System.Text;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System.Data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; x.server.DatabaseDataset.DataSetStoredProceduresTableAdapters;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;                                          &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;namespace&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; x.server&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&lt;summary&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/summary&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; Shortcut class to all database stored procedures (procXXX). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;///&lt;/span&gt;&lt;span style="color:green;"&gt; &lt;/span&gt;&lt;span style="color:gray;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;DatabaseProcs&lt;/span&gt;:&lt;span style="color: rgb(43, 145, 175);"&gt;QueriesTableAdapter&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; DatabaseProcs()&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;: &lt;span style="color:blue;"&gt;base&lt;/span&gt;()&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; sConnString = &lt;span style="color: rgb(43, 145, 175);"&gt;“Your Connection string here”;&lt;/span&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: rgb(43, 145, 175);"&gt;IDbCommand&lt;/span&gt; cmd &lt;span style="color:blue;"&gt;in&lt;/span&gt; CommandCollection)&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;                &lt;/span&gt;cmd.Connection.ConnectionString = sConnString;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;}&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;br /&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="" lang="EN-US"&gt;This class solves the two glitches: You need to reference the namespace only in this class (DatabaseProcs), all other objects that will use this class do not need to do it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;Second, DatabaseProcs is derived from QueriesTableAdapter so it can use the protected property “ConnectionString” and change it to anything you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;With this class in between, calling a stored procedure is quite simple:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;            &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;using&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; System.Text;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;&lt;/span&gt;&lt;/p&gt;              &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style=";font-size:10;color:blue;"  lang="EN-US" &gt;namespace&lt;/span&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt; x.server&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;JustTesting&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=""&gt;    &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; Test1()&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;        &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;DatabaseProcs&lt;/span&gt; procs = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;DatabaseProcs&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin: 0cm 0cm 0.0001pt 70.8pt; line-height: normal;font-family:verdana;"&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;procs.procClientAuthentication_GetLoginData(…&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt 70.8pt; line-height: normal; font-family: verdana;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin: 0cm 0cm 0.0001pt 70.8pt; line-height: normal;font-family:verdana;"&gt;&lt;br /&gt;&lt;span lang="EN-US"  style="font-size:10;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;No more stupid namespaces and you your custom connection string is also set.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;The generated class will also leave the connection in the same state as it was before. This means, when you use the class DatabaseProcs (aka “QueriesTableAdapter”) like this, a connection will be opened when you execute it and closed right after that. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;This might lead to a performance issue if you do not use connection pooling. To enable connection pooling simply use a connection string like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;span style="font-family:courier new;"&gt;Data Source=(local)\SQLEXPRESS;Initial Catalog=X;Integrated Security=True;Pooling=True;Min Pool Size=0;Max Pool Size=5;Application Name=MyApp&lt;/span&gt;&lt;o:p style="font-family: courier new;"&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p style="font-family: courier new;"&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;If pooling is activated, a Connection.Close() does not actually close the connection but instead it will put the connection in the pool and reuse it when the next request to Connection.Open() comes in. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"  style="margin-bottom: 0.0001pt; line-height: normal;font-family:verdana;"&gt;&lt;span style="" lang="EN-US"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Enjoy!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-595937855095327764?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/595937855095327764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=595937855095327764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/595937855095327764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/595937855095327764'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/03/net-dataset-for-stored-procedures-in.html' title='The .NET Dataset for Stored Procedures in Visual Studio – the easy way'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_V1tbWNn9eRE/R9vrTd2TtlI/AAAAAAAAAIM/F6_6VtfgFGU/s72-c/datasetsps1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-6790102201249624116</id><published>2008-03-05T03:24:00.000-08:00</published><updated>2008-12-10T15:40:26.947-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fun'/><title type='text'>Java Embargo</title><content type='html'>Okay, I know Germany and the USA had their problems in the past. But this is going too far...&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_V1tbWNn9eRE/R86DRbHikGI/AAAAAAAAAIE/ymPVo-wybJM/s1600-h/JavaEmargo.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_V1tbWNn9eRE/R86DRbHikGI/AAAAAAAAAIE/ymPVo-wybJM/s320/JavaEmargo.png" alt="" id="BLOGGER_PHOTO_ID_5174217357255676002" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-6790102201249624116?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/6790102201249624116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=6790102201249624116' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6790102201249624116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/6790102201249624116'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/03/java-embargo.html' title='Java Embargo'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_V1tbWNn9eRE/R86DRbHikGI/AAAAAAAAAIE/ymPVo-wybJM/s72-c/JavaEmargo.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-147701910490764939</id><published>2008-02-26T02:42:00.000-08:00</published><updated>2009-07-24T09:31:07.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fix'/><title type='text'>Backup Exec 12: Error "The Backup Exec Server Service detected a schema version mismatch."</title><content type='html'>&lt;p class="MsoNormal"  style="font-family:verdana;"&gt;&lt;span style="font-weight: bold;"&gt;[UPDATE]&lt;/span&gt; The exact same can happen in BE 12.5. See &lt;a href="http://texhex.blogspot.com/2009/07/backup-exec-125-error-backup-exec.html"&gt;this post&lt;/a&gt; for details. &lt;span style="font-weight: bold;"&gt;[/UPDATE]&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" face="verdana"&gt;I just tried to update our Backup Exec 11d SP1 to Backup Exec 12 and although all pre-checks were okay and the installation did also not issue any errors, BE didn't started. Checked the event log and the following events were logged:&lt;/p&gt;    &lt;p style="font-family: courier new;" face="courier new" class="MsoNormal"&gt;The Backup Exec Server Service detected a schema version mismatch.&lt;/p&gt;  &lt;p class="MsoNormal" face="verdana"&gt;&lt;o:p&gt;and&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;      &lt;p class="MsoNormal" style="font-family: verdana;"&gt;&lt;span style="font-family:courier new;"&gt;The Backup Exec Server Service did not start. An internal error (-536813108) occurred in object 1.&lt;/span&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Oh, I really love database schema errors. According to the Symantec support website (&lt;a href="http://seer.entsupport.symantec.com/docs/283038.htm"&gt;http://seer.entsupport.symantec.com/docs/283038.htm&lt;/a&gt; or &lt;a href="http://seer.entsupport.symantec.com/docs/254014.htm"&gt;http://seer.entsupport.symantec.com/docs/254014.htm&lt;/a&gt;) you need to recreate the entire database if this error happens which means you need to recreate everything from scratch! Thanks for nothing buddy!&lt;/p&gt;    &lt;p class="MsoNormal" style="font-family: verdana;"&gt;Using SQL Server Profiler, I was able to figure out what the problem was. BE uses two tables as schema reference: &lt;span style="font-family:courier new;"&gt;ControlInfo &lt;/span&gt;and &lt;span style="font-family:courier new;"&gt;Version &lt;/span&gt;(you can simply install the SQL Server Mngmt Studio Express and issue an "select * from …" for these two). In this case here, ControlInfo was okay (Version 12.0) but Version still had 11 for some components listed.&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;There are two SQL files you need to execute against your BEDB database (using Mngmt Studio Express for example):&lt;/p&gt;  &lt;p style="font-family: courier new;" face="courier new" class="MsoNormal"&gt;C:\Program Files\Symantec\Backup Exec\dbupgrade11.5.sql&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;If there are any errors, you may ignore them.&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;Once this has run, run&lt;/p&gt;  &lt;p class="MsoNormal" style="font-family: courier new;"&gt;C:\Program Files\Symantec\Backup Exec\dbupgrade11.5-viewandsp.sql&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;Inside this file, there might be a problem with the following command:&lt;/p&gt;    &lt;p  class="MsoNormal" style="font-family:courier new;"&gt;-- sync with bedb.sql version, 1.644&lt;/p&gt;  &lt;p face="courier new" class="MsoNormal"&gt;ALTER TABLE [dbo].[Alert] ADD &lt;/p&gt;  &lt;p face="courier new" class="MsoNormal"&gt;&lt;span style=""&gt;           &lt;/span&gt;CONSTRAINT [DF_Alert_UMI] DEFAULT (N'') FOR [UMI]&lt;/p&gt;  &lt;p style="font-family: courier new;" class="MsoNormal"&gt;GO&lt;/p&gt;    &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;Simply delete these lines and the script will run to the end. Restarting Backup Exec should now show that BE does no longer throw an schema mismatch error.&lt;/p&gt;  &lt;p style="font-family: verdana;" class="MsoNormal"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="MsoNormal"&gt;Enjoy!&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-147701910490764939?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/147701910490764939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=147701910490764939' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/147701910490764939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/147701910490764939'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/02/backup-exec-12-error-backup-exec-server.html' title='Backup Exec 12: Error &quot;The Backup Exec Server Service detected a schema version mismatch.&quot;'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-90974690798517414</id><published>2008-02-18T07:05:00.000-08:00</published><updated>2008-02-21T02:06:43.565-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Setting the right font for a Windows Forms application</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;If you create a new form in Visual Studio, the default font will always be "Microsoft Sans Serif" although you should use a font that depends on the Windows version you are running on. For Windows 2000, XP, Server 2003 you should use "Tahoma" for &lt;st1:place st="on"&gt;Vista&lt;/st1:place&gt; and above it should be "&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/uxguide/uxguide/Resources/WhatsNewInVista/fonts.asp"&gt;Segoe UI&lt;/a&gt;". In any case, do not use "MS Sans Serif".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;Unfortunately, there is no simple property available so the form uses the correct font automatically. &lt;a href="http://brh.numbera.com/blog/index.php/2007/04/11/setting-the-correct-default-font-in-net-windows-forms-apps/"&gt;Benjamin Hollis has a blog entry&lt;/a&gt; about this problem already and his code is quite simple and works quite well. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="" lang="EN-US"&gt;It just does not take into account if a form contains other, specialized fonts or if the fonts used have special styles (Underlined, Italics etc.) applied. I have tweaked his code a little bit.. ähm.. a lot actually and this is the result: FormFontFixer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: bold;"&gt;UPDATE:&lt;/span&gt; The code is now licensed under a BSD license (see below)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;//Original idea and code (3 lines :-) by Benjamin Hollis: http://brh.numbera.com/blog/index.php/2007/04/11/setting-the-correct-default-font-in-net-windows-forms-apps/&lt;br /&gt;//Copyright (C) TeX HeX of Xteq Systems: http://texhex.blogspot.com/ and http://www.texhex.info/&lt;br /&gt;public static class FormFontFixer&lt;br /&gt;{&lt;br /&gt;//This list contains the fonts we want to replace.&lt;br /&gt;static readonly List&amp;lt;string&amp;gt; FontReplaceList&lt;br /&gt;         = new List&amp;lt;string&amp;gt;( new string[] { "Microsoft Sans Serif", "Tahoma" } );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;static Font _DefaultFont;&lt;br /&gt;static bool _CanFixFonts;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;static FormFontFixer()&lt;br /&gt;{&lt;br /&gt;   //Basically the font name we want to use should be easy to choose by using the SystemFonts class. However, this class&lt;br /&gt;   //is hard-coded (!!) and doesn't seem to work right. On XP, it will mostly return "Microsoft Sans Serif" except&lt;br /&gt;   //for the DialogFont property (=Tahoma) but on Vista, this class will return "Tahoma" instead of "SegoiUI" for this property!&lt;br /&gt;&lt;br /&gt;   //Therefore we will do the following: If we are running on a OS below XP, we will exit because the only font available&lt;br /&gt;   //will be MS Sans Serif. On XP, we gonna use "Tahoma", and any other OS we will use the value of the MessageBoxFont&lt;br /&gt;   //property because this seems to be set correctly on Vista an above.&lt;br /&gt;&lt;br /&gt;   if (Environment.OSVersion.Platform==PlatformID.Win32Windows)&lt;br /&gt;   {&lt;br /&gt;       //95, 98 and other crap&lt;br /&gt;       _CanFixFonts = false;&lt;br /&gt;       return;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   if (Environment.OSVersion.Version.Major &amp;lt; 5)&lt;br /&gt;   {&lt;br /&gt;       //Windows NT&lt;br /&gt;       _CanFixFonts = false;&lt;br /&gt;       return;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   if (Environment.OSVersion.Version.Major &amp;lt; 6)&lt;br /&gt;   {&lt;br /&gt;       //Windows 2000 (5.0), Windows XP (5.1), Windows Server 2003 and XP Pro x64 Edtion v2003 (5.2)&lt;br /&gt;       _CanFixFonts = true;&lt;br /&gt;       _DefaultFont = SystemFonts.DialogFont; //Tahoma hopefully&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       //Vista and above&lt;br /&gt;       _CanFixFonts = true;&lt;br /&gt;       _DefaultFont = SystemFonts.MessageBoxFont; //should be SegoiUI&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void Fix(Form form)&lt;br /&gt;{&lt;br /&gt;   //If we can't fix the font, exit&lt;br /&gt;   if (_CanFixFonts == false)&lt;br /&gt;   {&lt;br /&gt;       return;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   //Now start with the real work...&lt;br /&gt;   foreach (Control c in form.Controls)&lt;br /&gt;   {&lt;br /&gt;       //only replace fonts that use one the "system fonts" we have declared&lt;br /&gt;       if (FontReplaceList.IndexOf(c.Font.Name) &amp;gt; -1)&lt;br /&gt;       {                  &lt;br /&gt;           //Now check the size, when the size is 9 or below it's the default font size and we do not keep the size since&lt;br /&gt;           //SegoiUI has a complete different spacing (and thus size) than MS SansS or Tahoma.&lt;br /&gt;          &lt;br /&gt;           //Also check if there are any styles applied on the font (e.g. Italic) which we need to apply to the new&lt;br /&gt;           //font as well.&lt;br /&gt;&lt;br /&gt;           bool bUseDefaultSize = true;&lt;br /&gt;           bool bUseDefaultStyle = true;&lt;br /&gt;&lt;br /&gt;           //is this a special size?&lt;br /&gt;           if ((c.Font.Size &amp;lt;= 8) || (c.Font.Size &amp;gt;= 9))&lt;br /&gt;           {&lt;br /&gt;               bUseDefaultSize = false;&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;           //are any special styles (bold, italic etc.) applied to this font?&lt;br /&gt;           if ( (c.Font.Italic == true) ||&lt;br /&gt;                (c.Font.Strikeout == true) ||&lt;br /&gt;                (c.Font.Underline == true) ||&lt;br /&gt;                (c.Font.Bold == true))&lt;br /&gt;           {&lt;br /&gt;               bUseDefaultStyle = false;&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;           //if everything is set to defaults, we can use our prepared font right away&lt;br /&gt;           if ((bUseDefaultSize == true) &amp;amp;&amp;amp; (bUseDefaultStyle == true))&lt;br /&gt;           {&lt;br /&gt;               c.Font = _DefaultFont;&lt;br /&gt;           }&lt;br /&gt;           else&lt;br /&gt;           {&lt;br /&gt;               //There are non default properties set so&lt;br /&gt;               //there is some work we need to do...&lt;br /&gt;&lt;br /&gt;                                      &lt;br /&gt;               //Restrive custom font style&lt;br /&gt;               FontStyle Style = FontStyle.Regular;                       &lt;br /&gt;               if (bUseDefaultStyle == false)&lt;br /&gt;               {&lt;br /&gt;                   if (c.Font.Italic) {                           &lt;br /&gt;                        Style = Style | FontStyle.Italic;&lt;br /&gt;                   }&lt;br /&gt;                   if (c.Font.Strikeout) {&lt;br /&gt;                        Style = Style | FontStyle.Strikeout;&lt;br /&gt;                   }&lt;br /&gt;                   if (c.Font.Underline) {&lt;br /&gt;                       Style = Style | FontStyle.Underline;&lt;br /&gt;                   }&lt;br /&gt;                   if (c.Font.Bold){&lt;br /&gt;                       Style = Style | FontStyle.Bold;&lt;br /&gt;                   }&lt;br /&gt;               }&lt;br /&gt;&lt;br /&gt;               //Retrive custom size&lt;br /&gt;               float fFontSize = _DefaultFont.SizeInPoints;&lt;br /&gt;               if (bUseDefaultSize == false)&lt;br /&gt;               {&lt;br /&gt;                   fFontSize = c.Font.SizeInPoints;&lt;br /&gt;&lt;br /&gt;               }&lt;br /&gt;&lt;br /&gt;               //Finally apply this font...&lt;br /&gt;               Font font = new Font(_DefaultFont.Name, fFontSize, Style, GraphicsUnit.Point);&lt;br /&gt;               c.Font = font;&lt;br /&gt;&lt;br /&gt;           }                &lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;&lt;br /&gt;&lt;br /&gt;Copyright (c) 2008, TeX HeX (http://www.texhex.info/)&lt;br /&gt;&lt;br /&gt;All rights reserved.&lt;br /&gt;&lt;br /&gt;Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:&lt;br /&gt;&lt;br /&gt;   * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;   * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;   * Neither the name of the Xteq Systems (http://www.xteq.com/) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;&lt;br /&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS&lt;br /&gt;"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT&lt;br /&gt;LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR&lt;br /&gt;A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR&lt;br /&gt;CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,&lt;br /&gt;EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,&lt;br /&gt;PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR&lt;br /&gt;PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF&lt;br /&gt;LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING&lt;br /&gt;NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&lt;br /&gt;SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7725030-90974690798517414?l=texhex.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://texhex.blogspot.com/feeds/90974690798517414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7725030&amp;postID=90974690798517414' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/90974690798517414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7725030/posts/default/90974690798517414'/><link rel='alternate' type='text/html' href='http://texhex.blogspot.com/2008/02/setting-right-font-for-windows-forms.html' title='Setting the right font for a Windows Forms application'/><author><name>TeX HeX</name><uri>http://www.blogger.com/profile/14268105680697143201</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/-oJoWDtfb7zc/TxmntpUuMmI/AAAAAAAAAnE/YirGg2sdDsM/s220/_Done2.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7725030.post-5795630368966538965</id><published>2008-02-16T04:15:00.000-08:00</published><updated>2008-09-25T06:43:11.099-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Security Neutral Mutex</title><content type='html'>&lt;w:sdt  contentlocked="t" sdtgroup="t" id="89512093" style="font-family:verdana;"&gt;&lt;span style="font-size:78%;"&gt;&lt;w:sdtpr&gt;&lt;/w:sdtpr&gt;&lt;w:sdt xpath="/ns0:BlogPostInfo/ns0:PostTitle" docpart="4B7B9F27E81A4AF68A6B4E8702BC9B50" text="t" storeitemid="X_F5AD2B82-50D2-4E60-B4B1-793D41D1531F" title="Titel des Beitrags" id="89512082"&gt;&lt;/w:sdt&gt;&lt;/span&gt;&lt;/w:sdt&gt;&lt;span  lang="EN-US" style="font-family:verdana;"&gt;We have just completed a project where we had a very “strange” requirement: A Mutex that is normally created by a service but might also be changed or created by the application running as a limited user. Before .NET, we would simply have created a Mutex with a NULL DACL but this is no longer possible because the Mutex Class will actively prevent this. &lt;o:p&gt;&lt;/o:p&gt;&l
