<div>Eine Möglichkeit besteht mit dem Programm Runaspc von <a href="http://www.robotronic.de/runasspc.html" target="_blank" rel="noopener noreferrer" data-cke-saved-href="http://www.robotronic.de/runasspc.html">ROBOTRONIC.DE</a></div>
<div>&nbsp;</div>
<div><strong>Vorteil:</strong></div>
<div>- Der Anwender muss das Admin - Passwort nicht wissen.</div>
<div>- Begrenzt auf ausgewählte Programme</div>
<div>- Updates können von "normalen User" durchgeführt werden.</div>
<div>&nbsp;</div>
<div><strong>Potentieller Nachteil:</strong></div>
<div>Wenn das Script <strong>nicht </strong>im Programme-Pfad liegt, könnte ein User mit normalen Benutzer-Rechten die Scriptdatei (runapps.vbs) anpassen und so weitere Programme starten, z.B. die CMD-Shell.</div>
<div>Dies Sicherheitslücke wird umgangen wenn alles in dem neuen Programme-Ornder "adminme" liegt. Bei einem Netzwerk-Pfad darf dieser Ordern nur Leserechte haben.</div>
<div>&nbsp;</div>
<div><span style="text-decoration: underline;"><strong>A.] Erstellen der Routine um ein VBS-Script zu starten:</strong></span></div>
<div><strong>1.)</strong> runasspcadmin.exe starten und folgendes eintragen für die lokale Anwendung</div>
<div>border-width: medium;
<table border="0" class="cke_show_border" style="border: medium solid #c0c0c0;" cellspacing="0" cellpadding="5" bgcolor="#ffffcc">
<tbody>
<tr>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;">&nbsp;</td>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;"><strong>Lokal ausführen</strong></td>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;">&nbsp;<strong>Übers Netzwerk ausführen</strong></td>
</tr>
<tr>
<td>Path\Application.exe</td>
<td style="border-left: medium solid #c0c0c0;">%systemroot%\system32\cscript.exe</td>
<td style="border-left: medium solid #c0c0c0;">
<div>\\server\adminme\cscript.exe</div>
</td>
</tr>
<tr>
<td>Authentication</td>
<td style="border-left: medium solid #c0c0c0;">localhost</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Username</td>
<td style="border-left: medium solid #c0c0c0;">administrator</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Password</td>
<td style="border-left: medium solid #c0c0c0;">*************</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Current Encryptfile</td>
<td style="border-left: medium solid #c0c0c0;">admin.spc</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Programm Options</td>
<td style="border-left: medium solid #c0c0c0;">%programfiles%\adminme\runapps.vbs</td>
<td style="border-left: medium solid #c0c0c0;">
<div>\\server\adminme\runapp.vbs</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
<td style="border-left: medium solid #c0c0c0;">cscript.exe sollte sich ebenfalls in diesem Ordner befinden</td>
</tr>
</tbody>
</table>
<strong>2.)</strong> Save Cryptfile -&gt; "..." anklicken und in den adminme Ordner speichern.</div>
<div>Jetzt müsste eigentlich folgendes in dem Feld stehen:</div>
<div><span style="color: dodgerblue;">c:\Programme\adminme\admin.spc </span> (bis XP)</div>
<div><span style="color: dodgerblue;">c:\program files\adminme\admin.spc</span> (ab Vista)</div>
<div><strong>3.)</strong> Mit "Test Cryptfile" sollte es jetzt schon funktionieren.</div>
<div><strong>4.)</strong><strong> Progs_als_Admin.bat</strong> und<strong><strong> runapp</strong></strong><strong>.vbs</strong> erstellen und im Ordner "<span style="color: cornflowerblue;">adminme</span><span style="color: cornflowerblue;">"</span> speichern. (s.u.)</div>
<div><strong>5.)</strong> <strong>Progs_als_Admin.bat</strong> starten und schon hat der Anwender die Möglichkeit ein Programm als mit Administrator-Rechten zu starten.</div>
<div>-----------------------------------------------------------------------------------------</div>
<div>
<div>
<div>
<div><strong><strong>Script-Link: </strong><a href="/../download/wsh/runapp.vbs" target="_blank" rel="noopener noreferrer" data-cke-saved-href="/download/wsh/runapp.vbs"><img src="/../images/stories/windows/thumbs/script.jpg" alt="" style="vertical-align: text-bottom; border: 0px solid; width: 21px; height: 21px;" data-cke-saved-src="/images/stories/windows/thumbs/script.jpg" /></a> runapp.vbs</strong></div>
</div>
</div>
</div>
<div class="VBA_code"><span>Option Explicit</span><br /> <span>Dim </span>txt, frage, app, i<br /> <span>Dim </span>wshell <br /> <span>Dim </span>v(20)<br /> txt = "Zahl eintippen um das Programme zu starten." &amp; vbcrlf &amp;&nbsp;&nbsp;vbcrlf <br /> i=0<br /> <span class="VBA_code_rem">'-----------------------------------------------------</span><br /> <span class="VBA_code_rem">' Hinter&nbsp;&nbsp;" -&gt; den Anwendungs-Name eintippen der angezeigt werden soll</span><br /> <span class="VBA_code_rem">' nach V(i) der DateiPfad (sollten Leerzeichen vorkommen mit "" kapseln</span><br /> <span class="VBA_code_rem">'-----------------------------------------------------</span>
<p><span class="VBA_code_rem">'Diese 2 Befehlzeilen sollten in einer produktiven Umgebeung auskommentiert werden da eine CMD-Shell mit Admin-Rechten gestartet wird</span><br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Command-Shell starten" &amp; vbcrlf <br /> v(i) = "cmd /T:4F /k Title *** %USERNAME%-Rechte ***" <span class="VBA_code_rem">' /T:4F bedeutet Shell ist rot </span></p>
<p><span class="VBA_code_rem">'Hier wird c:\Programme ersetzt mit der Umgebungsvariablen %programfiles%.</span><br /> i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; CDBurnerXP" &amp; vbcrlf <br /> v(i) = "%programfiles%\CDBurnerXP\cdbxpp.exe"<br /> <span class="VBA_code_rem">'------------------------------------------------------</span><br /> i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Firefox" &amp; vbcrlf<br /> v(i) = """%programfiles%\Mozilla Firefox\firefox.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Foxit ReaderFirefox" &amp; vbcrlf <br /> v(i) = """%programfiles%\Foxit Software\Foxit Reader\Foxit Reader.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; IExplorer" &amp; vbcrlf<br /> v(i) = """%programfiles%\Internet Explorer\iexplore.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; iTunes" &amp; vbcrlf<br /> v(i) = """%programfiles%\iTunes\iTunes.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Skype" &amp; vbcrlf <br /> v(i) = """%programfiles%\Skype\Phone\Skype.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Thunderbird" &amp; vbcrlf<br /> v(i) = """%programfiles%\Mozilla Thunderbird\thunderbird.exe"""</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; TotalCommander" &amp; vbcrlf<br /> v(i) = "%programfiles%\totalcmd\TOTALCMD.EXE"</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt;<span> </span>TrueCrypt" &amp; vbcrlf <br /> v(i) = "%programfiles%\TrueCrypt\TrueCrypt.exe"</p>
<p>i=i+1<br /> txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; Winamp" &amp; vbcrlf<br /> v(i) = "%programfiles%\Winamp\winamp.exe"</p>
<p><span class="VBA_code_rem">' i=i+1</span><br /> <span class="VBA_code_rem">' txt = txt &amp;&nbsp;&nbsp;i &amp; " -&gt; ---" &amp; vbcrlf </span><br /> <span class="VBA_code_rem">' v(i) = "" </span></p>
<p>txt = txt &amp; vbcrlf &amp;&nbsp;&nbsp;"Alles andere schließt die Anwendung."<br /> frage = <strong>InputBox</strong>(txt , "Programm mit adminstrator Rechten starten", "1")<br /> <span>If </span>frage &lt;&gt; vbnullstring <span>Then</span></p>
<p class="VBA_code_p" style="margin-left: 10pt;">app = v(frage)</p>
<p class="VBA_code_p" style="margin-left: 10pt;"><span>Set </span>wshell = <strong>CreateObject</strong>("<span>WScript</span>.shell")</p>
<p class="VBA_code_p" style="margin-left: 10pt;">wshell.run app</p>
<span><span>End </span></span><span>If</span></div>
<div><strong>&nbsp;Programmauswahl- Fenster</strong>
<p>&nbsp;</p>
</div>
<div>&nbsp;<img src="/../images/stories/runaspcadmin_fenster.vbs.jpg" alt="" width="362" height="279" data-cke-saved-src="/images/stories/runaspcadmin_fenster.vbs.jpg" /></div>
<p><strong><strong>Progs_als_Admin</strong>.bat</strong></p>
<div class="VBA_code"><span class="VBA_code_rem">REM Die runaspc.exe lokal mit der BAT starten</span><br /> %ProgramFiles%\adminme\runasspc.exe /cryptfile:"%programfiles%\adminme\adminme.spc" /quiet</div>
<div>bzw.</div>
<div>
<div class="VBA_code"><span class="VBA_code_rem">REM Die runaspc.exe im Neztwerk starten</span><br /> \\server\adminme\runasspc.exe /cryptfile:"\server\adminme\adminme.spc" /quiet</div>
<hr size="2" width="100%" /></div>
<p><span style="text-decoration: underline;"><strong>B.] Erstellen der Routine um ein HTA-Script zu starten:</strong></span></p>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>
<div>
<table border="0" class="cke_show_border" style="border: medium solid #c0c0c0;" cellspacing="0" cellpadding="5" bgcolor="#ffffcc">
<tbody>
<tr>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;">&nbsp;</td>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;"><strong>Lokal ausführen</strong></td>
<td style="border-bottom: medium solid #c0c0c0; border-left: medium solid #c0c0c0;">&nbsp;<strong>Übers Netzwerk ausführen</strong></td>
</tr>
<tr>
<td>Path\Application.exe</td>
<td style="border-left: medium solid #c0c0c0;">%systemroot%\system32\mshta.exe</td>
<td style="border-left: medium solid #c0c0c0;">
<div>\\server\adminme\mshta.exe</div>
</td>
</tr>
<tr>
<td>Authentication</td>
<td style="border-left: medium solid #c0c0c0;">localhost</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Username</td>
<td style="border-left: medium solid #c0c0c0;">administrator</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Password</td>
<td style="border-left: medium solid #c0c0c0;">*************</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Current Encryptfile</td>
<td style="border-left: medium solid #c0c0c0;">admin.spc</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
</tr>
<tr>
<td>Programm Options</td>
<td style="border-left: medium solid #c0c0c0;">%programfiles%\adminme\runapps.hta</td>
<td style="border-left: medium solid #c0c0c0;">
<div>\\server\adminme\runapp.hta</div>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td style="border-left: medium solid #c0c0c0;">&nbsp;</td>
<td style="border-left: medium solid #c0c0c0;">mshta.exe sollte sich ebenfalls in diesem Ordner befinden</td>
</tr>
</tbody>
</table>
</div>
&nbsp;Rest siehe oben.</div>
<div>&nbsp;<strong><strong><strong>Script-Link: </strong><a href="/../download/wsh/runapp.hta" target="_blank" rel="noopener noreferrer" data-cke-saved-href="/download/wsh/runapp.hta"><img src="/../images/stories/windows/thumbs/script.jpg" alt="" style="vertical-align: text-bottom; border: 0px solid; width: 21px; height: 25px;" data-cke-saved-src="/images/stories/windows/thumbs/script.jpg" /></a> runapp.hta</strong></strong></div>
<div class="VBA_code">&nbsp;&lt;html&gt;<br /> &lt;head&gt;<br /> &lt;HTA:APPLICATION<br />
<p class="VBA_code_p" style="margin-left: 6pt;">ID="StartApp"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">APPLICATIONNAME="HTAProgramme"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">BORDER="dialog"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">SCROLL="no"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">SINGLEINSTANCE="yes"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">SHOWINTASKBAR="yes"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">MINIMIZEBUTTON="no"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">maximizeButton="no"</p>
&gt;<br /> &lt;title&gt;Programme als Administrator starten&lt;/title&gt;
<p>&lt;style type="text/css"&gt;<br /> body {</p>
<p class="VBA_code_p" style="margin-left: 6pt;">bgcolor:"#202060";</p>
<p class="VBA_code_p" style="margin-left: 6pt;">text:"#FFFFFF";</p>
<p class="VBA_code_p" style="margin-left: 6pt;">font-size:12Pt;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">color:#E0C000;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">font-style:bold;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">font-family:Verdana;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">background-color: #006;</p>
}<br /> input {font-size:12pt; color:#202060; font-style:bold; font-family:Verdana}<br /> &lt;/style&gt;<br /> &lt;/head&gt;
<p>&lt;SCRIPT LANGUAGE="VBScript"&gt;<br /> <span>Dim </span>wsh, fs, progs, iprog</p>
<p><span class="VBA_code_rem">'Wer den Hinweis eines Fehlers gern als Popup hat auf True setzten sonst False</span><br /> <span>Const </span>fPopUp =<span> False</span></p>
<p><br /> <span>Set </span>wsh = <strong>CreateObject</strong>("<span>WScript</span>.Shell")<br /> <span>Set </span>fs = <strong>CreateObject</strong>("Scripting.FileSystemObject")</p>
<p><span>Sub </span>Window_onLoad</p>
<p class="VBA_code_p" style="margin-left: 6pt;">FillArray</p>
<p class="VBA_code_p" style="margin-left: 6pt;">ProgrammList</p>
<span class="VBA_code_rem">&nbsp;&nbsp;'Breite, Höhe (ohne Programm-Optionen) + x * Programme</span><br />
<p class="VBA_code_p" style="margin-left: 6pt;">window.resizeTo 350, 250 + iprog * 20 + 30 <span class="VBA_code_rem">'30 für das &lt;br&gt; im 1. Eintrag</span></p>
<span>End </span><span>Sub </span>
<p><span class="VBA_code_rem">'Hier die Programme eintragen welche gestartet werden können/sollen</span><br /> <span>Sub </span>FillArray<br /> <span class="VBA_code_rem">' Übersichtlicher ist es so&nbsp;&nbsp;</span></p>
<p class="VBA_code_p" style="margin-left: 6pt;">iprog = 10 <span class="VBA_code_rem">'Anzahl der Programme welche gestaretet werden können</span></p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Re<span>Dim </span></span>progs(1, iprog)</p>
<span class="VBA_code_rem">&nbsp;&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Programmpfad&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Titel&nbsp;&nbsp;&nbsp;&nbsp;</span><br />
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0,0) = "cmd /T:4F /k Title *** %USERNAME%-Rechte ***"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : progs(1, 0) = "Command Shell"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 1) = "%programfiles%\CDBurnerXP\cdbxpp.exe"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 1) = "CDBurnerXP"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 2) = """%programfiles%\Mozilla Firefox\firefox.exe"""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 2) = "Firefox"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 3) = """%programfiles%\Foxit Software\Foxit Reader\Foxit Reader.exe"""&nbsp;&nbsp; : progs(1, 3) = "Foxit Reader"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 4) =&nbsp;&nbsp;"""%programfiles%\Internet Explorer\iexplore.exe"""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 4) = "IExplorer"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 5) = """%programfiles%\iTunes\iTunes.exe"""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 5) = "iTunes"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 6) = """%programfiles%\Skype\Phone\Skype.exe"""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 6) = "Skype"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 7) = """%programfiles%\Mozilla Thunderbird\thunderbird.exe"""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 7) = "Thunderbird"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 8) = "%programfiles%\totalcmd\TOTALCMD.EXE"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 8) = "TotalCommander"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 9) = "%programfiles%\TrueCrypt\TrueCrypt.exe"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: progs(1, 9) = "TrueCrypt"</p>
<p class="VBA_code_p" style="margin-left: 6pt;">progs(0, 10) = "%programfiles%\Winamp\winamp.exe"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : progs(1, 10) = "Winamp"</p>
<span>End </span><span>Sub </span>
<p><span>Sub </span>RunSkript</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Dim </span>i, s, sp&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span><span>For </span>Each </span>objButton<span> In </span>RadioOption</p>
<p class="VBA_code_p" style="margin-left: 10pt;"><span>If </span>objButton.Checked<span> Then</span></p>
<p class="VBA_code_p" style="margin-left: 14pt;">i =objButton.Value</p>
<p class="VBA_code_p" style="margin-left: 10pt;">&nbsp;sp =&nbsp;&nbsp;<strong>Replace</strong>(progs(0, i), "%programfiles%", wsh.ExpandEnvironmentStrings("%programfiles%"))&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 14pt;">s = sp</p>
<p class="VBA_code_p" style="margin-left: 10pt;"><span>If </span><strong>Left</strong>(s,1) = """"<span> Then</span> s = <strong>Right</strong>(s, <strong>Len</strong>(s)-1)</p>
<p class="VBA_code_p" style="margin-left: 14pt;"><span>If </span><strong>Right</strong>(s,1) = """"<span> Then</span> s = <strong>Left</strong>(s, <strong>Len</strong>(s)-1)</p>
<span class="VBA_code_rem">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Stimmt der angegebene Pfad zu Programm</span><br />
<p class="VBA_code_p" style="margin-left: 10pt;"><span>If </span>fs.fileExists(s)<span> Then</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 18pt;">wsh.run sp, 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 18pt;"><span>If </span>CloseApp.Checked<span> Then</span> Schliessen()</p>
<p class="VBA_code_p" style="margin-left: 14pt;"><span>Else</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 18pt;">s = "Programm-Pfad&lt;br&gt;""" &amp; sp &amp; """&lt;br&gt; wurde nicht gefunden."</p>
<p class="VBA_code_p" style="margin-left: 10pt;">UserInfo s</p>
<p class="VBA_code_p" style="margin-left: 14pt;"><span><span>End </span>If</span></p>
<p class="VBA_code_p" style="margin-left: 14pt;"><span>Exit For</span></p>
<p class="VBA_code_p" style="margin-left: 10pt;"><span><span>End </span>If</span></p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Next</span></p>
<span><span>End </span>Sub</span>
<p><span>Sub </span>UserInfo(s)</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>If </span>fPopUp<span> Then</span></p>
<p class="VBA_code_p" style="margin-left: 10pt;">s = <strong>Replace</strong>(s, "&lt;br&gt;", vbcrlf)</p>
<p class="VBA_code_p" style="margin-left: 10pt;">wsh.popup s, 5, "Datei fehlt !"</p>
<p class="VBA_code_p" style="margin-left: 10pt;">Schliessen()</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Else</span>&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 10pt;">window.resizeTo 350, 220</p>
<p class="VBA_code_p" style="margin-left: 10pt;">s = s &amp; "&lt;br&gt;&lt;br&gt;&lt;input class=""button"" type=""button"" value="" OK "" name=""EndeHTA2"" onClick=""Schliessen()""&gt;&lt;br&gt;"</p>
<p class="VBA_code_p" style="margin-left: 10pt;">ProgramList.InnerHTML = ""</p>
<p class="VBA_code_p" style="margin-left: 10pt;">Info.InnerHTML = s</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span><span>End </span>If</span></p>
<span><span>End </span>Sub</span>
<p><span>Sub </span>ProgrammList</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Dim </span>i</p>
<p class="VBA_code_p" style="margin-left: 6pt;">window.resizeTo 350, 220</p>
<p class="VBA_code_p" style="margin-left: 6pt;">ProgramList.InnerHTML = ""</p>
<p class="VBA_code_p" style="margin-left: 6pt;">s = "&nbsp; Welches Programm starten ?&lt;br/&gt;&lt;br/&gt;" &amp; vbcrlf</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>For </span>i = 0 To<span> UBound</span>(progs,2) - 1</p>
<p class="VBA_code_p" style="margin-left: 10pt;"><span>If </span>i = 0<span> Then</span></p>
<p class="VBA_code_p" style="margin-left: 14pt;">s = s &amp; "&lt;br/&gt;&nbsp;&nbsp;&lt;input type=""radio"" name=""RadioOption"" value=""" &amp; i &amp; """ Checked&gt;&lt;b&gt; " &amp; progs(1, i) &amp; "&lt;/b&gt;&lt;br&gt;"</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Else</span></p>
<p class="VBA_code_p" style="margin-left: 10pt;">s = s &amp; "&lt;br/&gt;&nbsp;&nbsp;&lt;input type=""radio"" name=""RadioOption"" value=""" &amp; i &amp; """&gt; " &amp; progs(1, i)</p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span><span>End </span>If</span></p>
<p class="VBA_code_p" style="margin-left: 6pt;"><span>Next</span></p>
<p class="VBA_code_p" style="margin-left: 6pt;">s = s &amp; "&lt;br/&gt;&lt;br/&gt;&nbsp;&nbsp;&lt;input id=runbutton&nbsp;&nbsp; class=""button"" type=""button"" value=""Starten"" name=""run_button"" onClick=""RunSkript()""&gt;" &amp; vbcrlf &amp; _</p>
<p class="VBA_code_p" style="margin-left: 22pt;">"&nbsp;&nbsp;&lt;input id=closebutton class=""button"" type=""button"" value=""Beenden"" name=""EndeHTA"" onClick=""Schliessen()""&gt;" &amp; vbcrlf &amp; _</p>
<p class="VBA_code_p" style="margin-left: 22pt;">"&lt;br/&gt;&lt;br/&gt;&nbsp;&nbsp;&lt;input type=""checkbox"" name=""CloseApp"" value=""1"" Checked =<span> True</span>&gt; Danach schließen &lt;br/&gt;&lt;br/&gt;"&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">Info.InnerHTML = s</p>
<span><span>End </span>Sub</span>
<p><span>Sub </span>Schliessen()</p>
<p class="VBA_code_p" style="margin-left: 6pt;">self.close</p>
<span><span>End </span>Sub</span>
<p>&lt;/SCRIPT&gt;</p>
<p>&lt;body&gt;<br /> &lt;fieldset&gt;&lt;Leg<span>End </span>align="Center"&gt;&lt;/legend&gt;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">&lt;span id="ProgramList"&gt;&nbsp;&nbsp;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">&lt;/span&gt;</p>
<p class="VBA_code_p" style="margin-left: 6pt;">&lt;div id="info" style="margin: 10px; font-size:11pt;"&gt;&lt;/div&gt;</p>
&lt;/fieldset&gt;<br /> &lt;/body&gt;</div>
<div>&nbsp;</div>
<div>
<div>
<div><strong>&nbsp;Programmauswahl- Fenster</strong>
<p>&nbsp;</p>
</div>
<div>&nbsp;<img src="/../images/stories/runaspcadmin_fenster.hta.jpg" alt="" width="346" height="466" border="0" data-cke-saved-src="/images/stories/runaspcadmin_fenster.hta.jpg" /></div>
<strong><strong>Progs_als_Admin</strong>.bat</strong><br />
<div>
<div class="VBA_code">%ProgramFiles%\adminme\runasspc.exe /cryptfile:"%programfiles%\adminme\adminme.spc" /quiet</div>
</div>
<div>&nbsp;</div>
<hr size="2" width="100%" /></div>
</div>