<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[&#x2F;D=%ProgramData%&#x5C;Notepad++ not working]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I tried to install the latest version with the parameters</p>
<p dir="auto">/S /D=%ProgramData%\Notepad++</p>
<p dir="auto">via normal cmd and elevated cmd. It always installed it, but only to %ProgramFiles% akd never to %ProgramData%</p>
<p dir="auto">I cleaned up all files I could find between the many attempts to no avail. Is there something I have to be aware of other than having/D as the last parameter?</p>
<p dir="auto">Thank you for your help :)</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22495/d-programdata-notepad-not-working</link><generator>RSS for Node</generator><lastBuildDate>Tue, 16 Jun 2026 17:55:05 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22495.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Feb 2022 11:53:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 18:27:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73926">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">I do not see how you got C:\TEMP for the 1st messagebox</p>
</blockquote>
<ul>
<li>I described the sequence of the <code>$INSTDIR</code> assignment in my patch Notes too:</li>
</ul>
<pre><code>; - before .onInit is executed, $INSTDIR has been preset by the InstallDir attribute
; - then if the value defined by a possible InstallDirRegKey attribute is valid, it overrides original InstallDir
; - finally, if the user used "/D=..." at runtime (at installer cmdline), $INSTDIR has been changed to that parameter before .onInit
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/73931</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73931</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Tue, 08 Feb 2022 18:27:29 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 18:02:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73926">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">I do not see how you got C:\TEMP for the 1st messagebox</p>
</blockquote>
<p dir="auto">because of the <code>/D=C:\TEMP</code> was used at the cmdline…</p>
<p dir="auto">Apparently you have this error at your cmdline:</p>
<pre><code>/DC:\TEMP
</code></pre>
<p dir="auto">It should be:</p>
<pre><code>/D=C:\TEMP
</code></pre>
<p dir="auto">Otherwise it is just another usual param and therefore it is visible for the GetParameters/GetOptions.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73929</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73929</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Tue, 08 Feb 2022 18:02:39 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 17:34:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xomx" aria-label="Profile: xomx">@<bdi>xomx</bdi></a></p>
<p dir="auto">Using example1.nsi with the code above appended to the bottom of the example and compiled.</p>
<p dir="auto">4 Messageboxes using Ctrl+C</p>
<pre><code>---------------------------
Example1 Setup
---------------------------
D:\User\Desktop\Example1
---------------------------
OK   
---------------------------


---------------------------
Example1 Setup
---------------------------
/S /DC:\TEMP
---------------------------
OK   
---------------------------


---------------------------
Example1 Setup
---------------------------
C:\TEMP
---------------------------
OK   
---------------------------


---------------------------
Example1 Setup
---------------------------
This example will install. Continue?
---------------------------
Yes   No   
---------------------------
</code></pre>
<p dir="auto">This was compiled with NSIS 3.08.</p>
<ol>
<li>Expected due to <code>InstallDir $DESKTOP\Example1</code>. (<em>That is where my desktop is</em>.)</li>
<li>Expected due to all arguments passed.</li>
<li>Expected as being the value of <code>/D</code>.</li>
<li>Selected No to not install.</li>
</ol>
<p dir="auto">I do not see how you got <code>C:\TEMP</code> for the 1st messagebox if only <code>InstallDir $DESKTOP\Example1</code> sets <code>$INSTDIR</code> before the message is shown.  <code>C:\TEMP</code> is the value I got for the 3rd messagebox.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73926</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73926</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 08 Feb 2022 17:34:35 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 16:12:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73902">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">I had a entry in x86 registry and a fresh install reads it and it becomes the destination location in the UI of the x64 install. …<br />
… This maybe some weird NSIS or Windows bug/behavior.</p>
</blockquote>
<p dir="auto">Weird, maybe I should check for that behavior too. But I see that there is this <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nppSetup.nsi#L165" rel="nofollow ugc">code</a> trying to detect a previous 32-bit installation and offering uninstall of the 32-bit 1st.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73902">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">${GetParameters} $R0 is being used as the help recommends GetParameters. $CMDLINE is not being used. ${GetOptions} $R0 “/D” $R1 is using the data from ${GetParameters} $R0.</p>
</blockquote>
<p dir="auto">Yes, but maybe the <code>GetParameters</code> is inherently using <code>$CMDLINE</code>.<br />
Anyway, I was right, it is not working. You can check that for yourself:</p>
<ul>
<li>take the simplest NSIS example installed (“C:\Program Files (x86)\NSIS\Examples\example1.nsi”)</li>
<li>add there somewhere the following code:</li>
</ul>
<pre><code>!include "FileFunc.nsh"

