Вход на сайт
как сделать батник Shutdown с правами админа?
133
NEW 01.08.07 09:29
в ответ BaD_BuTcH 01.08.07 08:51
не стоит этого делать. для запуска с правами администратора прид╦тся в любом случае указать пароль администратора, а это ещ╦ хуже чем просто дать юзеру администраторские права
надо дать в Lokale Sicherheitsrichtlinie права текущему юзеру на выключение системы и выключать от его имени
надо дать в Lokale Sicherheitsrichtlinie права текущему юзеру на выключение системы и выключать от его имени
Фашизм будет разбит
Человека карают только те боги, в которых он верит
01.08.07 10:01
в ответ BaD_BuTcH 01.08.07 08:51
Как вам уже
gendy подсказал, лучше так не делать - я вам лишь показал, как это можно сделать через runas.
Лучше вариант:
Start --> Einstellungen --> Verwaltung --> Lokale Sicherheitsrichtlinie --> Lokale Richtlinien --> Zuweisen von Benutzerrechten --> "Herunterfahren des Systems"
Здесь вы сможете добавить/удалить User и/или Gruppen , кто должен иметь права на выключение компьютера.

Лучше вариант:
Start --> Einstellungen --> Verwaltung --> Lokale Sicherheitsrichtlinie --> Lokale Richtlinien --> Zuweisen von Benutzerrechten --> "Herunterfahren des Systems"
Здесь вы сможете добавить/удалить User и/или Gruppen , кто должен иметь права на выключение компьютера.
"Много умеет тот, кто много от себя ожидает." - А.Гумбольдт
NEW 01.08.07 11:01
в ответ WishWaster 01.08.07 10:54
runas.exe
The RunAs program runs a program as a different user, requiring the correct domain, user name, and password. The user will be prompted for any required value that was not entered on the command line.
To run a program using RunAs the following guidelines should be met:
*
Full path must be given for the program name.
*
Long directory path names are not supported by the RunAs program. For example, "d:\first sector\files\dot.exe" will not work because of the space.
*
If no program name is given, command prompt is run.
*
The .exe program can have from none to two arguments.
*
Required User Privileges: the interactive user, the user running Runas, must have the following advanced user rights
*
Act as part of the operating system
*
Replace a process level token
After assigning these privileges, the machine must be reboot for them to take affect.
USAGE:
runas /U username /P password /D domainname /E exename /A arguments [/W] [/?]
COMMAND OPTIONS:
/U username Gets user name as input
/P password Gets new password as input
/D domainname Gets domain name as input
/E exename Gets program (.exe) name with full path
/A arguments Arguments to pass program. This MUST be the last argument on the command line.
/I Interactive Mode
/W WAIT for Process Exit
/? Displays text help file
EXAMPLES:
To run a program using username "John", and be prompted for password, domain name & program name, type:
runas /U John
To run a program using the password and username for the different user and be prompted for domain & program type:
runas /P password /U John
NOTE: If the password is typed as a command line argument, it will NOT be concealed. To keep the password private, enter it when it is prompted for.
To run a program by giving the domain for the different user, and be prompted for username, password & program type:
runas /D domainname
To run a program using the program name (".exe") for the different user, and be prompted for username, password & domain, type:
programs without arguments--
runas /E d:\window\programs\notepad.exe
programs with arguments--
runas /E d:\window\programs\userinfo.exe /U username
To activate interactive mode, type:
runas /I
The RunAs program runs a program as a different user, requiring the correct domain, user name, and password. The user will be prompted for any required value that was not entered on the command line.
To run a program using RunAs the following guidelines should be met:
*
Full path must be given for the program name.
*
Long directory path names are not supported by the RunAs program. For example, "d:\first sector\files\dot.exe" will not work because of the space.
*
If no program name is given, command prompt is run.
*
The .exe program can have from none to two arguments.
*
Required User Privileges: the interactive user, the user running Runas, must have the following advanced user rights
*
Act as part of the operating system
*
Replace a process level token
After assigning these privileges, the machine must be reboot for them to take affect.
USAGE:
runas /U username /P password /D domainname /E exename /A arguments [/W] [/?]
COMMAND OPTIONS:
/U username Gets user name as input
/P password Gets new password as input
/D domainname Gets domain name as input
/E exename Gets program (.exe) name with full path
/A arguments Arguments to pass program. This MUST be the last argument on the command line.
/I Interactive Mode
/W WAIT for Process Exit
/? Displays text help file
EXAMPLES:
To run a program using username "John", and be prompted for password, domain name & program name, type:
runas /U John
To run a program using the password and username for the different user and be prompted for domain & program type:
runas /P password /U John
NOTE: If the password is typed as a command line argument, it will NOT be concealed. To keep the password private, enter it when it is prompted for.
To run a program by giving the domain for the different user, and be prompted for username, password & program type:
runas /D domainname
To run a program using the program name (".exe") for the different user, and be prompted for username, password & domain, type:
programs without arguments--
runas /E d:\window\programs\notepad.exe
programs with arguments--
runas /E d:\window\programs\userinfo.exe /U username
To activate interactive mode, type:
runas /I
"Много умеет тот, кто много от себя ожидает." - А.Гумбольдт
NEW 01.08.07 11:03
в ответ WishWaster 01.08.07 10:54
Я так понимаю, что вы руководствовались этим http://technet2.microsoft.com/windowsserver/en/library/0a688988-b5d1-494a-be98-6....
"Много умеет тот, кто много от себя ожидает." - А.Гумбольдт