<?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[RegOpenKeyEx&#x2F;RegSetValueEx zeigt keine wirkung?]]></title><description><![CDATA[<p>Hallo also ich habe das hier in einem Programm das scih selbst zum Autostart hinzufügen soll, sprich HKCR\Software\Microsoft\Windows\Run</p>
<pre><code class="language-cpp">//Registry Schlüssel erstellen
HKEY hKey;
RegOpenKeyEx(HKEY_CURRENT_USER,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,NULL,KEY_SET_VALUE,&amp;hKey);
char regString[]=&quot;C:\\server.exe&quot;;
RegSetValueEx(HKEY_CURRENT_USER,&quot;Server&quot;,0,REG_SZ,reinterpret_cast&lt;BYTE*&gt;(regString),strlen(regString)+1);
</code></pre>
<p>So ist auch alles soweit gut, beim Compilen keine Fehler oder Warnungen datei lässt sich ausführen usw. ABER wenn ich mit regedit in die registry schau sehe ich das da kein Wert ist. Warum? Was mach ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/238002/regopenkeyex-regsetvalueex-zeigt-keine-wirkung</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Apr 2026 09:15:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/238002.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Apr 2009 23:42:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RegOpenKeyEx&#x2F;RegSetValueEx zeigt keine wirkung? on Sat, 04 Apr 2009 23:42:06 GMT]]></title><description><![CDATA[<p>Hallo also ich habe das hier in einem Programm das scih selbst zum Autostart hinzufügen soll, sprich HKCR\Software\Microsoft\Windows\Run</p>
<pre><code class="language-cpp">//Registry Schlüssel erstellen
HKEY hKey;
RegOpenKeyEx(HKEY_CURRENT_USER,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,NULL,KEY_SET_VALUE,&amp;hKey);
char regString[]=&quot;C:\\server.exe&quot;;
RegSetValueEx(HKEY_CURRENT_USER,&quot;Server&quot;,0,REG_SZ,reinterpret_cast&lt;BYTE*&gt;(regString),strlen(regString)+1);
</code></pre>
<p>So ist auch alles soweit gut, beim Compilen keine Fehler oder Warnungen datei lässt sich ausführen usw. ABER wenn ich mit regedit in die registry schau sehe ich das da kein Wert ist. Warum? Was mach ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1691071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1691071</guid><dc:creator><![CDATA[S3RB31]]></dc:creator><pubDate>Sat, 04 Apr 2009 23:42:06 GMT</pubDate></item><item><title><![CDATA[Reply to RegOpenKeyEx&#x2F;RegSetValueEx zeigt keine wirkung? on Sun, 05 Apr 2009 08:52:36 GMT]]></title><description><![CDATA[<p>KEY_SET_VALUE (2) ist doch 'Registry Specific Access Rights', ist benutzt mit Security Descriptors.<br />
Probier mal KEY_WRITE.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1691108</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1691108</guid><dc:creator><![CDATA[sapero]]></dc:creator><pubDate>Sun, 05 Apr 2009 08:52:36 GMT</pubDate></item><item><title><![CDATA[Reply to RegOpenKeyEx&#x2F;RegSetValueEx zeigt keine wirkung? on Sun, 05 Apr 2009 10:01:09 GMT]]></title><description><![CDATA[<p>Also so schaut mein code jetzt im ganzen aus, (unterer teil auskommentiert weil der noch nicht funzt)</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdafx.h&gt;
#include &lt;winnetwk.h&gt;
#include &lt;iostream&gt;
using namespace std;

void main()
{

	//Autostart
	HKEY hKey;
	RegOpenKeyEx(HKEY_CURRENT_USER,&quot;SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run&quot;,NULL,KEY_WRITE,&amp;hKey);
	char regString[]= &quot;C:\\server.exe&quot;;
	RegSetValueEx(HKEY_CURRENT_USER,&quot;Server&quot;,0,REG_SZ,reinterpret_cast&lt;BYTE*&gt;(regString),strlen(regString)+1);

	//File nach C:\server.exe kopieren und verstecken
	char path[MAX_PATH+2];
	GetModuleFileName(NULL,path,MAX_PATH);
	CopyFile(path,&quot;C:\\server.exe&quot;,false);
	SetFileAttributes(&quot;C:\\server.exe&quot;,FILE_ATTRIBUTE_HIDDEN);

	/*
	//Netlaufwerk verbinden
	NETRESOURCE nr;

	memset(&amp;nr, 0, sizeof(nr));
	nr.lpRemoteName = TEXT(&quot;Share&quot;);
	nr.lpLocalName = TEXT(&quot;\\\\daten\\share&quot;);
	DWORD dwReturn = WNetAddConnection3(
		m_hWnd,&amp;nr, 
		NULL,
		NULL, 
		CONNECT_UPDATE_PROFILE);
	*/
}
</code></pre>
<p>Allerding entsteht immernoch kein Regestry Wert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>PS. Ja ich weis das ich zuviel Includiert habe ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1691136</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1691136</guid><dc:creator><![CDATA[S3RB31]]></dc:creator><pubDate>Sun, 05 Apr 2009 10:01:09 GMT</pubDate></item><item><title><![CDATA[Reply to RegOpenKeyEx&#x2F;RegSetValueEx zeigt keine wirkung? on Sun, 05 Apr 2009 12:20:31 GMT]]></title><description><![CDATA[<blockquote>
<pre><code class="language-cpp">RegSetValueEx(HKEY_CURRENT_USER
</code></pre>
</blockquote>
<p>=&gt; hKey</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1691209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1691209</guid><dc:creator><![CDATA[trojaner]]></dc:creator><pubDate>Sun, 05 Apr 2009 12:20:31 GMT</pubDate></item></channel></rss>