Function .onInit
	MessageBox MB_OK $INSTDIR
	${GetParameters} $R0
	MessageBox MB_OK $R0
	${GetOptions} $R0 "/D" $R1
	MessageBox MB_OK $R1
	MessageBox MB_YESNO "This example will install. Continue?" IDYES NoAbort
		Abort
	NoAbort:
FunctionEnd
</code></pre>
<ul>
<li>now try to run the compiled installer e.g. as:<br />
example1.exe /S /D=C:\TEMP</li>
<li>you will see messageboxes with: 1) “C:\TEMP”  …   2) “/S”  …   3) “”</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/73917</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73917</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Tue, 08 Feb 2022 16:12:33 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 14:19:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xomx" aria-label="Profile: xomx">@<bdi>xomx</bdi></a> said in <a href="/post/73897">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">Strange, for me my patched npp.8.3.Installer.x64.exe writes installation path correctly to the:<br />
HKLM\SOFTWARE\Notepad++<br />
instead to the 32-bit equivalent:<br />
HKLM\SOFTWARE\Wow6432Node\Notepad++</p>
<p dir="auto">And re-running of a x64 N++ installer after correctly picks up this as the default installation place, while the x86 one does not see that.</p>
<p dir="auto">Did you really tried to run that and to check the Registry after? Or are you judging only from the code fragment I pasted here? Because in the whole nppSetup.nsi installation script has been left the original code calling the <code>SetRegView 64</code> later for a running x64-instalator.</p>
</blockquote>
<p dir="auto">I may have jumped on that one too quick, sorry. I had a entry in x86 registry and a fresh install reads it and it becomes the destination location in the UI of the x64 install. If this registry entry is added to the registry:</p>
<pre><code>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Notepad++]
@="c:\\x86"
</code></pre>
<p dir="auto">and run the x64 installer, it reads it. This maybe some weird NSIS or Windows bug/behavior. If the x64 registry also has the value, then it considers that one as the destination location.</p>
<blockquote>
<p dir="auto">As I stated in the patch-fragment Notes, one cannot detect the “/D” by usual way, as the NSIS hides that from the NSIS user - taken <a href="https://nsis.sourceforge.io/Docs/Chapter4.html#varother" rel="nofollow ugc">from</a>:</p>
<ul>
<li>“For parsing out the PARAMETER portion, see GetParameters. If /D= is specified on the command line (to override the install directory) it won’t show up in $CMDLINE.”</li>
</ul>
<p dir="auto">So your <code>${GetOptions} $R0 "/D" $R1</code> should not work (I can test that in the evening).</p>
</blockquote>
<p dir="auto">Look at the top of the script. <code>${GetParameters} $R0</code> is being used as the help recommends <code>GetParameters</code>. <code>$CMDLINE</code> is not being used. <code>${GetOptions} $R0 "/D" $R1</code> is using the data from <code>${GetParameters} $R0</code>.</p>
<blockquote>
<p dir="auto">Your alternative is described  in my Notes too:</p>
<pre><code>	; - so one solution could be not to use the 'Installdir' &amp; 'InstallDirRegKey' at all and then we can use here:
	;	${If} $INSTDIR != ""
	;		;/D was used for sure, so obey and do nothing
	;	${Else}
	;	...
