powercfg

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I am running 2000 server sp4, windows xp sp1. All
workstations are members of a domain so the users are
restricted. I need to be able to set power options but
can't just give the users this permission, this is a
school and if they don't need it they don't get it
because they will just cause problems. Anyway, can I set
HKey_Local_Machine\Software\Microsoft\Windows\CurrentVersi
on\Controls Folder\PowerCfg permissions for users to full
control using a batch file, then set the power options to
what I want referencing powercfg, and then set
HKey_Local_Machine\Software\Microsoft\Windows\CurrentVersi
on\Controls Folder\PowerCfg permissions for users back to
read. I would run this as a startup script. The problem I
see with this is the same as trying to just set the power
options using a startup script and that is permission,
the users don't have access to the registry so if I try
to run a stratup script when the user logs in it won't
let them change power or registry settings. Is there a
way to temporarily give them this permission, set what I
want, and then take it away. I really don't understand
why microsoft has not dealt with the problem of setting
restricted users power options. I can't log in as 500
students and set them all manually. And I have seen
nothing in group policy. any help to steer me in the
right direction would be great.
 
Doug said:
Registry permissions can be set via command line utility called REGINI.EXE, part of the NT 4 and Windows Server 2003 Resource Kits. Its probably in the Windows 2000 and XP Reskits too, but not as a separate download.

http://www.microsoft.com/downloads/...69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

Hi

Yes, it is in the Windows 2000Reskit (the buy ware part). Note that the
XP Reskits does not contain any tools, only documentation (books).

Fortunately, Regini.exe comes builtin with Windows XP (at least with Pro),
so you don't need to download anything there.

What updates the Regini.exe in the Win2k3 Server Reskit have compared to
the one in WinXP I don't know.
 
Paul said:
I am running 2000 server sp4, windows xp sp1. All
workstations are members of a domain so the users are
restricted. I need to be able to set power options but
can't just give the users this permission, this is a
school and if they don't need it they don't get it
because they will just cause problems. Anyway, can I set
HKey_Local_Machine\Software\Microsoft\Windows\CurrentVersi
on\Controls Folder\PowerCfg permissions for users to full
control using a batch file, then set the power options to
what I want referencing powercfg, and then set
HKey_Local_Machine\Software\Microsoft\Windows\CurrentVersi
on\Controls Folder\PowerCfg permissions for users back to
read. I would run this as a startup script. The problem I
see with this is the same as trying to just set the power
options using a startup script and that is permission,
the users don't have access to the registry so if I try
to run a stratup script when the user logs in it won't
let them change power or registry settings. Is there a
way to temporarily give them this permission, set what I
want, and then take it away.

Hi

If you only need to set HKEY_LOCAL_MACHINE registry values, why not do
your changes a computer startup script (with a GPO) that runs as part
of the boot up process (before the user logs in). It runs under the
system context and has admin rights.

To be able to access files over the network from the computer
startup script, you could put the file(s) on a network share and
grant read access for the AD group "Domain Computers" to the share.

Alternatively, you could map a drive on the fly, like this:

sDomainUser = "arp.corp\computer_fix"
sPswd = "something"

Set oNetwork = CreateObject("Wscript.Network")

oNetwork.MapNetworkDrive _
"Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd


If you need to do this in a user logon script, here are some Runas
wrapper utilities or alternatives that might help you:

http://groups.google.com/[email protected]


To set registry permissions, you can e.g. use Regini.exe

Fortunately, Regini.exe comes builtin with Windows XP (at least with Pro),
so you don't need to download/install anything in that case.
 
Back
Top