<?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>Digivation Hack Central &#187; Nifty Hacks</title>
	<atom:link href="http://blog.digivation.com.au/category/category/nifty-hacks/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.digivation.com.au</link>
	<description>Tech Information about various subjects</description>
	<lastBuildDate>Sat, 17 Sep 2011 02:57:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Debugging shared Client/ASP Web Service projects in VS2010</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/debugging-shared-clientasp-web-service-projects-in-vs2010</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/debugging-shared-clientasp-web-service-projects-in-vs2010#comments</comments>
		<pubDate>Thu, 19 May 2011 01:53:17 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs2010]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=199</guid>
		<description><![CDATA[This post details the setup required for combined Remote Debugging server side web services with client programs in the same project. It is here mainly to assist my memory but may be of use to others as I had to dig for a lot of this info. It assumes you log into the local development [...]]]></description>
			<content:encoded><![CDATA[<p>This post details the setup required for combined Remote Debugging server side web services with client programs in the same project. It is here mainly to assist my memory but may be of use to others as I had to dig for a lot of this info.</p>
<p>It assumes you log into the local development machine as a domain user and  the remote IIS server is on a different domain with no shared trust.</p>
<p>This applies to VS2010 but should also be relevant to vs2008 and vs2005.</p>
<h2 id="LocalComputer">Local Computer Config</h2>
<p>You will have logged on the local computer as MAINDOMAIN\user</p>
<ul>
<li>Create a local computer user with the same name and password as your domain one. ( This step may be unnecessary ) </li>
<li>Change the Sharing and Security Model In <strong>Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts</strong><br /> set <strong>Classic &#8211; local users authenticate as themselves </strong></li>
</ul>
<h2 id="RemoteIISComputer">Remote IIS Computer</h2>
<ul>
<li>Create a local computer user with your domain user name and same password. </li>
<li>Add <strong>Administrators</strong> group to this user. </li>
<li>make sure <strong>msdeploy</strong> works. </li>
<li>Add debug rights to new user In <strong>Local Security Policy/Local Policies/User Rights Assignment/Debug programs/Add User or Group </strong></li>
<li>Change the Sharing and Security Model In <strong>Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts</strong><br /> set <strong>Classic &#8211; local users authenticate as themselves</strong></li>
</ul>
<h2 id="msvsmonconfig">msvsmon config</h2>
<p>Create a batch file to run msvsmon called runmsvsmon.bat in the base path (e.g. <strong>wwwroot\ServiceTest</strong>) of the asp service as follows</p>
<pre>SET _NT_SYMBOL_PATH=%CD%\bin
cd "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x86"
start msvsmon.exe
</pre>
<p>Run the batch file as the <strong>user</strong> added above.</p>
<p>This will allow symbols to be used during step into service debugging.</p>
<p>Change the server name in <strong>msvsmon</strong> to</p>
<pre>DEVDOMAIN\user@LOCALMACHINENAME
</pre>
<p>This allows your user to attach juts by entering the <strong>remote ip address</strong> (domain search for remote server is disabled in this case) in the <strong> Qualifier</strong> field in VS and thus works for standard debugging too.</p>
<h2 id="VisualStudioConfig">Visual Studio Config</h2>
<p>In Debugger Options</p>
<ul>
<li>disable <strong>Enable just my code</strong> </li>
<li>enable <strong>Enable source server support</strong> </li>
</ul>
<p>In Web Service project properties</p>
<ul>
<li>Web/Use Custom Web Server/Url &#8211; http://remoteip/ServiceTest</li>
<li>Package/Publish Web/IIS Web Site &#8211; Default Web Site/ServiceTest</li>
</ul>
<p>In Publish Service</p>
<ul>
<li>username <strong>user</strong> </li>
<li>password is whatever </li>
<li>save password checked </li>
<li>method <strong>WebDeploy</strong> </li>
<li>URL <strong><a href="http://10.150.10.8/"> http://remoteipaddr</a></strong> </li>
<li>Site <strong>Default Web Site/ServerTest</strong> or <strong>Default Web Site/Server</strong> </li>
<li>check <strong>Mark as IIS app</strong> </li>
<li>check <strong>Leave extra files</strong></li>
</ul>
<h2 id="Procedure">Procedure</h2>
<p>Deploy Web service first</p>
<blockquote><p>This should succeed if msdeploy is working on the remote server.<br /> You should see the files update on the target.<br /> add <strong>debug=&#8221;true&#8221;</strong> to compilation tag in <strong>web.config</strong>.</p>
<pre>  &lt;compilation debug="true" targetFramework="4.0"&gt;
  &lt;/compilation&gt;
</pre>
</blockquote>
<p>Test Tools/Process Attach</p>
<blockquote><p>If you get a list of processes, you have everything should be working.</p>
</blockquote>
<p>Debug Client and Web Service together</p>
<blockquote><p>Set a breakpoint inside the service module and press F5. It should then break with source.</p>
<p>Set a breakpoint in the desktop client and step into a web method.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/debugging-shared-clientasp-web-service-projects-in-vs2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a Windows CE 4.20 SDK with VS2005 and VS2008</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-windows-ce-4-20-sdk-with-vs2005-and-vs2008</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-windows-ce-4-20-sdk-with-vs2005-and-vs2008#comments</comments>
		<pubDate>Tue, 23 Nov 2010 06:26:21 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[WinCE]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=171</guid>
		<description><![CDATA[I have had the requirement to use a windows CE SDK with Visual Studio 2005 and 2008. This is desirable because they have better/newer ARM compilers, as well as being able to integrate a combined Native/.NET solution in 1 place for a single step build. The hint on how to do this came after playing [...]]]></description>
			<content:encoded><![CDATA[<p>I have had the requirement to use a windows CE SDK with Visual Studio 2005 and 2008. This is desirable because they have better/newer ARM compilers, as well as being able to integrate a combined Native/.NET solution in 1 place for a single step build.</p>
<p>The hint on how to do this came after playing with Qt. Qt Comes with a program<span id="more-171"></span><!--more--> called <strong>checksdk</strong>. This little program comes with source which makes it easy to see what it is looking at to generate its <strong>-list</strong> output.</p>
<p>It uses the information in <strong>VC/vcpackages/WCE.VCPlatform.config</strong>. All that is needed is to add a <strong>Platform</strong> section at the end of this file. Reformatting is a good idea as all the <strong>Platform</strong> sections are on 1 line.</p>
<p>An example would look like</p>
<p><code>&lt;Platform Name="VCProjectWCEPlatform.dll" Identifier="{8314598B-C36E-4C31-9C06-9A01D910AF28}"&gt;<br /> <br />
&nbsp;&lt;Directories Include="$(VCInstallDir)ce\include;C:\Program Files\Windows CE Tools\wce420\Sample\include\ARMV4I;C:\Program Files\Windows CE Tools\wce420\Sample\include;$(VCInstallDir)ce\atlmfc\include;$(VSInstallDir)SmartDevices\SDK\SQL Server\Mobile\v3.0" Library="C:\Program Files\Windows CE Tools\wce420\Sample\lib\ARMV4I;$(VCInstallDir)ce\atlmfc\lib\ARMV4I;$(VCInstallDir)ce\lib\ARMV4I;" Path="$(VCInstallDir)\ce\bin\x86_arm;$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools;$(VSInstallDir)Common7\IDE;$(VSInstallDir)Common\Tools;$(VSInstallDir)Common\IDE;$(VSInstallDir);$(FrameworkSDKDir)Bin;$(PATH);" Reference="" Source=";$(VCInstallDir)ce\atlmfc\src\atl;$(VCInstallDir)ce\atlmfc\src\mfc;;$(VCInstallDir)ce\crt\src"/&gt;<br /> <br />
&nbsp;&lt;PlatformData&gt;<br /> &nbsp; &lt;PlatformName&gt;Sample (ARMV4I)&lt;/PlatformName&gt;<br /> &nbsp; &lt;SDKID&gt;{F4B31E61-F19D-448C-AC87-FFBBDCE6748C}&lt;/SDKID&gt;<br /> &nbsp;  &lt;SupportsDCOM&gt;0&lt;/SupportsDCOM&gt;<br /> &nbsp; &lt;OSMajorVersion&gt;4&lt;/OSMajorVersion&gt;<br /> &nbsp; &lt;OSMinorVersion&gt;20&lt;/OSMinorVersion&gt;<br /> &nbsp; &lt;UISymbol&gt;STANDARDSHELL_UI_MODEL&lt;/UISymbol&gt;<br /> &nbsp; &lt;Macros&gt;<br /> &nbsp; &nbsp; &lt;Macro Name="_M_ARMT" Value=""/&gt;<br />&nbsp; &nbsp; &lt;Macro Name="CEVER" Value="0x420"/&gt;<br />&nbsp; &nbsp; &lt;Macro Name="ARCHFAM" Value="ARM"/&gt;<br /> &nbsp; &nbsp; &lt;Macro Name="_ARCHFAM_" Value="_ARM_"/&gt;<br /> &nbsp; &nbsp; &lt;Macro Name="INSTRUCTIONSET" Value="ARMV4I"/&gt;<br /> &nbsp; &nbsp; &lt;Macro Name="BINDIR" Value="$(VCInstallDir)ce\dll"/&gt;<br /> &nbsp; &lt;/Macros&gt;<br /> &nbsp;&lt;/PlatformData&gt;<br /> &lt;/Platform&gt;<br /> </code> </p>
<p>Make sure the 1st Guid is unique. The Guid in the SDKID must match that in the registry. Using <strong>regedit</strong>, open <strong>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Tools\Platform Manager\{F384D888-F9AA-11D1-BB9E-00A0C9C9CCEE}</strong> and go through each subkey and and find the one in question. This subkey is the <strong>SDKID</strong>.</p>
<p>restarting VS will now show your WinCE4.2 platform when creating a smart device project. Deploy and debugging works AFAICT.<br /> Also works with a Qt smart device project. You can also build Qt for WinCE 4.2 with a few patches which I will elaborate when time permits.</p>
<p>You also need to patch the 4.20 sdk due to build errors as follows:</p>
<p><code></p>
<blockquote><p>
--- a/Include/Armv4I/objidl.h     2003-03-21 10:13:20.000000000 +1100<br />
+++ b/Include/Armv4i/objidl.h 2010-07-26 11:49:13.358544400 +1000<br />
@@ -10701,7 +10701,7 @@<br />
 /* [uuid][object][local] */ </p>
<p>-typedef /* [unique] */ __RPC_FAR *LPGLOBALINTERFACETABLE;<br />
+typedef /* [unique] */ IGlobalInterfaceTable __RPC_FAR *LPGLOBALINTERFACETABLE;</p>
<p> EXTERN_C const IID IID_IGlobalInterfaceTable;<br />
--- a/Include/Armv4I/shobjidl.h   2003-03-21 10:13:56.000000000 +1100<br />
+++ b/Include/Armv4i/shobjidl.h       2010-07-26 12:42:24.317699600 +1000<br />
@@ -1885,7 +1885,7 @@<br />
 // may or may not use those settings.<br />
 //<br />
 //--------------------------------------------------------------------------<br />
-typedef LPVIEWSETTINGS;<br />
+typedef char* LPVIEWSETTINGS;</p>
<p> // NB Bitfields.<br />
 // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL<br />
--- a/Include/Armv4I/kfuncs.h     2003-03-21 10:13:20.000000000 +1100<br />
+++ b/Include/Armv4i/kfuncs.h 2010-07-27 10:43:33.127791200 +1000<br />
@@ -115,7 +115,11 @@<br />
 #ifdef __cplusplus<br />
 extern "C" {<br />
 #endif<br />
+#if _MSC_VER < 1300<br />
 void DebugBreak(void);<br />
+#else<br />
+#define DebugBreak() __debugbreak()<br />
+#endif<br />
 void __emit(unsigned const __int32);<br />
 #ifdef __cplusplus<br />
 }
</p></blockquote>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-windows-ce-4-20-sdk-with-vs2005-and-vs2008/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git Tricks and Tips</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/git-tricks-and-tips</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/git-tricks-and-tips#comments</comments>
		<pubDate>Fri, 19 Nov 2010 01:34:11 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Nifty Hacks]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=166</guid>
		<description><![CDATA[Maintaining Vendor Branches For the case where you have a vendor tarball or zip source bundle, these are effectively managed in a branch. If the vendor releases a new version, the update process is: git co vendor mkdir zzz mv * zzz/ mv .* zzz/ mv zzz/.git . rm -rf zzz git commit -a Now [...]]]></description>
			<content:encoded><![CDATA[<h1>Maintaining Vendor Branches</h1>
<p>For the case where you have a vendor tarball or zip source bundle, these are effectively managed in a branch.</p>
<p>If the vendor releases a new version, the update process is:<br />
<code><br />
git co vendor<br />
mkdir zzz<br />
mv * zzz/<br />
mv .* zzz/<br />
mv zzz/.git .<br />
rm -rf zzz<br />
git commit -a<br />
</code><br />
Now you can merge or rebase your development tree to the new vendor release.</p>
<h1>Some useful Git links.</h1>
<p>Refs:<br />
<a href="http://cheat.errtheblog.com/s/git">http://cheat.errtheblog.com/s/git</a><br />
<a href="http://sourceware.org/frysk/build/git-fu.html">http://sourceware.org/frysk/build/git-fu.html</a><br />
<a href="http://sandofsky.com/blog/git-workflow.html">http://sandofsky.com/blog/git-workflow.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/git-tricks-and-tips/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Sound in Limited User Account</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/no-sound-in-limited-user-account</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/no-sound-in-limited-user-account#comments</comments>
		<pubDate>Fri, 17 Sep 2010 00:00:42 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=152</guid>
		<description><![CDATA[Recently I needed to do a repair install on Windows XP, after which sound was no longer working on limited user accounts. After extensive searching I realized no one had a solution. The device driver was ok and operating and sound was working fine on administrator capable accounts. The strange thing is that the Realtek [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to do a repair install on Windows XP, after which sound was no longer working on limited user accounts. After extensive searching I realized no one had a solution. The device driver was ok and operating and sound was working fine on administrator capable accounts.</p>
<p>The strange thing is that the Realtek HD sound app worked Ok on the LUA. I concluded from this that the software enumerator was at fault, specifically the registry keys that would have to be read for the software enumerator to read its current list.</p>
<p>Use regedit to change the permissions of the tree on currentcontrolset to fix this issue. Log in again and its all good.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/no-sound-in-limited-user-account/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapping special names to multiple USB serial adapters</title>
		<link>http://blog.digivation.com.au/category/solar/mapping-special-names-to-multiple-usb-serial-adapters</link>
		<comments>http://blog.digivation.com.au/category/solar/mapping-special-names-to-multiple-usb-serial-adapters#comments</comments>
		<pubDate>Fri, 16 Apr 2010 15:34:59 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Solar]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[current cost]]></category>
		<category><![CDATA[currentcost]]></category>
		<category><![CDATA[device driver]]></category>
		<category><![CDATA[envi]]></category>
		<category><![CDATA[gci]]></category>
		<category><![CDATA[mains power monitor]]></category>
		<category><![CDATA[serial]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[watts clever]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=125</guid>
		<description><![CDATA[The watts clever envi has a USB serial adapter which is a Prolific pl2303. When inserted it is assigned /dev/ttyUSB0 by udev, among a few other symlinks. I have now obtained an RS485 serial adapter on ebay for A$13.98 delivered which uses the exact same chip, which makes it indistiguishable from the envi&#8217;s port. What [...]]]></description>
			<content:encoded><![CDATA[<p>The watts clever envi has a USB serial adapter which is a Prolific pl2303. When inserted it is assigned /dev/ttyUSB0 by udev, among a few other symlinks. I have now obtained an RS485 serial adapter on ebay for A$13.98 delivered which uses the exact same chip, which makes it indistiguishable from the envi&#8217;s port. What I needed was a way to guarantee uniqueness regardless of the enumeration order on boot or random hot plugin. Naturally, this is for the Aurora GCI which will be installed when they become available in May.</p>
<p>Researching udev a bit, I found /lib/udev/rules.d/60-persistent-serial.rules (mine is a debian system). This file shows how the standard symlinks are done. Since each USB port is unique, I should be able to use that uniqueness to map another symlink to the device.</p>
<p>Firstly plug in the device in the chosen USB port and issue<br />
<code>udevadm info --query=all --name=/dev/ttyUSB1</code></p>
<p>This shows a heap of stuff but mainly we are interested in<br />
<code>P: /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1:1.0/ttyUSB1/tty/ttyUSB1</code></p>
<p>Create a file in <code>/etc/udev/rules.d/70-persistent-serial.rules</code> which contains</p>
<blockquote><p>
#see /lib/udev/rules.d/60-persistent-serial.rules</p>
<p>ACTION!=&#8221;add|change&#8221;, GOTO=&#8221;persistent_serial_end&#8221;<br />
SUBSYSTEM!=&#8221;tty&#8221;, GOTO=&#8221;persistent_serial_end&#8221;<br />
KERNEL!=&#8221;ttyUSB[0-9]*|ttyACM[0-9]*&#8221;, GOTO=&#8221;persistent_serial_end&#8221;</p>
<p>IMPORT=&#8221;usb_id &#8211;export %p&#8221;<br />
#IMPORT=&#8221;path_id %p&#8221;</p>
<p>ENV{ID_SERIAL}==&#8221;", GOTO=&#8221;persistent_serial_end&#8221;</p>
<p># usb nearest ethernet connector<br />
ENV{DEVPATH}==&#8221;*usb2/2-2/2-2:1.0*&#8221;, SYMLINK+=&#8221;serial/by-name/envi&#8221;<br />
#bottom front connector<br />
ENV{DEVPATH}==&#8221;*usb7/7-1/7-1:1.0*&#8221;, SYMLINK+=&#8221;serial/by-name/rs485&#8243;<br />
# usb below nearest ethernet connector<br />
ENV{DEVPATH}==&#8221;*usb2/2-1/2-1:1.0*&#8221;, SYMLINK+=&#8221;serial/by-name/rs485&#8243;</p>
<p>LABEL=&#8221;persistent_serial_end&#8221;
</p></blockquote>
<p>Replug and voila you get <code>/dev/serial/by-name/rs485</code> which will always be the correct device.</p>
<p>Now I just have to run the wire to where the GCI will be installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/solar/mapping-special-names-to-multiple-usb-serial-adapters/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funny Characters for gcc/g++ errors and warnings</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/linux-hacks/funny-characters-for-gccg-errors-and-warnings</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/linux-hacks/funny-characters-for-gccg-errors-and-warnings#comments</comments>
		<pubDate>Thu, 01 Apr 2010 03:15:59 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=117</guid>
		<description><![CDATA[I have found that on some linux systems when you compile with gcc and g++ the error messages have funny characters like test.c: In function â: test.c:6: warning: unused variable â This is due to the default locale being set to something other than the default. in /etc/default/locale you will have a line like LANG="en_AU.UTF-8" [...]]]></description>
			<content:encoded><![CDATA[<p>I have found that on some linux systems when you compile with gcc and g++ the error messages have funny characters like</p>
<p><code>test.c: In function â:<br />
test.c:6: warning: unused variable â<br />
</code></p>
<p>This is due to the default locale being set to something other than the default.</p>
<p>in <strong>/etc/default/locale</strong> you will have a line like</p>
<p><code>LANG="en_AU.UTF-8"</code></p>
<p>add</p>
<p><code>LC_CTYPE=C</code></p>
<p>Restart the shell and compile again and the errors are now meaningful.</p>
<p><code>test.c: In function 'main':<br />
test.c:6: warning: unused variable 'x'<br />
</code></p>
<p>Naturally you could set it in the local shell for the session, but then you would have to do it every time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/linux-hacks/funny-characters-for-gccg-errors-and-warnings/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating Windows User Ids</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/migrating-windows-user-ids</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/migrating-windows-user-ids#comments</comments>
		<pubDate>Thu, 11 Mar 2010 23:48:23 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=96</guid>
		<description><![CDATA[There are times when domains on windows change and thus your user id changes. However, you may have lots of files owned by you that are not in your user dir. Migrating these user ids to you new one, I&#8217;ve found, is not too difficult after all. All you need is a tool from microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when domains on windows change and thus your user id changes. However, you may have lots of files owned by you that are not in your user dir. Migrating these user ids to you new one, I&#8217;ve found, is not too difficult after all.</p>
<p>All you need is a tool from microsoft called <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B&#038;displaylang=en">subinacl</a>.</p>
<p>Download and install the msi. Install path is </p>
<p><code>C:\Program Files\Windows Resource Kits\Tools\subinacl.exe</code></p>
<p>So use this for the command name below.</p>
<p>First find your old userid. Use a file you know you used to own. E.g. the projects directory.</p>
<p><code>Subinacl /file c:\projects /display</code></p>
<p>Copy and paste yours for use in the commands below</p>
<p>Now for the commands. Do for all drives if you have multiple disks.<br />
The lines below are for me of course so sub in your cut S-xxx and new user id</p>
<p><code>Subinacl /subdir c:\ /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username</code></p>
<p>also the primary group, which can be found up the top of the display dump. </p>
<p><code>Subinacl /subdir c:\ "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"</code></p>
<p>all registry keys</p>
<p><code>Subinacl /subkeyreg HKEY_CURRENT_USER /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username</code></p>
<p><code>Subinacl /subkeyreg HKEY_LOCAL_MACHINE /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username</code></p>
<p><code>Subinacl /subkeyreg HKEY_CLASSES_ROOT /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username</code><br />
(none found, so optional)</p>
<p>and the groups<br />
<code>Subinacl /subkeyreg HKEY_CURRENT_USER "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"</code></p>
<p><code>Subinacl /subkeyreg HKEY_LOCAL_MACHINE "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"</code></p>
<p><code>Subinacl /subkeyreg HKEY_CLASSES_ROOT "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"</code></p>
<p>After you are happy</p>
<p><code>Subinacl /subdir c:\ /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx</code></p>
<p><code>Subinacl /subkeyreg HKEY_CURRENT_USER /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx</code></p>
<p><code>Subinacl /subkeyreg HKEY_LOCAL_MACHINE /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx</code></p>
<p>When you are finished, everything you used to own you will own again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/windows-hacks/migrating-windows-user-ids/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Install Direct Filesystem Hack</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/wordpress/wordpress-install-direct-filesystem-hack</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/wordpress/wordpress-install-direct-filesystem-hack#comments</comments>
		<pubDate>Fri, 05 Mar 2010 00:27:43 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=78</guid>
		<description><![CDATA[I use chgrp -R www-data wp-content chown -R g+w wp-content To make this work with wordpress, edit wp-admin/includes/file.php in function get_filesystem_method() and comment out if ( getmyuid() == fileowner($temp_file) ) to #if ( getmyuid() == fileowner($temp_file) ) If the test file can be written, who cares if it is not owned by the webserver. You [...]]]></description>
			<content:encoded><![CDATA[<p>I use<br />
<code><br />
chgrp -R www-data wp-content<br />
chown -R g+w wp-content<br />
</code></p>
<p>To make this work with wordpress, edit <em>wp-admin/includes/file.php</em> in function <em>get_filesystem_method()</em> and comment out<br />
<code><br />
if ( getmyuid() == fileowner($temp_file) )<br />
</code><br />
to<br />
<code><br />
#if ( getmyuid() == fileowner($temp_file) )<br />
</code></p>
<p>If the test file can be written, who cares if it is not owned by the webserver.</p>
<p>You will have to reapply this edit every time wordpress core is updated.</p>
<p>Ref: <a href="http://www.chrisabernethy.com/why-wordpress-asks-connection-info/">why-wordpress-asks-connection-info</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/wordpress/wordpress-install-direct-filesystem-hack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using WinCE5.0 drivers on WinCE4.2</title>
		<link>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-wince5-0-drivers-on-wince4-2</link>
		<comments>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-wince5-0-drivers-on-wince4-2#comments</comments>
		<pubDate>Tue, 09 Feb 2010 04:17:01 +0000</pubDate>
		<dc:creator>mark</dc:creator>
				<category><![CDATA[WinCE]]></category>
		<category><![CDATA[device driver]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wince4.2]]></category>
		<category><![CDATA[wince5]]></category>

		<guid isPermaLink="false">http://blog.digivation.com.au/?p=62</guid>
		<description><![CDATA[Since wince 4.2 is quite old and not that well supported by OEM device manufacturers, it is often hard or impossible to get drivers for wince4.2 for these devices. However the API into coredll and other parts of the wince system libraries is, if not identical, then almost identical. I had an instance recently where [...]]]></description>
			<content:encoded><![CDATA[<p>Since wince 4.2 is quite old and not that well supported by OEM device manufacturers, it is often hard or impossible to get drivers for wince4.2 for these devices.</p>
<p>However the API into coredll and other parts of the wince system libraries is, if not identical, then almost identical.</p>
<p>I had an instance recently where I needed to make a USB wifi device work with wince4.2. After doing some research, I chose a ralink 2471W based device. However it came with a wince5 driver. Binary only of course.</p>
<p>Looking at the driver dll, all the imported functions were available except 1 in the ndis.dll, that being NdisQueryPacket. In wince4.2, this fucntion is provided by a #define, but in wince5 it is a instantiated function.</p>
<p>The solution is to compile the following code to an obj, and use the lib32 to add it to ndislib.lib in the private tree.</p>
<blockquote><p><code><br />
// local modded copy of ndis.h<br />
#include "ndis.h"<br />
#include &lt;pkfuncs.h&gt;<br />
</code></p>
<p>VOID<br />
NdisQueryPacket(<br />
IN  PNDIS_PACKET            _Packet,<br />
OUT PUINT                   _PhysicalBufferCount OPTIONAL,<br />
OUT PUINT                   _BufferCount OPTIONAL,<br />
OUT PNDIS_BUFFER *          _FirstBuffer OPTIONAL,<br />
OUT PUINT                   _TotalPacketLength OPTIONAL<br />
)<br />
{<br />
NdisQueryPacketDef(_Packet, _PhysicalBufferCount, _BufferCount, _FirstBuffer, _TotalPacketLength);<br />
}</p></blockquote>
<p>Also add the export definition to the end of ndis.def so that it becomes exported when ndis.dll is built with the system.</p>
<p>Finally, remember to put these 2 files back in the private tree where you got them from.</p>
<p>Now when the system is rebuilt with platform builder, the new ndis.dll will contain this extra function, thus allowing the USB wifi driver to function perfectly without modification.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digivation.com.au/category/nifty-hacks/wince-hacks/using-wince5-0-drivers-on-wince4-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

