我正在尝试从字典中打印以填充另一个脚本。我不断收到“行继续字符后的意外字符”。我不知道为什么
mydic = {"printer1": "printserver1", "printer2": "printserver2"}
for key in mydic.keys():
print ("For /F \"Tokens=4 delims=\\\" %%I In ('reg query HKCU\\Printers\\Connections ^|find /I \"" + key + "\"') Do If \"%%I\"==\",,"+ mydic[key] +"," + key + "\" goto :REMOVE" + \n + "goto :SKIP" + \n + ":REMOVE" + \n + "RUNDLL32 printui.dll,PrintUIEntry /n \\\\"+ mydic[key] +"\\" + key + " /dn" + \n + ":SKIP")