<?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[Prüfen ob Anwender Administrator Rechte hat.]]></title><description><![CDATA[<p>Hallo Leute,<br />
ich möchte beim Start einer Anwendung voraussetzen das der Anwender<br />
Administratorechte hat.<br />
Hintergrund ist der, dass die Anwendung vollen Zugriff auf die Registry braucht sowie auch Files löschen könne soll. Was ohne Adminrechte nicht geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/163974/prüfen-ob-anwender-administrator-rechte-hat</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Jul 2026 15:18:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/163974.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Nov 2006 17:09:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Prüfen ob Anwender Administrator Rechte hat. on Fri, 03 Nov 2006 17:09:10 GMT]]></title><description><![CDATA[<p>Hallo Leute,<br />
ich möchte beim Start einer Anwendung voraussetzen das der Anwender<br />
Administratorechte hat.<br />
Hintergrund ist der, dass die Anwendung vollen Zugriff auf die Registry braucht sowie auch Files löschen könne soll. Was ohne Adminrechte nicht geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1167855</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1167855</guid><dc:creator><![CDATA[BILL]]></dc:creator><pubDate>Fri, 03 Nov 2006 17:09:10 GMT</pubDate></item><item><title><![CDATA[Reply to Prüfen ob Anwender Administrator Rechte hat. on Fri, 03 Nov 2006 17:19:36 GMT]]></title><description><![CDATA[<p>da gibt's verschiedene tricks. du könntest zum beispiel eine winapi-funktion aufrufen, die admin-rechte braucht. etwa diese hier: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/openscmanager.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/openscmanager.asp</a><br />
dann bekommste einen ERROR_ACCESS_DENIED wenn du kein admin bist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1167863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1167863</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Fri, 03 Nov 2006 17:19:36 GMT</pubDate></item><item><title><![CDATA[Reply to Prüfen ob Anwender Administrator Rechte hat. on Fri, 03 Nov 2006 17:37:04 GMT]]></title><description><![CDATA[<p>Danke, habe schon was gefunden:</p>
<pre><code class="language-cpp">bool isUserPrivAdmin()
{
   bool Result;
   DWORD rc;
   wchar_t username[256];
   USER_INFO_1 *Userinfo;
   DWORD size = sizeof( username );

   GetUserNameW( username, &amp;size);

   rc = NetUserGetInfo( NULL, username, 1, (byte **) &amp;Userinfo );
   if ( rc != NERR_Success )
      return false;

   Result = (Userinfo-&gt;usri1_priv == USER_PRIV_ADMIN);

   NetApiBufferFree( Userinfo );
   return Result;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1167873</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1167873</guid><dc:creator><![CDATA[BILL]]></dc:creator><pubDate>Fri, 03 Nov 2006 17:37:04 GMT</pubDate></item></channel></rss>