</code></pre>
<p dir="auto">But this is intended to be a simple patch, which can be simply deleted (preferably at one place only) when neccessary (e.g. when the NSIS N++ binary becomes also x64 instead of the current x86). So I prefer not touching the other files (globalDef.nsh).</p>
</blockquote>
<p dir="auto">Not exactly, though perhaps in a minor way. The <code>globalDef.nsh</code> can remain the same, though the values for <code>$InstallDir</code> will be overwritten in <code>nppSetup.nsi</code>. I chose to remove <code>InstallDir</code> and <code>InstallDirRegKey</code> as it is dead/deprecated code, though if your PR, you can submit your choice.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73902</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73902</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 08 Feb 2022 14:19:25 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 12:57:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a><br />
Thanks for your code review.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73895">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">I tried the x64 installer. SetRegView 32 causes Call writeInstallInfoInRegistry to write to the x86 registry.</p>
</blockquote>
<p dir="auto">Strange, for me my patched npp.8.3.Installer.x64.exe writes installation path correctly to the:<br />
HKLM\SOFTWARE\Notepad++<br />
instead to the 32-bit equivalent:<br />
HKLM\SOFTWARE\Wow6432Node\Notepad++</p>
<p dir="auto">And re-running of a x64 N++ installer after correctly picks up this as the default installation place, while the x86 one does not see that.</p>
<p dir="auto">Did you really tried to run that and to check the Registry after? Or are you judging only from the code fragment I pasted here? Because in the whole nppSetup.nsi installation script has been left the original code calling the <code>SetRegView 64</code> later for a running x64-instalator.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73895">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">I do not see the reason to use System::Call kernel32::GetCommandLine()t.r0 when ${GetOptions} $R0 “/D” $R1 can be used to get the value from /D</p>
</blockquote>
<p dir="auto">As I stated in the patch-fragment Notes, one cannot detect the “/D” by usual way, as the NSIS hides that from the NSIS user - taken <a href="https://nsis.sourceforge.io/Docs/Chapter4.html#varother" rel="nofollow ugc">from</a>:</p>
<ul>
<li>“For parsing out the PARAMETER portion, see GetParameters. If /D= is specified on the command line (to override the install directory) it won’t show up in $CMDLINE.”</li>
</ul>
<p dir="auto">So your <code>${GetOptions} $R0 "/D" $R1</code> should not work (I can test that in the evening).</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73895">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">So, I looked at an alternative to your code</p>
</blockquote>
<p dir="auto">Your alternative is described  in my Notes too:</p>
<pre><code>	; - so one solution could be not to use the 'Installdir' &amp; 'InstallDirRegKey' at all and then we can use here:
	;	${If} $INSTDIR != ""
	;		;/D was used for sure, so obey and do nothing
	;	${Else}
	;	...
