Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm writing a vbscript that will write a registry value, to be precise the script should write the value of DisableRemovableDriveScanning value 0 to

HKLM\Software\Microsoft\Microsoft Antimalwre\Scan\

but I soon realized that this doesn't work, because of user permissions.

I thought of saving the entries as a .reg and using the runas command to call the .reg file from a script as SYSTEM, but I don't know if it would work, and I haven't tried it out yet.

Would someone out there know of a way to write to HKLM?

I'm using Windows 7 64 Bit

Thanks

share|improve this question
    
Where is the code, an Admin should be able to write there, not as system but as a local admin –  AthomSfere Apr 3 '13 at 21:28
    
Code is wshShell.RegWrite "HKLM\Software\Microsoft\Microsoft Antimalwre\Scan\DisableRemovableDriveScanning", 0, "REG_DWORD" and run in vbs as administrator –  James Young Apr 3 '13 at 21:37
2  
I would try your idea then update your question if you want people to help you. Your script file is exactly how I would do something like this. –  Ramhound Apr 4 '13 at 11:59
    
Thanks, I have tried everything that I could think of but it would not work, since the value is locked by the Microsoft Antimalware process (MSE) and this process cannot be disabled, so I'm stuck. –  James Young Apr 4 '13 at 15:53
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.