Click here to Skip to main content
15,905,316 members
Home / Discussions / C#
   

C#

 
GeneralAnalyzing javascript functions Pin
ShajeeDotNet7-Apr-05 5:03
ShajeeDotNet7-Apr-05 5:03 
GeneralUSB ejection Pin
Pyro Joe7-Apr-05 4:51
Pyro Joe7-Apr-05 4:51 
GeneralRe: USB ejection Pin
Dave Kreskowiak7-Apr-05 5:42
mveDave Kreskowiak7-Apr-05 5:42 
GeneralRe: USB ejection Pin
Joel Lucsy8-Apr-05 15:29
Joel Lucsy8-Apr-05 15:29 
GeneralReading data from a .rar formatted file Pin
AfzalHassen7-Apr-05 4:29
AfzalHassen7-Apr-05 4:29 
GeneralRe: Reading data from a .rar formatted file Pin
techieboi7-Apr-05 4:48
techieboi7-Apr-05 4:48 
GeneralRe: Reading data from a .rar formatted file Pin
AfzalHassen7-Apr-05 20:14
AfzalHassen7-Apr-05 20:14 
Generaldeactivate the possibility to connect a usb-device Pin
mcyrrer7-Apr-05 4:12
mcyrrer7-Apr-05 4:12 
Hi!

I would like do deactivate the possibility to connect a usb-device like a usb-stick.
I have found the right regkey in the registry:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]

But the problem is when I write a small program to change the regkey for me I do not have the permission do this even if I am an administrator.

My code looks like this:

RegWriteKey = RegWriteKey.OpenSubKey("SYSTEM\\CurrentControlSet\\Services\\USBSTOR");
RegWriteKey.SetValue("Start",4);
RegistryKey RegWriteKey = Registry.LocalMachine;


Any suggestion how to solve this?
GeneralRe: deactivate the possibility to connect a usb-device Pin
Dave Kreskowiak7-Apr-05 4:58
mveDave Kreskowiak7-Apr-05 4:58 
GeneralShell parameters - get them Pin
Seraphin7-Apr-05 3:48
Seraphin7-Apr-05 3:48 
GeneralRe: Shell parameters - get them Pin
hooray7-Apr-05 4:06
hooray7-Apr-05 4:06 
Generalable in sqlInserting into SQL server Pin
cmitty7-Apr-05 3:46
cmitty7-Apr-05 3:46 
GeneralCreating objects at Runtime Pin
NeoPolaris7-Apr-05 2:54
NeoPolaris7-Apr-05 2:54 
GeneralRe: Creating objects at Runtime Pin
Ryan Roberts7-Apr-05 3:41
Ryan Roberts7-Apr-05 3:41 
GeneralRe: Creating objects at Runtime Pin
mav.northwind7-Apr-05 8:40
mav.northwind7-Apr-05 8:40 
GeneralRe: Creating objects at Runtime Pin
Ashok Dhamija7-Apr-05 3:42
Ashok Dhamija7-Apr-05 3:42 
GeneralRe: Creating objects at Runtime Pin
J4amieC7-Apr-05 4:26
J4amieC7-Apr-05 4:26 
GeneralRe: Creating objects at Runtime Pin
Dave Kreskowiak7-Apr-05 4:55
mveDave Kreskowiak7-Apr-05 4:55 
GeneralRe: Creating objects at Runtime Pin
Ashok Dhamija7-Apr-05 17:45
Ashok Dhamija7-Apr-05 17:45 
Generalcombobox in sourcegrid2 Pin
nisrina7-Apr-05 2:26
nisrina7-Apr-05 2:26 
GeneralSerial Port(Framework2.0) Pin
Snowjim7-Apr-05 1:54
Snowjim7-Apr-05 1:54 
QuestionStreams? Pin
Snowjim7-Apr-05 1:50
Snowjim7-Apr-05 1:50 
QuestionHow do i make it so the app runs without having .net installed? Pin
Anthony Mushrow7-Apr-05 0:46
professionalAnthony Mushrow7-Apr-05 0:46 
AnswerSearch the forums Pin
mav.northwind7-Apr-05 0:52
mav.northwind7-Apr-05 0:52 
GeneralRe: Search the forums Pin
Michael P Butler7-Apr-05 3:26
Michael P Butler7-Apr-05 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.