 <p>You need to rethink your question. You don't want the 'string' to be case insensitive, but much rather your comparison to realize, that HKCU is the same as Hkcu or hKcU.</p> <p>For this end, there's a number of options, one of which is the already mentioned function <code>stricmp</code>. Prototype is:</p> <pre><code>#include &lt;string.h&gt; int stricmp(const char *string1, const char *string2); </code></pre> <p>Meaning, you'd use it like:</p> <pre><code>if(stricmp(argv[2], "HKCU") == 0) { } </code></pre> <p>Another option is the <code>strcasecmp</code> function which operates similarly.</p> <p>Hope this helps.</p>