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......