<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Remko Weijnen&#039;s Blog (Remko&#039;s Blog)</title> <atom:link href="http://www.remkoweijnen.nl/blog/feed/" rel="self" type="application/rss+xml" /><link>http://www.remkoweijnen.nl/blog</link> <description>About Terminal Server, Citrix, Delphi and other stuff</description> <lastBuildDate>Tue, 31 Jan 2012 15:37:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Dear Visitor</title><link>http://www.remkoweijnen.nl/blog/2007/11/01/dear-visitor/</link> <comments>http://www.remkoweijnen.nl/blog/2007/11/01/dear-visitor/#comments</comments> <pubDate>Thu, 01 Nov 2007 14:19:05 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2007/11/01/dear-visitor/</guid> <description><![CDATA[If this is your first visit, take your time and look around. Here are some things you might be looking for: SasLibEx: a library that can simulate the Secure Attention Sequence (Ctrl-Alt-Del) but it can even unlock a workstation or session without entering or needing the user&#8217;s credentials (and many more things). Who locks my [...]]]></description> <content:encoded><![CDATA[<div class="announcement_post"><p>If this is your first visit, take your time and look around. Here are some things you might be looking for:</p><ul><li><a  href="http://www.simulatesas.com/blog/tag/saslibex/">SasLibEx</a>: a library that can simulate the Secure Attention Sequence (Ctrl-Alt-Del) but it can even unlock a workstation or session without entering or needing the user&#8217;s credentials (and many more things).</li><li><a  href="/blog/2011/01/03/cannot-access-files-but-need-the-origin/">Who locks my file</a>?</li><li><a  href="http://www.remkoweijnen.nl/blog/2009/06/23/patch-vistas-kernel-to-address-more-than-4-gb-of-memory/">Patch 32 bit Windows to use the full 4 GB (and even more) memory</a></li><li>Patch Terminal Server to allow more Concurrent Sessions: <a  href="http://www.remkoweijnen.nl/blog/2008/08/31/patch-windows-2003-terminal-server-to-allow-more-than-2-concurrent-sessions/">2003</a>, <a  href="http://www.remkoweijnen.nl/blog/2008/12/19/windows-xp-x64-terminal-server-patch-part-1-mandatory/">Windows XP X64</a>, <a  href="http://www.remkoweijnen.nl/blog/2008/12/09/windows-2003-x64-terminal-server-patch/">2003 X64</a>, <a  href="http://www.remkoweijnen.nl/blog/2008/10/21/patch-windows-2008-terminal-server-to-allow-more-than-2-concurrent-sessions/">2008</a>, <a  href="http://www.remkoweijnen.nl/blog/2008/06/14/mutiple-concurrent-terminal-session-on-vista-sp1/">Vista</a></li><li>Some of my freeware tools such as <a  href="http://www.remkoweijnen.nl/blog/2007/10/17/launch-rdp-from-commandline/">LaunchRDP</a>, <a  href="http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/">RDP Password Encryption</a>, <a  href="http://www.remkoweijnen.nl/blog/2007/11/01/query-active-directory-from-excel/">Active Directory Excel Addin</a>, <a  href="http://www.remkoweijnen.nl/blog/2007/10/25/rdp-clipboard-fix/">RDP Clipboard Fix</a> (well this list can go on and on, see also the Downloads section).</li></ul><p>Do you like my work? Did my work help you?</p><ul><li>Leave a comment and tell me how it was usefull to you.</li><li>If you want you can make a donation with the Paypal Donate Button in the right Sidebar.</li></ul><p>Thank you!</p><p></p></div> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2007/11/01/dear-visitor/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Harmony Client crashes upon exit</title><link>http://www.remkoweijnen.nl/blog/2012/01/31/harmony-client/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/31/harmony-client/#comments</comments> <pubDate>Tue, 31 Jan 2012 15:37:08 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Citrix]]></category> <category><![CDATA[Packaging]]></category> <category><![CDATA[Windows 2003]]></category> <category><![CDATA[ThinApp]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/31/harmony-client/</guid> <description><![CDATA[Today I was troubleshooting the application &#8220;Harmony Client&#8221; which crashed upon exiting: The application had been thinapped and the error only appeared when starting the thinapped version. Using Process Monitor I noticed that the application wrote logfiles to the C:\Temp\HarmonyClient\Log folder (which of course it shouldn&#8217;t write there.). 00.11:12:56.033 Log created on 31-01-2012 (c:\temp\Harmonyclient\Log\HMY_Client_03A2@server_20120131_111256.LOG) User [...]]]></description> <content:encoded><![CDATA[<p>Today I was troubleshooting the application &#8220;Harmony Client&#8221; which crashed upon exiting:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image21.png" rel="lightbox" class="thickbox no_icon" title="HARMONY_Client.exe - Toepassingsfout"><img style="display: inline" title="HARMONY_Client.exe - Toepassingsfout" alt="Toepassingspop-up: HARMONY_Client.exe - Toepassingsfout : De instructie op 0x77e621b6 verwijst naar geheugen op 0x4b750000. Een lees- of schrijfbewerking op het geheugen is mislukt: | The memory could not be read." src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb21.png" width="415" height="84" /></a></p><p>The application had been thinapped and the error only appeared when starting the thinapped version.</p><p><span id="more-2368"></span><p>Using Process Monitor I noticed that the application wrote logfiles to the C:\Temp\HarmonyClient\Log folder (which of course it shouldn&#8217;t write there.).</p><div class="dean_ch" style="white-space: wrap;">00.11:12:56.033 Log created on 31-01-2012 (c:\temp\Harmonyclient\Log\HMY_Client_03A2@server_20120131_111256.LOG) User name: testuser<br /> 00.11:13:04.423 00000318 TCOEventHandler &nbsp; EXCEPTION: Destroy eventhandler is called while client is still running. <br /> 00.11:13:04.424 00000318 TCOEventHandler &nbsp;.Destroy<br /> 00.11:13:04.424 00000318 TCOEventHandler &nbsp;.Destroy &#8230; Done<br /> 00.11:13:04.424 00000318 TCOEventHandler &nbsp; Client disconnected by user</div><p>My next step was to trace using the Thinapp Log Monitor but unfortunately the error doesn&#8217;t occur when tracing.</p><p>This makes me believe it&#8217;s a timing issue; upon exit the application is cleaning up memory (objects) but destroys a certain object (eventhandler) while it&#8217;s still being accessed.</p><p>Upon further inspection of the Process Monitor log I noticed access to a file called HARMONY_Client.exe.9e3c5c50.ini.inuse which was in the ThinApp SandBox (<em>%Local AppData%\ApplicationHistory\HARMONY_Client.exe.9e3c5c50.ini.inuse</em>).</p><p>The application creates this file when it&#8217;s started and when it exists it copies this to <em>HARMONY_Client.exe.9e3c5c50.ini</em>.</p><p>I deleted this file and this made the error go away. Perhaps this fault will surface again in the future, further testing will need to tell us.</p><p><strong><u>Workaround<br /> <br /></u></strong>Delete *.inuse from the SandBox, preferably using a (vbs) script in the thinapp package each time the app is launched.</p><p><strong><u>Solution<br /> <br /></u></strong>Contact Vendor and get them to fix their software and while they&#8217;re at it, have them fix access to things such as C:\Temp as well.</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/31/harmony-client/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Bypassing RES/Appsense Application Security</title><link>http://www.remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/#comments</comments> <pubDate>Fri, 27 Jan 2012 15:15:38 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Citrix]]></category> <category><![CDATA[RES]]></category> <category><![CDATA[Windows 2003]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/?p=2354</guid> <description><![CDATA[The video below shows a Proof of Concept of bypassing Application Security in RES Workspace Manager . Please note that at this time the code is not publicly available so please don&#8217;t ask for it. EDIT 2: I added a video that I received from someone who tried my Excel Sheet with AppSense Application Manager. [...]]]></description> <content:encoded><![CDATA[<p>The video below shows a Proof of Concept of bypassing Application Security in RES Workspace Manager .</p><p>Please note that at this time the code is not publicly available so please don&#8217;t ask for it.</p><p><strong>EDIT 2</strong>: I added a video that I received from someone who tried my Excel Sheet with AppSense Application Manager.</p><hr /><p><strong>EDIT:</strong> I wanted to clarify a couple of things regarding this post.</p><p>First of all I would like to explain why I wrote this code and why I choose to test it with RES WM.</p><p>I had the idea about this approach a long time ago but I never got around to actually do it. The main reason was that I needed to convert Delphi code to VBA and especially converting some Windows headers was a lot of work. Then suddenly I noticed that someone had already converted the headers, so I all I had to do was rewrite the code that used it to VBA.</p><p>The choice for RES was made because of two reasons:</p><ol><li>If you want to beat something, you want to beat the best and I most certainly consider RES WM to be one of the top products.</li><li>At the time I wrote the POC code I had access to an enviroment with RES in it.</li></ol><p>I would like to emphasize that RES contacted me very quickly after publishing this blog. I&#8217;ve had contact with RES and they showed a very constructive approach with their primary goal being a fix or guidance for their customers. Hats of to RES taking a constructive approach and I will be working together with RES on this issue.</p><p>Finally I would like to state that I didn&#8217;t expect this post to draw this much attention, if I did I would have probably taken another approach.</p><hr /><p>&nbsp;</p><p><span id="more-2354"></span></p><div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b589a7f7-312a-4fcc-8f47-3c2f1c8862c2" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;"><object width="448" height="252" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/ZdEzV1R2yBs?hd=1" /><param name="wmode" value="transparent" /><embed width="448" height="252" type="application/x-shockwave-flash" src="http://www.youtube.com/v/ZdEzV1R2yBs?hd=1" wmode="transparent" /></object></div><p>&nbsp;</p><h3>Same demo but now with AppSense:</h3><div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:621b380a-4f9f-43ba-becd-7f38384e55bd" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;"><object width="448" height="252" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/UJvptlKxEEk?hd=1" /><param name="wmode" value="transparent" /><embed width="448" height="252" type="application/x-shockwave-flash" src="http://www.youtube.com/v/UJvptlKxEEk?hd=1" wmode="transparent" /></object></div> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/27/bypassing-res-application-security/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>From Jailbreak to Jailbreak part 2</title><link>http://www.remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/#comments</comments> <pubDate>Sat, 21 Jan 2012 13:02:15 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[iPhone]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[Jailbreak]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/</guid> <description><![CDATA[In this post, which is a followup on my From JailBreak to Jailbreak post, I will describe the same procedure for A5 devices (iPhone 4S and iPad 2). A lot of the stuff is really the same so I will not describe that again, this includes the actual update to iOs 5.01, xBackup, SHSH signatures [...]]]></description> <content:encoded><![CDATA[<p><a  href="http://www.peppercrew.nl/wp-content/uploads/2012/01/image19.png" class="thickbox no_icon" rel="gallery-2351" title="image"><img title="image" src="http://www.peppercrew.nl/wp-content/uploads/2012/01/image_thumb19.png" alt="image" width="56" height="55" align="left" /></a>In this post, which is a followup on my <a  href="http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/" target="_blank">From JailBreak to Jailbreak</a> post, I will describe the same procedure for A5 devices (iPhone 4S and iPad 2).</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image15.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="display: inline; float: right;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb15.png" alt="image" width="51" height="51" align="right" /></a>A lot of the stuff is really the same so I will not describe that again, this includes the actual update to iOs 5.01, xBackup, SHSH signatures and backup using iTunes.</p><p>Currently the Jailbreak for A5 devices with iOS 5 is only for iOS 5.01. Since Apple is expected to release iOS 5.1 very soon it&#8217;s highly recommended to <strong><span style="text-decoration: underline;"><a  href="http://www.peppercrew.nl/index.php/2012/01/update-your-a5-devies-to-ios-5-01-now/" target="_blank">update to iOS 5.01 NOW</a></span></strong>. Especially because it&#8217;s not yet possible to downgrade to iOS 5.01 using Tiny Umbrella.</p><p><span id="more-2351"></span></p><p>Although a Windows version of the Jailbreak will be released soon (in the form of an updated Redsn0w) I decided to do the Jailbreak now on my iPad2 3G.</p><p><strong>Update:</strong> the Windows version of the Absinthe Jailbreak has been released and can be found <a  href="http://cache.greenpois0n.com/dl/absinthe-win-0.2.zip" target="_blank">here</a>. Note that all steps below and screenshots refer to the Mac OS X version on a virtualized OS X.</p><p><strong><span style="color: #ff0000;">Before you begin, delete any VPN Connections you might have defined on your device.</span></strong></p><p>I used VMWare Workstation and a Virtual Machine with Mac OS X and it worked perfectly.</p><table width="400" border="0" cellspacing="20" cellpadding="2"><tbody><tr><td valign="top" width="200">Connect your iPad2 to the Virtual Machine:</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML243c16.png" rel="lightbox" class="thickbox no_icon" title="SNAGHTML243c16"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="SNAGHTML243c16" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML243c16_thumb.png" alt="SNAGHTML243c16" width="179" height="42" border="0" /></a></td></tr><tr><td valign="top" width="200">Launch Absinthe and press the Jailbreak button:</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image16.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="display: inline;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb16.png" alt="image" width="185" height="135" /></a></td></tr><tr><td valign="top" width="200">The Jailbreak starts automatically, you do not need to go into DFU mode. Note that this first step may take a while (around 30 minutes in my case):</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image17.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb17.png" alt="image" width="185" height="136" border="0" /></a></td></tr><tr><td valign="top" width="200">When the process finishes the device is rebooted:</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image18.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb18.png" alt="image" width="190" height="140" border="0" /></a></td></tr><tr><td valign="top" width="200">Then the actual Payload is sent:</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image19.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb19.png" alt="image" width="188" height="138" border="0" /></a></td></tr><tr><td valign="top" width="200">And if all is well you should end with this screen:</td><td valign="top" width="200"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image20.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb20.png" alt="image" width="188" height="138" border="0" /></a></td></tr></tbody></table><p>If the above steps went well you should have a Green Pois0n icon, just click it and the rest of the process should perform automatically.</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image2.png" class="thickbox no_icon" rel="gallery-2351" title="Cydia Icon"><img style="display: inline; float: left;" title="Cydia Icon" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb2.png" alt="Cydia Icon" width="70" height="70" align="left" /></a>In my case it didn&#8217;t but I could manually trigger it by going to Settings | VPN (there should be a Jailbreak VPN entry) and connect to it. My iPad automatically rebooted after which the Cydia icon appeared.</p><p>Last step is start Cydia which will adjust the filesystem and the Jailbreak is finished.</p><p>I restored my Cydia settings, repositories and apps using xBackup as I described in the <a  href="http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/" target="_blank">previous post</a>. The other steps like installing Installous and synching Apps with iTunes are identical as well.</p><p>Have fun and please let me know if you have tips or any steps I missed!</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/21/from-jailbreak-to-jailbreak-part-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Get the location of an advertised shortcut</title><link>http://www.remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/#comments</comments> <pubDate>Wed, 18 Jan 2012 12:28:36 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[script]]></category> <category><![CDATA[MSI]]></category> <category><![CDATA[VBS]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/</guid> <description><![CDATA[Installers can create so called Advertised Shortcuts in the Start Menu. I wanted to check the Target Path of such an shortcut but Explorer doesn&#8217;t show it: But we can easily retrieve the path using a small VB Script: Option Explicit Dim WshShell : Set WshShell = WScript.CreateObject(&#34;Wscript.Shell&#34;) Dim objShortcut : Set objShortcut = WshShell.CreateShortcut(WScript.Arguments(0)) [...]]]></description> <content:encoded><![CDATA[<p>Installers can create so called Advertised Shortcuts in the Start Menu. I wanted to check the Target Path of such an shortcut but Explorer doesn&#8217;t show it:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image13.png" rel="lightbox" class="thickbox no_icon" title="Microsoft Visio 2010 Properties"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Microsoft Visio 2010 Properties" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb13.png" alt="Microsoft Visio 2010 Properties | Shortcut Properties | Target Path" width="233" height="317" border="0" /></a></p><p><span id="more-2334"></span></p><p>But we can easily retrieve the path using a small VB Script:</p><div class="dean_ch" style="white-space: wrap;">Option Explicit<br /> Dim WshShell : Set WshShell = WScript.CreateObject(&quot;Wscript.Shell&quot;)<br /> Dim objShortcut : Set objShortcut = WshShell.CreateShortcut(WScript.Arguments(0))<br /> WScript.Echo(&quot;Target Path &nbsp;: &quot; &amp; objShortcut.TargetPath &amp; vbCrLf &amp; _<br /> &quot;Icon Location: &quot; &amp; objShortcut.IconLocation)</p><p>Set objShortcut = Nothing<br /> Set WshShell = Nothing</div><p>The scripts accepts the shortcut filename as a parameter so you can simply drag the shortcut to the script and it will show the Target Path and Icon Location:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image14.png" rel="lightbox" class="thickbox no_icon" title="Windows Script Host"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Windows Script Host" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb14.png" alt="Target Path  : C:\WINDOWS\Installer\{90140000-0057-0000-0000-0000000FF1CE}\visicon.exe |Icon Location: C:\WINDOWS\Installer\{90140000-0057-0000-0000-0000000FF1CE}\visicon.exe,0" width="419" height="98" border="0" /></a></p><p>Bonus Chatter: if you want to prevent an installer from creating Advertised Shortcuts set the DISABLEADVTSHORTCUTS MSI property to 1 (MsiExec /I MyMsi.msi DISABLEADVTSHORTCUTS=1).</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/18/get-the-location-of-an-advertised-shortcut/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Take ownership of a registry key in PowerShell</title><link>http://www.remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/#comments</comments> <pubDate>Mon, 16 Jan 2012 15:39:36 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[PowerShell]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/</guid> <description><![CDATA[After reading Andy Morgan&#8217;s (excellent) blog post about Removing Screen Resolution and Personalize shell extensions from a users desktop session I couldn&#8217;t help it. I had to write a PowerShell script to take ownership of the mentioned registry keys. So here goes: The code is only quick to show we can do it (after all [...]]]></description> <content:encoded><![CDATA[<p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image11.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="display: inline; float: left;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb11.png" alt="image" width="101" height="70" align="left" /></a>After reading Andy Morgan&#8217;s (excellent) blog post about<a  href="http://andrewmorgan.ie/2012/01/16/removing-screen-resolution-and-personalize-shell-extensions-from-a-users-desktop-session/" target="_blank"> Removing Screen Resolution and Personalize shell extensions from a users desktop session</a> I couldn&#8217;t help it.</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image12.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="display: inline; float: right;" title="image" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb12.png" alt="image" width="38" height="37" align="right" /></a>I had to write a PowerShell script to take ownership of the mentioned registry keys. So here goes:</p><p><span id="more-2327"></span></p><p>The code is only quick to show we can do it (after all PowerShell has no limits) and could be improved error handling and so on. But it works!</p><div class="dean_ch" style="white-space: wrap;"><span class="re3">$definition</span> = @<span class="st0">&quot;<br /> using System;<br /> using System.Runtime.InteropServices;</p><p>namespace Win32Api<br /> {</p><p>&nbsp; &nbsp;public class NtDll<br /> &nbsp; &nbsp;{<br /> &nbsp; &nbsp;&nbsp; &nbsp;[DllImport(&quot;</span>ntdll.<span class="me1">dll</span><span class="st0">&quot;, EntryPoint=&quot;</span>RtlAdjustPrivilege<span class="st0">&quot;)]<br /> &nbsp; &nbsp;&nbsp; &nbsp;public static extern int RtlAdjustPrivilege(ulong Privilege, bool Enable, bool CurrentThread, ref bool Enabled);<br /> &nbsp; &nbsp;}<br /> }<br /> &quot;</span>@</p><p><span class="re0">Add-<span class="re1">Type</span></span> <span class="re2">-TypeDefinition</span> <span class="re3">$definition</span> <span class="re2">-PassThru</span></p><p><span class="re3">$bEnabled</span> = <span class="re3">$false</span></p><p><span class="co1"># Enable SeTakeOwnershipPrivilege</span><br /> <span class="re3">$res</span> = <span class="re4"><span class="br0">&#91;</span>Win32Api.<span class="me1">NtDll</span><span class="br0">&#93;</span></span>::<span class="me2">RtlAdjustPrivilege</span><span class="br0">&#40;</span><span class="nu0">9</span>, <span class="re3">$true</span>, <span class="re3">$false</span>, <span class="re4"><span class="br0">&#91;</span><span class="kw3">ref</span><span class="br0">&#93;</span></span><span class="re3">$bEnabled</span><span class="br0">&#41;</span></p><p><span class="re3">$key</span> = <span class="re4"><span class="br0">&#91;</span><span class="kw3">Microsoft</span>.<span class="me1">Win32</span>.<span class="me1">Registry</span><span class="br0">&#93;</span></span>::<span class="me2">ClassesRoot</span>.<span class="me1">OpenSubKey</span><span class="br0">&#40;</span><span class="st0">&quot;DesktopBackground\Shell\Display&quot;</span>, <span class="re4"><span class="br0">&#91;</span><span class="kw3">Microsoft</span>.<span class="me1">Win32</span>.<span class="me1">RegistryKeyPermissionCheck</span><span class="br0">&#93;</span></span>::<span class="me2">ReadWriteSubTree</span>,<span class="re4"><span class="br0">&#91;</span><span class="kw3">System</span>.<span class="me1">Security</span>.<span class="me1">AccessControl</span>.<span class="me1">RegistryRights</span><span class="br0">&#93;</span></span>::<span class="me2">takeownership</span><span class="br0">&#41;</span><br /> <span class="re3">$acl</span> = <span class="re3">$key</span>.<span class="me1">GetAccessControl</span><span class="br0">&#40;</span><span class="br0">&#41;</span><br /> <span class="re3">$acl</span>.<span class="me1">SetOwner</span><span class="br0">&#40;</span><span class="re4"><span class="br0">&#91;</span><span class="kw3">System</span>.<span class="me1">Security</span>.<span class="me1">Principal</span>.<span class="me1">NTAccount</span><span class="br0">&#93;</span></span><span class="st0">&quot;Administrators&quot;</span><span class="br0">&#41;</span><br /> <span class="re3">$key</span>.<span class="me1">SetAccessControl</span><span class="br0">&#40;</span><span class="re3">$acl</span><span class="br0">&#41;</span></div> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/16/take-ownership-of-a-registry-key-in-powershell/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>The case of the Slow Xerox Universal Print Driver</title><link>http://www.remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/#comments</comments> <pubDate>Wed, 04 Jan 2012 21:54:29 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Citrix]]></category> <category><![CDATA[General]]></category> <category><![CDATA[Windows 2003]]></category> <category><![CDATA[XenApp]]></category> <category><![CDATA[Xerox]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/</guid> <description><![CDATA[Earlier this week I was asked to investigate a problem with the Xerox Universal Printer Driver. Users complained that printing to a Xerox printer was much slower than printing to an HP printer. I received a reference document from a user, a rather complex Excel sheet. When selecting multiple tabs it took almost a minute [...]]]></description> <content:encoded><![CDATA[<p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image9.png" rel="lightbox" class="thickbox no_icon" title="Xerox Logo"><img style="display: inline; float: right" title="Xerox Logo" alt="Xerox Logo" align="right" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb9.png" width="64" height="64" /></a>Earlier this week I was asked to investigate a problem with the Xerox Universal Printer Driver. Users complained that printing to a Xerox printer was much slower than printing to an HP printer.</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image10.png" rel="lightbox" class="thickbox no_icon" title="Excel 2007 Icon"><img style="margin: 0px 9px 0px 0px; display: inline; float: left" title="Excel 2007 Icon" alt="Excel 2007 Icon" align="left" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb10.png" width="67" height="65" /></a>I received a reference document from a user, a rather complex Excel sheet. When selecting multiple tabs it took almost a minute to generate a print preview in Excel 2007 running on Windows 2003 with XenApp 5.</p><p>I was aware of a bug in the Xerox Universal Driver where almost 9.000 files were copied into the user&#8217;s profile directory (I wrote about that in an <a  href="http://www.remkoweijnen.nl/blog/2011/02/08/the-case-of-the-citrix-ready-printer-driver/" target="_blank">earlier post</a>). But this seemed to be another problem.</p><p>&#160;</p><p><span id="more-2319"></span><p>I made a trace with Process Monitor while generating the print preview and this made clear that the driver tries to create the key <strong>HKLM\Software\Xerox</strong>. This is denied because a user has of course no permissions to write in HKLM:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image002.jpg" rel="lightbox" class="thickbox no_icon" title="Process Monitor"><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="Process Monitor" border="0" alt="Process Monitor Trace | HKLM\Software\Xerox | ACCESS DENIED" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image002_thumb.jpg" width="386" height="317" /></a></p><p>The Registry Summary shows us that the driver tries to access HKLM\Software\Xerox almost 8.000 times before finally giving up:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image0026.jpg" rel="lightbox" class="thickbox no_icon" title="Process Monitor"><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="Process Monitor" border="0" alt="Registry Summary | HKLM\Software\Xerox" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image0026_thumb.jpg" width="419" height="216" /></a></p><p>I changed the permissions on the Xerox key to see what the driver writes to this key. It creates a subkey with the SID of the User under HKLM\Software\Xerox\V5.0\Low.</p><p>Then it gives the user special permissions on this key and subkeys so the user is allowed to write there.</p><p>Finally it stores a few settings in that key:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image0028.jpg" rel="lightbox" class="thickbox no_icon" title="Registry Editor"><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="Registry Editor" border="0" alt="HKLM\Software\Xerox" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/clip_image0028_thumb.jpg" width="417" height="317" /></a></p><p><img style="margin: 0px 7px 0px 0px; display: inline; float: left" align="left" src="http://farm1.staticflickr.com/113/282707058_02305d3cce_z.jpg?zz=1" width="95" height="84" />This looks like a serious design flaw because not only is a standard user not allowed to create keys under the HKLM hive but it also means that user settings are stored on a single machine and are not roaming with the user.</p><p>The good news was that the time to generate the print preview went back to around 4 seconds which is acceptable considering the complexity of the reference Excel sheet.</p><p>I tested in total 3 versions of the Xerox Universal Print Driver and they all exhibited this particular issue:</p><ul><li>5.185.42.0N 2011.03.02</li><li>5.216.12.0N 2011.06.10</li><li>5.246.7.0 2011.12.07</li></ul> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/04/the-case-of-the-slow-xerox-universal-print-driver/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>From Jailbreak to Jailbreak</title><link>http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/#comments</comments> <pubDate>Wed, 04 Jan 2012 21:02:04 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Apple]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[Jailbreak]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/</guid> <description><![CDATA[A few days ago I decided to update my iPhone which was still running iOS 4.3.1 to iOS 5.0.1. I delayed this update for a while because I had Jailbreaked my iPhone. Unfortunately an update is much more work when you have Jailbreaked because you also have to restore Cydia settings such as the repositories [...]]]></description> <content:encoded><![CDATA[<p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image2.png" rel="lightbox" class="thickbox no_icon" title="Cydia Icon"><img style="margin: 0px 0px 4px; display: inline; float: right;" title="Cydia Icon" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb2.png" alt="Cydia Icon" width="100" height="100" align="right" /></a>A few days ago I decided to update my iPhone which was still running iOS 4.3.1 to iOS 5.0.1. I delayed this update for a while because I had Jailbreaked my iPhone. Unfortunately an update is much more work when you have Jailbreaked because you also have to restore Cydia settings such as the repositories and Cydia installed Apps.</p><p>This blog post is not a guide on how to Jailbreak but more a collections of tips to go from a Jailbreak iOS 4.x to iOS 5.01.</p><p>If you notice any extra steps while doing your update <em>please send them to me so I can add them to this post</em>.</p><p><span id="more-2301"></span></p><p><span style="text-decoration: underline;"><strong>Backup<br /> </strong></span>Before starting it would be probably be a good idea to create a backup of your device in iTunes. I would also advise to backup your SHSH signatures which you can do using <a  href="http://www.remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/" target="_blank">TinyUmbrella</a>. There are lots of guides on how to do this so I will not repeat that here.</p><p><strong><span style="color: #ff0000;">Without saving your SHSH signatures you cannot restore to an older iOS version if anything goes wrong</span></strong>!</p><p>You may also want to have the IPSW for your current iOS version (preferably the IPSW that you used to do the Jailbreak last time, else you also need the Jailbreak tool for that iOS version).</p><p><span style="font-weight: normal;">I used </span><a  href="http://apptapp.thebigboss.org/mobileweb/onepackage.php?bundleid=uk.co.itsys.xbackup&#038;db=" target="_blank"><span style="font-weight: normal;">xBackup</span></a><span style="font-weight: normal;"> to create a backup of my Cydia settings, including repositories and Apps that were installed through Cydia. xBackup costs $1.50 (about ?1,20) which I found a very reasonable price. </span><span style="font-weight: normal;"><br /> </span></p><table width="400" border="0" cellspacing="20" cellpadding="2"><tbody><tr><td valign="top" width="298">I enabled the Cloud option which stores the backup on a remote server and also opted for backup of App Settings and Icon Layout:</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0463.png" rel="lightbox" class="thickbox no_icon" title="xBackup Settings"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup Settings" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0463_thumb.png" alt="xBackup Settings" width="112" height="166" border="0" /></a></td></tr><tr><td valign="top" width="298">Press Backup.</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0464.png" rel="lightbox" class="thickbox no_icon" title="xBackup"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0464_thumb.png" alt="Backup &amp; Upload" width="114" height="169" border="0" /></a></td></tr><tr><td valign="top" width="298">When it&#8217;s finished, the backup is uploaded to &#8220;the Cloud&#8221;</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0465.png" rel="lightbox" class="thickbox no_icon" title="xBackup"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0465_thumb.png" alt="Uploading Backup to the Cloud" width="115" height="170" border="0" /></a></td></tr><tr><td valign="top" width="298">Optionally pick up the local backup if you want to be extra sure (or create another iTunes Backup)</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0466.png" rel="lightbox" class="thickbox no_icon" title="xBackup"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0466_thumb.png" alt="Backup was Uploaded and Saved" width="114" height="169" border="0" /></a></td></tr></tbody></table><p>&nbsp;</p><p><strong><span style="text-decoration: underline;">Update to IOS 5.01<br /> </span></strong>Next step is the actual update to iOS 5.01, note that we do not need to hack the IPSW and restore it, so there&#8217;s no need to download the IPSW. <em>Just use iTunes to update to iOS 5.01</em>.</p><p><strong>Warning: if you have unlocked your iPhone or are using a Gevey SIM you will probably want to preserve the baseband.</strong> In which you do need the IPSW and use the Extras option in Redsn0w. Thanks to Don Hellwich for pointing that out.</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image3.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb3.png" alt="A new versions of the iPhone software is available (version 5.0.1) | To update your iPhone with the latest version, click Update." width="419" height="100" border="0" /></a></p><p>You may get a warning indicating there are purchased items on your device that have not yet been transferred to iTunes yet:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image4.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb4.png" alt="There are purchased items on the iPhone that have not been transferred to your iTunes library. You should transfer these items to your iTunes library before updating this iPhone. Are you sure you want to continue?" width="293" height="118" border="0" /></a></p><p>To resolve this go to your device, right click and select Transfer Purchases:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image5.png" rel="lightbox" class="thickbox no_icon" title="iTinues"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTinues" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb5.png" alt="Transfer Purchases" width="193" height="133" border="0" /></a></p><p>Wait until the Transferring Purchases has finished:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image6.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb6.png" alt="Transferring Purchases | Progress Bar" width="419" height="25" border="0" /></a></p><p>iTunes will warn you that the update to iOS 5.0.1 will delete all Apps, don&#8217;t worry they should be in your iTunes backup.</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image7.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb7.png" alt="Updating to iOS 5.0.1 will delete all the apps on your iPhone. To preserve your apps, apply this update on the computer where you sync them." width="290" height="140" border="0" /></a></p><p>If you get a backup error, like the screenshot below, you probably have an entry in your hosts file (that was put there by TinyUmbrella) such as &#8220;127.0.0.1 gs.apple.com&#8221;:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image8.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb8.png" alt="An error occurred while backing up this iPhone (-43). | Would you like to continue to update this iPhone? | Continuing will result in the loss of all contents on this iPhone." width="289" height="111" border="0" /></a></p><p>The update may take a while.</p><p><strong><span style="text-decoration: underline;">Jailbreak</span></strong><br /> After the update has been finished, restore your iTunes backup after which you are ready to Jailbreak again. I did this using <a  href="https://sites.google.com/a/iphone-dev.com/files/home/redsn0w_win_0.9.10b3.zip?attredirects=0&#038;d=1" target="_blank">Redsn0w for Windows v0.9.10b3</a>. This Jailbreak is Untethered, based on geohot&#8217;s limera1n exploit and was created by <a  href="http://twitter.com/pod2g" target="_blank">@pod2g</a>.</p><p>Please do consider a <a  href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&#038;hosted_button_id=VLSHU7DG68H52" target="_blank">donation</a> to pod2g.</p><p>The Jailbreak is very easy, just launch Redsn0w, boot into DFU mode and follow the on screen instructions. I will not describe the actual Jailbreak process here.</p><p><strong><span style="text-decoration: underline;">Restore</span></strong></p><p>When the Jailbreak has finished, open Cydia, then install and launch xBackup.</p><table width="400" border="0" cellspacing="20" cellpadding="2"><tbody><tr><td valign="top" width="298">Go to the Restore Tab and click Download &amp; Restore:</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0467.png" rel="lightbox" class="thickbox no_icon" title="xBackup"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0467_thumb.png" alt="Restore | Download &amp; Restore" width="110" height="163" border="0" /></a></td></tr><tr><td valign="top" width="298">xBackup will first restore the reposiories.</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0468.png" rel="lightbox" class="thickbox no_icon" title="xBackup"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="xBackup" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0468_thumb.png" alt="Restoring Sources" width="112" height="166" border="0" /></a></td></tr><tr><td valign="top" width="298">And then re-install your packages:</td><td valign="top" width="102"><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0469.png" rel="lightbox" class="thickbox no_icon" title="iTunes"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="iTunes" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/IMG_0469_thumb.png" alt="Installing Packages (mins)" width="112" height="166" border="0" /></a></td></tr></tbody></table><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML14220de.png" rel="lightbox" class="thickbox no_icon" title="Installous Icon"><img style="display: inline; float: right;" title="Installous Icon" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML14220de_thumb.png" alt="Installous Icon" width="72" height="65" align="right" /></a>The only application that was not reinstalled by xBackup (by design??) was <em>Installous</em> and it&#8217;s components. If you were using Installous previously you will need to <strong>reinstall this one manually</strong>.</p><p><strong><span style="text-decoration: underline;">Synchronize Apps with iTunes<br /> </span></strong>Final step is to synchronize your Apps with iTunes to get all your Applications back. If you installed <em>Installous</em> in the previous step then you already have AppSync which is required to synchronize non signed applications with iTunes. If not then first install AppSync for iOS 5.0+.</p><p>Good luck!</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/04/from-jailbreak-to-jailbreak/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Error 372 in Thinapped Visual Basic Application</title><link>http://www.remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/#comments</comments> <pubDate>Tue, 03 Jan 2012 21:34:29 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Packaging]]></category> <category><![CDATA[ThinApp]]></category> <category><![CDATA[Visual Basic]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/</guid> <description><![CDATA[Today I was troubleshooting a Thinapped Visual Basic Application. The application halts with a Run-time error &#8217;372&#8242; when trying to run a report: Microsoft KB article kb942870 hints to an ActiveX component that is registered into HKCU instead of HKLM. A trace with the ThinApp Log Monitor reveals that the application is looking for an [...]]]></description> <content:encoded><![CDATA[<p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image.png" rel="lightbox" class="thickbox no_icon" title="image"><img style="display: inline; float: right" title="image" alt="image" align="right" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb.png" width="38" height="39" /></a>Today I was troubleshooting a Thinapped Visual Basic Application. The application halts with a Run-time error &#8217;372&#8242; when trying to run a report:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image1.png" rel="lightbox" class="thickbox no_icon" title="Proaz"><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="Proaz" border="0" alt="Run-time error 372 Failed to load control &#39;CrystalActiveReportViewer&#39; from crviewer.dll. Your version of crviewer.dll may be outdated. Make sure you are using the control that was provided with your application" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/image_thumb1.png" width="419" height="79" /></a></p><p>Microsoft KB article <a  href="http://support.microsoft.com/kb/942870" target="_blank">kb942870</a> hints to an ActiveX component that is registered into HKCU instead of HKLM.</p><p>A trace with the ThinApp Log Monitor reveals that the application is looking for an ActiveX component under HKCU:</p><p><span id="more-2270"></span><div class="dean_ch" style="white-space: wrap;">RegOpenKeyExW [80000001h=HKEY_CURRENT_USER\][Software\Business Objects\Suite 11.0\Components\ActiveX Viewer &nbsp; &nbsp; not found in RW_View &amp;amp; fully isolated] -&gt; 2h</div><p>A registry trace shows that the component (Crystal Reports ActiveX Report Viewer) registers itself to HKLM but also creates a few keys under HKCU that are required to make the viewer run.</p><p>I decided to register the component from a VBScript inside the ThinApp package since this is easier and more fool proof than capturing all the registry keys and adding them to the package.ini.</p><p>The VBS Script simply calls RegSvr32.exe with the /s (silent) parameter:</p><div class="dean_ch" style="white-space: wrap;">Function OnFirstParentExit<br /> &nbsp; &nbsp;ExecuteExternalProcess(&quot;RegSvr32 /s &quot; &amp;amp; chr(34) &amp;amp; &quot;C:\Program Files\Common Files\Business Objects\3.0\crystalreportviewers11\ActiveXControls\crviewer.dll&quot; &amp;amp; Chr(34))<br /> End Function</div><p>Just save the VBS script with a name of choice in the same folder as the package.ini file.</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/03/error-372-in-thinapped-visual-basic-application/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>System Process PID 4 is listening on port 80</title><link>http://www.remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/</link> <comments>http://www.remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/#comments</comments> <pubDate>Mon, 02 Jan 2012 09:23:21 +0000</pubDate> <dc:creator>Remko</dc:creator> <category><![CDATA[Apple]]></category> <category><![CDATA[General]]></category> <category><![CDATA[iPhone]]></category> <category><![CDATA[Windows 7]]></category><guid isPermaLink="false">http://www.remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/</guid> <description><![CDATA[I wanted to save the SHSH signatures from my iPhone before updating to iOS 5.01. I started Tiny Umbrella but it showed an error indicating that there&#8217;s already a process listening on port 80: I verified this using netstat (netstat -aon &#124; find /I &#8220;LISTENING&#8221; &#124; find /I &#8220;:80&#8243;): &#160; A telnet to port 80 [...]]]></description> <content:encoded><![CDATA[<p>I wanted to save the SHSH signatures from my iPhone before updating to iOS 5.01. I started <a  href="http://thefirmwareumbrella.blogspot.com/" target="_blank">Tiny Umbrella</a> but it showed an error indicating that there&#8217;s already a process listening on port 80:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f09e5bf.png" rel="lightbox" class="thickbox no_icon" title="Cannot Start TSS Service"><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="Cannot Start TSS Service" border="0" alt="Cannot Start TSS Service | DO NOT TRY RESTORING YOUR DEVICE!!! | System(PID:4) must be killed!!" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f09e5bf_thumb.png" width="319" height="146" /></a></p><p>I verified this using netstat (<em>netstat -aon | find /I &#8220;LISTENING&#8221; | find /I &#8220;:80&#8243;</em>):</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0d6d75.png" rel="lightbox" class="thickbox no_icon" title="netstat"><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="netstat" border="0" alt="netstat -aon | find /i &quot;LISTENING&quot; | find /i &quot;:80&quot;" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0d6d75_thumb.png" width="419" height="84" /></a></p><p>&#160;</p><p><span id="more-2264"></span><p>A telnet to port 80 showed there was indeed a webserver running:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0f8e2e.png" rel="lightbox" class="thickbox no_icon" title="SNAGHTML5f0f8e2e"><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="SNAGHTML5f0f8e2e" border="0" alt="SNAGHTML5f0f8e2e" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f0f8e2e_thumb.png" width="419" height="142" /></a></p><p>The fact that the webserver is running in the system process means that it needs to have System Privileges. It could be either a Service or, less friendly, some kind of malware DLL that injects itself.</p><p>I checked with Process Explorer which DLL&#8217;s are loaded into the System Process and this didn&#8217;t reveal any strange DLL&#8217;s:</p><p><a  href="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f18c268.png" rel="lightbox" class="thickbox no_icon" title="Process Explorer"><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="Process Explorer" border="0" alt="System Process | PID 4 | Loaded DLL&#39;s" src="http://www.remkoweijnen.nl/blog/wp-content/uploads/2012/01/SNAGHTML5f18c268_thumb.png" width="419" height="290" /></a></p><p>So a service seemed most likely but I didn&#8217;t have any of the usual suspects (in most likely order):</p><ul><li><font color="#35383d">IIS Admin Service (</font>Internet Information Server)</li><li>SQL Server Reporting Services</li><li>Apache Tomcat 7</li></ul><p> But in my case it was the &#8220;Web Deployment Agent Service&#8221; (<em>MsDepSvc</em>) which is installed by <a  href="http://www.microsoft.com/web/webmatrix/" target="_blank">Microsoft WebMatrix</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.remkoweijnen.nl/blog/2012/01/02/system-process-pid-4-is-listening-on-port-80/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
