KwangYong Lee
Member
- Joined
- Dec 3, 2016
- Messages
- 2
- Thread Author
- #1
Sorry for my bad English.
Hi. I have a problem about remove USB printer via C#, Command-Line or PowerShell.
I try to use C# APIs(with dll), Command-Line(printui, Devcon) and PowerShell(remove-printer, remove-printerdriver, remove-printerport). But It doesn't work only when the printer is disconnected or power off.
When the printer connected via USB and power on, It will be remove clearly. But conversely, It remains inactive(Translucent mode) and "Driver is unavailable".
I must to remove the printer as C# APIs or Command-Line, not to delete it right away(such as Device Manager, Devices and Printers of Control Panel)
I want to know how to remove the USB printer when the printer is disconnected or power off as C# APIs or Command-Line. Please help me.
p.s. I try to delete keys on Registry Editor. But some keys are require SYSTEM privilege. So, I can't delete it.
p.s 2. All the methods is worked on Windows 7. But It doesn't worked on Windows 8.1 and Windows 10.
p.s 3. I try to refresh window of Devices and Printers or reboot my computer, But it still remains inactive.
p.s. 4. When I double-Click my USB printer icon after remove it via C# APIs or Command-Line, my computer shows "0x00000709" error.
Help me......
Hi. I have a problem about remove USB printer via C#, Command-Line or PowerShell.
I try to use C# APIs(with dll), Command-Line(printui, Devcon) and PowerShell(remove-printer, remove-printerdriver, remove-printerport). But It doesn't work only when the printer is disconnected or power off.
When the printer connected via USB and power on, It will be remove clearly. But conversely, It remains inactive(Translucent mode) and "Driver is unavailable".
I must to remove the printer as C# APIs or Command-Line, not to delete it right away(such as Device Manager, Devices and Printers of Control Panel)
I want to know how to remove the USB printer when the printer is disconnected or power off as C# APIs or Command-Line. Please help me.
p.s. I try to delete keys on Registry Editor. But some keys are require SYSTEM privilege. So, I can't delete it.
p.s 2. All the methods is worked on Windows 7. But It doesn't worked on Windows 8.1 and Windows 10.
p.s 3. I try to refresh window of Devices and Printers or reboot my computer, But it still remains inactive.
p.s. 4. When I double-Click my USB printer icon after remove it via C# APIs or Command-Line, my computer shows "0x00000709" error.
Help me......
This means you probably tried a bunch of other methods to remove your printer and they all failed, and now you're trying to use a method which requires advanced computer skills which is not necessary unless you are running a computer repair business. If your printer doesn't come out with the methods above, you have serious window corruption and/or hardware failure. You need to better assess where the problem is coming from and be more forthcoming about why you are trying to fix it the way you are.