Please Help !
I need to control the Diskprotect from a user account.
My C++ program must update itself when it finds a update file on the network.
The Scripts to set the Dsik Protect to: "Remove all changes at restart" & "Retain all changes permanently" work perfectly when I am logged in as the Administrator, but when I run them from the (restricted) user account a error "access denied" is displayed when the "objWdp.Put_" command is executed.
How to run this script from a restricted user account ???
' Identify the computer to manage
strComputer= "."
set objWbemServices = GetObject ("winmgmts:\\" & strComputer & "\root\wmi")
set setWdpObjects = objWbemServices.ExecQuery ("SELECT * FROM WDP_Control")
for each objWdp in setWdpObjects
objWdp.CurrentMode = 0
objWdp.Put_
next
' Query again to get current Mode
set objWbemServices = GetObject ("winmgmts:\\" & strComputer & "\root\wmi")
set setWdpObjects = objWbemServices.ExecQuery ("SELECT * FROM WDP_Control")
for each objWdp in setWdpObjects
Status = objWdp.CurrentMode
next
WScript.Quit Status