I use above code in my program but it does not work. the error message is "Microsoft JScript runtime error: Automation server can't create object" when run statment " var WshNetwork = new ActiveXObject("WScript.Network");"
private void PopulateInstalledPrintersCombo()
{
// Add list of installed printers found to the combo box.
// The pkInstalledPrinters string will be used to provide the display string.
foreach(String pkInstalledPrinters in
PrinterSettings.InstalledPrinters)
{
comboInstalledPrinters.Items.Add(pkInstalledPrinters);
}
}