I have a printer named "Teacher's Lounge Printer
" (note the apostrophe).
When executing the following command at a standard Windows 7 Command Prompt, "Error 0x8004103A Invalid object path
" occurs.
cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Teacher's Lounge Printer"
If I rename the printer to "Teachers Lounge Printer
" (without the apostrophe), the command without the apostrophe will execute successfully.
cscript "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -p "Teachers Lounge Printer"
I feel like I've tried every combination of double-quotes, single-quotes, and I've even attempted escape characters.
Eventually, this will make it into a batch script I'm writing, but I need to get the individual command working properly, first.
I know I'm doing something wrong, and any help is appreciated.