Click here to Skip to main content
15,890,741 members
Home / Discussions / C#
   

C#

 
AnswerRe: Looking for a C# function to increment the existing user table by 1. Pin
Pete O'Hanlon30-Sep-08 2:06
mvePete O'Hanlon30-Sep-08 2:06 
QuestionPrint Window Pin
PaulaM30-Sep-08 0:09
PaulaM30-Sep-08 0:09 
AnswerRe: Print Window Pin
Giorgi Dalakishvili30-Sep-08 0:16
mentorGiorgi Dalakishvili30-Sep-08 0:16 
AnswerRe: Print Window Pin
leppie30-Sep-08 0:33
leppie30-Sep-08 0:33 
GeneralRe: Print Window Pin
PaulaM30-Sep-08 0:40
PaulaM30-Sep-08 0:40 
GeneralRe: Print Window Pin
leppie30-Sep-08 1:10
leppie30-Sep-08 1:10 
GeneralRe: Print Window Pin
Giorgi Dalakishvili30-Sep-08 0:52
mentorGiorgi Dalakishvili30-Sep-08 0:52 
QuestionWMI Pin
arkiboys30-Sep-08 0:06
arkiboys30-Sep-08 0:06 
There are printers added on the remote machine.
I am using the following code to return the list of printers on this REMOTE machine.

Question:
Do you know why this code does NOT return the name of the printers?
Thanks

//list of remote printers...
string strWapiServer = "\\\\" + txtServerName.Text;

ConnectionOptions options = new ConnectionOptions();
options.Username = "username";
options.Password = "password";
options.Authority = "NTLMDOMAIN:omniad";

ManagementScope myScope = new ManagementScope(strWapiServer + "\\root\\cimv2", options);
SelectQuery oQuery = new SelectQuery("SELECT * FROM WIN32_Printer");
ManagementObjectSearcher oResults = new ManagementObjectSearcher(myScope, oQuery);

//Iterate through printers...
foreach (ManagementObject oItem in oResults.Get())
{
string strPrinterName = oItem.Properties["DeviceID"].Value.ToString();
}
QuestionHow to access a variable from other main form Pin
kk.tvm29-Sep-08 23:52
kk.tvm29-Sep-08 23:52 
AnswerRe: How to access a variable from other main form Pin
Pedram Behroozi30-Sep-08 2:01
Pedram Behroozi30-Sep-08 2:01 
AnswerRe: How to access a variable from other main form Pin
Guffa30-Sep-08 2:18
Guffa30-Sep-08 2:18 
AnswerRe: How to access a variable from other main form Pin
nelsonpaixao30-Sep-08 13:37
nelsonpaixao30-Sep-08 13:37 
QuestionHow to replace a string ($TITLE$) from html file ? Pin
DJ24529-Sep-08 23:09
DJ24529-Sep-08 23:09 
AnswerRe: How to replace a string ($TITLE$) from html file ? Pin
Maximilian Mayerl29-Sep-08 23:13
Maximilian Mayerl29-Sep-08 23:13 
QuestionNumber to Words Pin
cse.vidhya29-Sep-08 23:06
cse.vidhya29-Sep-08 23:06 
AnswerRe: Number to Words Pin
leppie29-Sep-08 23:32
leppie29-Sep-08 23:32 
AnswerRe: Number to Words Pin
Hum Dum30-Sep-08 0:30
Hum Dum30-Sep-08 0:30 
QuestionRegister remote object in Web.config Pin
Dextter29-Sep-08 23:03
Dextter29-Sep-08 23:03 
QuestionString Manipulation - Replace function Pin
omlac29-Sep-08 22:54
omlac29-Sep-08 22:54 
AnswerRe: String Manipulation - Replace function Pin
Giorgi Dalakishvili29-Sep-08 23:03
mentorGiorgi Dalakishvili29-Sep-08 23:03 
QuestionHow to Handle RollBack event in Setup and Deployment on VS2008 Pin
am 200929-Sep-08 22:43
am 200929-Sep-08 22:43 
QuestionGetting problem in C# Pin
bishwajeet29-Sep-08 22:30
bishwajeet29-Sep-08 22:30 
AnswerRe: Getting problem in C# Pin
Pete O'Hanlon30-Sep-08 2:07
mvePete O'Hanlon30-Sep-08 2:07 
GeneralRe: Getting problem in C# Pin
bishwajeet13-Oct-08 20:01
bishwajeet13-Oct-08 20:01 
QuestionCrystal Reports Problem Pin
Hossein Afyuoni29-Sep-08 22:28
Hossein Afyuoni29-Sep-08 22:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.