0

Hello

I'm New User in this forum

I need to simple code in Vb.Net for Open / close USB Port (Windows 7) ...

I'm waiting replay

and Thanks you

PS : I do not know Good the English language

2
Contributors
7
Replies
12
Views
6 Years
Discussion Span
Last Post by trpsjt2008
0

Thanks you
but...
I did not understand this code
do this in VB.Net 2008?
I cannot useing this code
pleas help me

0

U can Open Window Dialog By Shell

Shell("RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll")

I'm trying to find the way without dialog
now i converting vb to vb.net

Edited by trpsjt2008: n/a

0

Copy This File into your folder
Devcon.exe From Microsoft
And Then use this code

Shell(Application.StartupPath & "\devcon.exe disable *USBSTOR*")

to Disable All USB Storage

Shell(Application.StartupPath & "\devcon.exe enable *USBSTOR*")[/

You can change *USBSTOR* to *CDROM To disable/enable all CDROM Drive or Anything Device ID
*usb\ROOT_HUB* ' I'm Not Sure About This But It Can Change all USB Port

Edited by trpsjt2008: n/a

0

Sorry
You Need To Extract file first before you use the file
Extract file And Copy The Inner file /i386/Devcon.exe
file to your directory

Edited by trpsjt2008: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.