</code></pre>
<p dir="auto">But this is intended to be a simple patch, which can be simply deleted (preferably at one place only) when neccessary (e.g. when the NSIS N++ binary becomes also x64 instead of the current x86). So I prefer not touching the other files (globalDef.nsh).</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a> said in <a href="/post/73895">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">My code ignores /D if already installed as why allow to install to a different location?</p>
</blockquote>
<p dir="auto">Yes, that was my intention. I would like to allow users whatewer they need to (maybe I should not, but who knows, what the users want to do…).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73897</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73897</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Tue, 08 Feb 2022 12:57:22 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Tue, 08 Feb 2022 08:15:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xomx" aria-label="Profile: xomx">@<bdi>xomx</bdi></a> said in <a href="/post/73843">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">Could you please test both installers from:<br />
<a href="http://redwoodal.sweb.cz/NotepadPlusPlus/NppTestInstaller_issue11072.7z" rel="nofollow ugc">http://redwoodal.sweb.cz/NotepadPlusPlus/NppTestInstaller_issue11072.7z</a></p>
</blockquote>
<p dir="auto">I tried the x64 installer. <code>SetRegView 32</code> causes <code>Call writeInstallInfoInRegistry</code> to write to the x86 registry. Consider what the previous installer does and do not restore the registry view or perhaps change once again the registry view just before <code>Call writeInstallInfoInRegistry</code>, near to the end of the script.</p>
<p dir="auto">I do not see the reason to use <code>System::Call kernel32::GetCommandLine()t.r0</code> when <code>${GetOptions} $R0 "/D" $R1</code> can be used to get the value from <code>/D</code>. So, I looked at an alternative to your code. I cloned the NPP repo and uploaded a branch with what I tested the x64 installer with. I have not tested x86 yet. Here is a <a href="https://github.com/mpheath/notepad-plus-plus/compare/master...installer" rel="nofollow ugc">compare</a> between the <a href="https://github.com/mpheath/notepad-plus-plus/tree/master" rel="nofollow ugc">master</a> and <a href="https://github.com/mpheath/notepad-plus-plus/tree/installer" rel="nofollow ugc">installer</a> branches.</p>
<p dir="auto">My code ignores <code>/D</code> if already installed as why allow to install to a different location? To me, it would probably mess up things if someone tried multiple locations. So first read registry, then <code>/D</code>, else the default <code>$ProgramFiles...</code>.</p>
<p dir="auto">I usually use Inno Setup so NSIS is a bit of a new learning curve for me. It still boils down to logic so I think I got it right for this NSIS script.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73895</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73895</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Tue, 08 Feb 2022 08:15:15 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Mon, 07 Feb 2022 18:08:27 GMT]]></title><description><![CDATA[<p dir="auto">So as always, the fix needs more, than I originally expected.<br />
Could you please test both installers from:<br />
<a href="http://redwoodal.sweb.cz/NotepadPlusPlus/NppTestInstaller_issue11072.7z" rel="nofollow ugc">http://redwoodal.sweb.cz/NotepadPlusPlus/NppTestInstaller_issue11072.7z</a></p>
<p dir="auto">Current .onInit solution, explanatory remarks included:</p>
<pre><code>Function .onInit

	; 64-bit patch for the NSIS attribute InstallDirRegKey (used in globalDef.nsh)
	; - this is needed because of the NSIS binary, generated for 64-bit Notepad++ installations, is still a 32-bit app (this can be changed in the future),
	;   so the InstallDirRegKey attribute checks for irrelevant RegKey (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Notepad++), see also this:
	;   https://nsis.sourceforge.io/Reference/SetRegView
	; - for the closest InstallDirRegKey simulation possible, this should be right at the top of .onInit
	;
	; Notes:
	;
	; - before .onInit is executed, $INSTDIR has been preset by the InstallDir attribute
	; - then if the value defined by a possible InstallDirRegKey attribute is valid, it overrides original InstallDir
	; - finally, if the user used "/D=..." at runtime (at installer cmdline), $INSTDIR has been changed to that parameter before .onInit
	;
	; - so we have to know here, if the "/D" was used, but there is a problem (citation from the NSIS documentation):
	;   "For parsing out the PARAMETER portion, see GetParameters. If /D= is specified on the command line (to override the install directory) it won't show up in $CMDLINE."
	;
	; - so one solution could be not to use the 'Installdir' &amp; 'InstallDirRegKey' at all and then we can use here:
	;	${If} $INSTDIR != ""
	;		;/D was used for sure, so obey and do nothing
	;	${Else}
	;	...
	;
	; - another solution is to parse the original cmdline for the "/D=..." and then act accordingly (this is the chosen solution below)
	;
!ifdef ARCH64 || ARCHARM64 ; x64 or ARM64
	${If} ${RunningX64}
		System::Call kernel32::GetCommandLine()t.r0 ; get the original cmdline (where a possible "/D=..." is not hidden for us by NSIS)
		${StrStr} $1 $0 "/D="
		${If} "$1" == ""
			; "/D=..." was NOT used for sure, so we can continue in this InstallDirRegKey x64 patch 
			SetRegView 64 ; disable registry redirection (enable access to 64-bit portion of registry)
			ReadRegStr $0 HKLM "Software\${APPNAME}" ""
			${If} "$0" != ""
				; a valid previous installation has been detected, so offer that as the $INSTDIR
				StrCpy $INSTDIR "$0"
			${EndIf}
			SetRegView 32 ; restore original state
		${EndIf}
	${EndIf}
!endif
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/73843</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73843</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Mon, 07 Feb 2022 18:08:27 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Sat, 05 Feb 2022 20:26:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a><br />
Ok, so I am going to do a PR for it, when I find time for testing.</p>
<p dir="auto">And there seems to be already an <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11072" rel="nofollow ugc">issue</a> for this.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73752</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73752</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Sat, 05 Feb 2022 20:26:59 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Sat, 05 Feb 2022 14:27:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xomx" aria-label="Profile: xomx">@<bdi>xomx</bdi></a> said in <a href="/post/73735">/D=%ProgramData%\Notepad++ not working</a>:</p>
<blockquote>
<p dir="auto">That way we simulate the used NSIS attribute InstallDirRegKey most closely and we will avoid another such difficulties. At least I hope so.</p>
<p dir="auto">I could do the PR myself, if you want to. Otherwise please do it yourselves.</p>
</blockquote>
<p dir="auto">You have some good ideas of improvement. If you can do the PR, that would be appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73741</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73741</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Sat, 05 Feb 2022 14:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Sat, 05 Feb 2022 11:20:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/xomx" aria-label="Profile: xomx">@<bdi>xomx</bdi></a></p>
<p dir="auto">sorry, fixed code:</p>
<pre><code>Function .onInit

!ifdef ARCH64 || ARCHARM64 ; x64 or ARM64
	${If} ${RunningX64}
		; disable registry redirection (enable access to 64-bit portion of registry)
		SetRegView 64
		
		ReadRegStr $0 HKLM "Software\${APPNAME}" ""

		${If} "$0" != ""
			StrCpy $InstDir "$0"
		${EndIf}
	${EndIf}
!endif

	${GetParameters} $R0
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/73737</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73737</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Sat, 05 Feb 2022 11:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Sat, 05 Feb 2022 10:30:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mpheath" aria-label="Profile: mpheath">@<bdi>mpheath</bdi></a></p>
<p dir="auto">I bumped to this problem too.</p>
<p dir="auto">The mentioned x64 patch is mine. I succumbed there to the temptation to do it as simple as possible. So I rejected my original solution to give this patch right at the top of the .onInit function. Your solution will work but I am putting in word for something like:</p>
<pre><code>Function .onInit

!ifdef ARCH64 || ARCHARM64 ; x64 or ARM64
	${If} ${RunningX64}
		; disable registry redirection (enable access to 64-bit portion of registry)
		SetRegView 64
		
		; 64-bit patch for the NSIS attribute InstallDirRegKey (used in globalDef.nsh)
		ReadRegStr $INSTDIR HKLM "Software\${APPNAME}" ""
	${EndIf}
!endif

	${GetParameters} $R0
</code></pre>
<p dir="auto">That way we simulate the used NSIS attribute InstallDirRegKey most closely and we will avoid another such difficulties. At least I hope so.</p>
<p dir="auto">I could do the PR myself, if you want to. Otherwise please do it yourselves.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73735</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73735</guid><dc:creator><![CDATA[xomx]]></dc:creator><pubDate>Sat, 05 Feb 2022 10:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Fri, 04 Feb 2022 14:26:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robin-h" aria-label="Profile: robin-h">@<bdi>robin-h</bdi></a></p>
<p dir="auto">I see possibly the bug.</p>
<p dir="auto">Commit <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11013/files" rel="nofollow ugc">#11013</a> added a fix.</p>
<blockquote>
<pre><code>; 64-bit patch for the NSIS attribute InstallDirRegKey (used in globalDef.nsh)
ReadRegStr $INSTDIR HKLM "Software\${APPNAME}" ""
</code></pre>
</blockquote>
<p dir="auto">This fix is copying the registry value directly to <code>$INSTDIR</code>. If <code>$INSTDIR</code> contains the value from the argument <code>/D=...</code>, then it probably gets overwritten without conditions.</p>
<p dir="auto">I guess with NSIS, it should use a temporary variable and overwrite only if not an empty value.</p>
<p dir="auto">So this may work:</p>
<pre><code>; 64-bit patch for the NSIS attribute InstallDirRegKey (used in globalDef.nsh)
ReadRegStr $0 HKLM "Software\${APPNAME}" ""

${If} "$0" != ""
    StrCpy $InstDir "$0"
$(EndIf)
</code></pre>
<p dir="auto">Location to post a <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/issues" rel="nofollow ugc">bug report</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73705</guid><dc:creator><![CDATA[mpheath]]></dc:creator><pubDate>Fri, 04 Feb 2022 14:26:59 GMT</pubDate></item><item><title><![CDATA[Reply to &#x2F;D=%ProgramData%&#x5C;Notepad++ not working on Fri, 04 Feb 2022 12:50:36 GMT]]></title><description><![CDATA[<p dir="auto">I just tested some more, the parameter was still working in version 8.1.9.3, to me it seems like some 8.2 release broke it</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73699</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73699</guid><dc:creator><![CDATA[Robin H]]></dc:creator><pubDate>Fri, 04 Feb 2022 12:50:36 GMT</pubDate></item></channel></rss>