Hallo Leute, hoffe ihr habt ne Idee und könnt mir helfen. Ich habe eine Batch Datei geschrieben, die verschiedene Programme ausführt, nun ist es erforderlich, das ein Programm mit Administratorrechten ausgeführt wird. Habt ihr eine Idee, mit welchen Befehl ich dieses realisieren kann?
Danke euch schon mal.
Seite 1 von 1
Programme über Batch Als Admin Starten Aber nicht die bat Datei, sondern nur einzelne Programme
Anzeige
#2
geschrieben 11. April 2007 - 15:56
Falls es sich um Windows Xp handelt könnte dir das Tool weiterhelfen: sudo für Windows
#3
geschrieben 11. April 2007 - 15:59
Es handelt sich um Windows XP Prof., aber das Programm nutzt mir nichts. Ich möchte nur ein Programm in der Batch als Administrator starten. Es geht um Call of Duty UO, da benötigt man ja Admin Rechte. Ich zeige euch das Script, damit ihr euch ein Bild machen könnt.
Zitat
@echo on
start /B /min mousemapper.exe
start /B /min coduo_minimizer.exe
cd ..
cd spiele
cd Call of Duty
coduomp.exe
taskkill /IM coduo_minimizer.exe
taskkill /IM mousemapper.exe
start /B /min mousemapper.exe
start /B /min coduo_minimizer.exe
cd ..
cd spiele
cd Call of Duty
coduomp.exe
taskkill /IM coduo_minimizer.exe
taskkill /IM mousemapper.exe
#4
geschrieben 11. April 2007 - 16:09
geht doch damit, wo genau liegt dein Problem?
Zitat
Command Line Client
The sudowin command line client binary is named Sudowin.Clients.Console.exe but is renamed to sudo.exe upon installation. The path to this file is added to the system’s PATH environment variable, so from any command line all a user has to do in order to invoke sudo is to type sudo.
For example, to open a new command prompt with sudowin, simply type:
sudo cmd
Sudowin will prompt you for your password and launch a new command prompt with elevated privileges (assuming you have the necessary rights to do this).
This command also accepts a password from the command line. So if your password is foobar then you could type:
sudo --password foobar cmd
Sudowin will not prompt you for your password, but instead use the one specified on the command line and will launch a new command prompt with elevated privileges (assuming you have the necessary rights to do this).
The sudowin command line client binary is named Sudowin.Clients.Console.exe but is renamed to sudo.exe upon installation. The path to this file is added to the system’s PATH environment variable, so from any command line all a user has to do in order to invoke sudo is to type sudo.
For example, to open a new command prompt with sudowin, simply type:
sudo cmd
Sudowin will prompt you for your password and launch a new command prompt with elevated privileges (assuming you have the necessary rights to do this).
This command also accepts a password from the command line. So if your password is foobar then you could type:
sudo --password foobar cmd
Sudowin will not prompt you for your password, but instead use the one specified on the command line and will launch a new command prompt with elevated privileges (assuming you have the necessary rights to do this).
#6
geschrieben 11. April 2007 - 18:03
richtig...warum ein zusätzliches Programm empfehlen, wenn Windows bereits eins mitbringt?
Zu allererst sollte man immer die Hilfe aufrufen. Und da du den Befehl schon kennst:
Somit könnte ein Aufruf wie folgt aussehen:
Zu allererst sollte man immer die Hilfe aufrufen. Und da du den Befehl schon kennst:
runas /?
Somit könnte ein Aufruf wie folgt aussehen:
runas.exe /env /noprofile /user:root "\path\to\program"
#9
geschrieben 13. April 2007 - 14:25
Spontan fällt mir nur das ein.
Wenn du runas das zweite Mal aufrufst (bei mir zumindest) musst du kein PW mehr eingeben.
Wenn du runas das zweite Mal aufrufst (bei mir zumindest) musst du kein PW mehr eingeben.
runas /savecred /profile /env /user:root "\path\to\program"
/savecred Verwendet Anmeldeinformationen, die von einem anderen
Benutzer gespeichert wurden. Die Option steht auf Windows
XP Home Edition nicht zur Verfügung und wird ignoriert.
Thema verteilen:
Seite 1 von 1