Enable/disable hardware w/o Admin rights on Vista?

一个人想着一个人 提交于 2019-12-12 10:19:07

问题


I've been asked to provide a program/script/whatever that enables or disables the

  • CD/DVD drive
  • USB ports
  • Floppy (!) drive

devices without requiring admin rights, that is, that can be run by a 'normal' user.

Ideally, something like a command line utility: C:> foobar cdrom /disable

Any pointers, hints or clues gratefully accepted!

Thanks,

Rony


回答1:


You could write a service that runs as a privileged account (e.g. Local System), and write a GUI front-end application which communicates with the server. The non-admin user can then run the front-end.




回答2:


Without finding a security hole in Vista, it just plain can't be done. They require admin rights for a reason --- that's the type of things only admins should be doing.

There is a command-line utility (devcon.exe, available here), which will enable/disable devices, but it's still going to require admin rights. It's syntax is:

DEVCON disable {device id} where {device id} is one of the "Hardware ids" listed under the "details" tab of the device's Device Manager property page.




回答3:


If you happen to be on a domain, I think you can disable all of that through a group policy.




回答4:


First of all you should check if user without admin rights can do it from windows ui, using Device Manager. And I really doubt it.



来源:https://stackoverflow.com/questions/632143/enable-disable-hardware-w-o-admin-rights-on-vista

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!