<?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[system befehl in einer windows apt]]></title><description><![CDATA[<p>hallo, wenn ich per system() einen systembefehl ausführen<br />
will wird ein hässliches konsolenfenster geöffnet was so lange<br />
sichtbar bleib bis der systembefhel abgearbeitet ist!</p>
<p>wie kann ich einen systembefehl ausführen ohne das so ein fenster<br />
auftaucht? ich wollte es mit diesem hier versuchen:</p>
<pre><code>const int MAX = 10000;
...
int..
...
char c[256]=&quot;&quot;;
FILE *pipe; 
pipe = _popen(&quot;echo hallo&gt;c:\hallo&quot;, &quot;r&quot;);
while (fgets(c, MAX-1, pipe))
</code></pre>
<p>aber wenn ich das mache stürzt mein program ab und es kommt eine<br />
windowsfehlermeldung mit &quot;test.exe hat einen fehler verursacht...&quot;</p>
<p>ich weis allerdings auch nicht ob bei diesem beispiel nicht auch ein<br />
konsolenfenster auftaucht?!</p>
<p>danke schonmal für eure antworten!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/78956/system-befehl-in-einer-windows-apt</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 20:02:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/78956.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Jul 2004 18:36:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to system befehl in einer windows apt on Tue, 06 Jul 2004 18:36:43 GMT]]></title><description><![CDATA[<p>hallo, wenn ich per system() einen systembefehl ausführen<br />
will wird ein hässliches konsolenfenster geöffnet was so lange<br />
sichtbar bleib bis der systembefhel abgearbeitet ist!</p>
<p>wie kann ich einen systembefehl ausführen ohne das so ein fenster<br />
auftaucht? ich wollte es mit diesem hier versuchen:</p>
<pre><code>const int MAX = 10000;
...
int..
...
char c[256]=&quot;&quot;;
FILE *pipe; 
pipe = _popen(&quot;echo hallo&gt;c:\hallo&quot;, &quot;r&quot;);
while (fgets(c, MAX-1, pipe))
</code></pre>
<p>aber wenn ich das mache stürzt mein program ab und es kommt eine<br />
windowsfehlermeldung mit &quot;test.exe hat einen fehler verursacht...&quot;</p>
<p>ich weis allerdings auch nicht ob bei diesem beispiel nicht auch ein<br />
konsolenfenster auftaucht?!</p>
<p>danke schonmal für eure antworten!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/554730</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/554730</guid><dc:creator><![CDATA[babelduo]]></dc:creator><pubDate>Tue, 06 Jul 2004 18:36:43 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Tue, 06 Jul 2004 19:50:51 GMT]]></title><description><![CDATA[<p>Was genau hast du denn vor, denn normalerweise sollte man wohl eh eher direkte WinAPI-Funktionen verwenden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/554781</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/554781</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Tue, 06 Jul 2004 19:50:51 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Thu, 08 Jul 2004 10:45:50 GMT]]></title><description><![CDATA[<p>hmm ok, also gibt es keine möglichkeit einen systembefehl<br />
unbemerkt auszuführen (ohne das ein konsolenfenster auftaucht) und<br />
den rückgabewert zu erhalten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/555906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555906</guid><dc:creator><![CDATA[babelduo]]></dc:creator><pubDate>Thu, 08 Jul 2004 10:45:50 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Thu, 08 Jul 2004 11:46:41 GMT]]></title><description><![CDATA[<p>Sag doch mal genauer, was du vorhast - dann wird es einfacher <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/555959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/555959</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Thu, 08 Jul 2004 11:46:41 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Thu, 08 Jul 2004 12:49:23 GMT]]></title><description><![CDATA[<p>ich möchte so eine art virtuelle eingabeaufforderung machen,<br />
also wo ein systembefehl ausgeführt wird und die rückgabe dann angezeigt<br />
wird!</p>
<p>nur wie oben gesagt stürzt das program ab wenn ich es mit</p>
<pre><code>const int MAX = 10000;
...
int..
...
char c[256]=&quot;&quot;;
FILE *pipe; 
pipe = _popen(&quot;echo hallo&gt;c:\hallo&quot;, &quot;r&quot;);
while (fgets(c, MAX-1, pipe))
</code></pre>
<p>machen will <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":-/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/556033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/556033</guid><dc:creator><![CDATA[babelduo]]></dc:creator><pubDate>Thu, 08 Jul 2004 12:49:23 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Thu, 08 Jul 2004 13:43:27 GMT]]></title><description><![CDATA[<p>könnte wohl daran liegen das du als buffer grösse 10000 übergibts aber deiner buffer nur 256bytes gross ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/556098</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/556098</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Thu, 08 Jul 2004 13:43:27 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Thu, 08 Jul 2004 14:33:34 GMT]]></title><description><![CDATA[<p>hmm was ist denn hier dran falsch?</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;

const int MAX = 256;

int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int ) {

char c[256]=&quot;&quot;;
FILE *pipe; 
pipe = _popen(&quot;echo hallo&gt;c:\hallo&quot;, &quot;r&quot;);
while (fgets(c, MAX-1, pipe)) {}

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/556146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/556146</guid><dc:creator><![CDATA[babelduo]]></dc:creator><pubDate>Thu, 08 Jul 2004 14:33:34 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Fri, 09 Jul 2004 17:09:21 GMT]]></title><description><![CDATA[<p>also gibt es garkeine möglichkeit einen systembefehl auszuführen?<br />
ausser vieleicht alles in eine bat-datei schreiben und diese dann<br />
versteckt aufführen, aber dann bekomme ich ja auch keinen rückgabewert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":-/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/557027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/557027</guid><dc:creator><![CDATA[babelduo]]></dc:creator><pubDate>Fri, 09 Jul 2004 17:09:21 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Fri, 09 Jul 2004 18:21:44 GMT]]></title><description><![CDATA[<p>willste nen Trojaner bauen?<br />
Puuhh.. diese Remote-Shell geshcichten...<br />
hol dir einfach sources im web<br />
gibts hundert os-trojaner die das machen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/557086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/557086</guid><dc:creator><![CDATA[lol]]></dc:creator><pubDate>Fri, 09 Jul 2004 18:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to system befehl in einer windows apt on Sun, 11 Jul 2004 17:52:11 GMT]]></title><description><![CDATA[<p>hmm eigentlich wollte ich so eine art &quot;virtuelle konsole&quot; erstellen!<br />
es gibt ja auch so teile und dann frage ich mich ob die wirklich jeden<br />
systembefehl mit einer winapi-funktion ertsetzten?!</p>
<p>aber wie ich jetzt so hier gesehen habe ist es nicht möglich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/558279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/558279</guid><dc:creator><![CDATA[babelduo(uneingeloggt)]]></dc:creator><pubDate>Sun, 11 Jul 2004 17:52:11 GMT</pubDate></item></channel></rss>