<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Simple_OU_Membership_Test</id>
	<title>Simple OU Membership Test - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Simple_OU_Membership_Test"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Simple_OU_Membership_Test&amp;action=history"/>
	<updated>2026-04-23T22:49:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Simple_OU_Membership_Test&amp;diff=18084&amp;oldid=prev</id>
		<title>Zinthose: /* Macro */  Oppsie Fix</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Simple_OU_Membership_Test&amp;diff=18084&amp;oldid=prev"/>
		<updated>2010-02-04T22:58:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Macro: &lt;/span&gt;  Oppsie Fix&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:58, 4 February 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Macro ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Macro ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;highlight-nsis/*  IsOUMember LogicLib Extention&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;highlight-nsis&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;/*  IsOUMember LogicLib Extention&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Example:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Example:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         ${If} ${IsOUMember} &amp;quot;CAD External&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;         ${If} ${IsOUMember} &amp;quot;CAD External&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zinthose</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Simple_OU_Membership_Test&amp;diff=18083&amp;oldid=prev</id>
		<title>Zinthose: Initial Release</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Simple_OU_Membership_Test&amp;diff=18083&amp;oldid=prev"/>
		<updated>2010-02-04T22:57:19Z</updated>

		<summary type="html">&lt;p&gt;Initial Release&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PageAuthor|Zinthose}}&lt;br /&gt;
== About ==&lt;br /&gt;
This is a very basic OU testing macro intended for use in companies that use nsis to repackage software.  This has been successuly tested on Windows XP and Windows XP x64 but should work fine on Windows 2000 and newer.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;/*  Don&amp;#039;t forget to add these!&lt;br /&gt;
    --------------------------&lt;br /&gt;
      !include &amp;quot;LogicLib.nsh&amp;quot;&lt;br /&gt;
      !include &amp;quot;WordFunc.nsh&amp;quot;&lt;br /&gt;
    --------------------------*/&lt;br /&gt;
Section IsOUMember_Example&lt;br /&gt;
&lt;br /&gt;
    ${If} ${IsOUMember} &amp;quot;Cool People&amp;quot;&lt;br /&gt;
        MessageBox MB_OK &amp;#039;System is in the Cool People OU!&amp;#039;&lt;br /&gt;
    ${Else}&lt;br /&gt;
        MessageBox MB_OK &amp;#039;Ah, the system is not cool enough.  Sorry.&amp;#039;&lt;br /&gt;
    ${EndIf} &lt;br /&gt;
    &lt;br /&gt;
SectionEnd&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Macro ==&lt;br /&gt;
&amp;lt;highlight-nsis/*  IsOUMember LogicLib Extention&lt;br /&gt;
    Example:&lt;br /&gt;
        ${If} ${IsOUMember} &amp;quot;CAD External&amp;quot;&lt;br /&gt;
    ----------------------------------------*/&lt;br /&gt;
    !ifmacrondef _IsOUMember&lt;br /&gt;
        !macro _IsOUMember _a _b _t _f&lt;br /&gt;
            !ifndef LOGICLIB | WORDFUNC_INCLUDED&lt;br /&gt;
                !error `The IsOUMember LogicLib extention is missing a required dependancy: WordFunc.nsh | LogicLib.nsh`&lt;br /&gt;
            !else&lt;br /&gt;
                !insertmacro _LOGICLIB_TEMP&lt;br /&gt;
                /*  Get the System&amp;#039;s Distinguished Name from the registry&lt;br /&gt;
                    -----------------------------------------------------*/&lt;br /&gt;
                    SetRegView 64&lt;br /&gt;
                    ClearErrors&lt;br /&gt;
                    ReadRegStr $_LOGICLIB_TEMP HKLM `SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine` `Distinguished-Name`&lt;br /&gt;
                    SetRegView lastused&lt;br /&gt;
                    &lt;br /&gt;
                /*  If we were unable to get the Distinguished Name so we&amp;#039;ll&lt;br /&gt;
                    asume the system is not a member of a domain.&lt;br /&gt;
                    --------------------------------------------------------*/&lt;br /&gt;
                    IfErrors `${_f}`&lt;br /&gt;
    &lt;br /&gt;
                /*  Search the DistinguishedName for the requested OU name.&lt;br /&gt;
                    -------------------------------------------------------*/         &lt;br /&gt;
                    ClearErrors&lt;br /&gt;
                    ${WordFind} $_LOGICLIB_TEMP &amp;quot;OU=${_b},&amp;quot; &amp;quot;E+1{&amp;quot; $_LOGICLIB_TEMP&lt;br /&gt;
                    StrCpy $_LOGICLIB_TEMP &amp;#039;&amp;#039;&lt;br /&gt;
                    &lt;br /&gt;
                /*  Depending on  the results jump.&lt;br /&gt;
                    -------------------------------*/&lt;br /&gt;
                    IfErrors `${_f}`&lt;br /&gt;
                    Goto `${_t}`&lt;br /&gt;
            !endif&lt;br /&gt;
        !macroend&lt;br /&gt;
        !ifndef IsOUMember&lt;br /&gt;
            !define IsOUMember `&amp;quot;&amp;quot; IsOUMember`&lt;br /&gt;
        !endif&lt;br /&gt;
    !endif&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
[[Category:System Related Functions]]&lt;/div&gt;</summary>
		<author><name>Zinthose</name></author>
	</entry>
</feed>