|
Hi,
Using c#, howe do read the folders inside the following path in the registry on a remote machine?
HKEY_CURRENT_USER\Printers\Connections
|
|
|
|
|
|
environmentKey returns null.
Any thoughts ?
This is what I have:
using System.IO;
using System;
using Microsoft.Win32;
using System.Security.Permissions;
string strRemotePC = "myMachineName";
RegistryKey environmentKey = RegistryKey.OpenRemoteBaseKey(
RegistryHive.CurrentUser, strRemotePC).OpenSubKey(
@"HKEY_CURRENT_USER\Printers\Connections");
|
|
|
|
|
Is the remote key actually opened? Make sure that "HKEY_CURRENT_USER\Printers\Connections" exists on the remote machine
|
|
|
|
|
Have you set
[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum,
Read = @"HKEY_CURRENT_USER\Printers\Connections")]
[assembly: SecurityPermissionAttribute(SecurityAction.RequestMinimum,
UnmanagedCode = true)]
|
|
|
|
|
Hello,
I would like to loop through the connections keys which I can not at present (It is only looping through Printers). Any thoughts please?
Thanks
string strRemotePC = "myMachineName";
RegistryKey CURRENT_USER_Key_Printers = RegistryKey.OpenRemoteBaseKey(
RegistryHive.CurrentUser, strRemotePC).OpenSubKey(
@"Printers");
//HKEY_CURRENT_USER\Printers\Connections
foreach (string subKeyName in CURRENT_USER_Key_Printers.GetSubKeyNames())
{
if (subKeyName.ToLower().Trim() == "connections")
{
using (RegistryKey tempKey = CURRENT_USER_Key_Printers.OpenSubKey(subKeyName))
{
Console.WriteLine("\nThere are {0} values for {1}.",
tempKey.ValueCount.ToString(), tempKey.Name);
foreach (string valueName in tempKey.GetValueNames())
{
Console.WriteLine("{0,-8}: {1}", valueName,
tempKey.GetValue(valueName).ToString());
}
}
}
}
|
|
|
|
|
You haven't answered my question. Have you set the security permissions?
|
|
|
|
|
Pete O'Hanlon wrote: You haven't answered my question.
But he has asked the same question many time
|
|
|
|
|
It's as though he wilfully wants to disregard help. I suspect he just wants us to give him the full code, and I'm sick and tired of seeing a variation of the same post from him.
|
|
|
|
|
So am I
|
|
|
|
|
|
|
Hey,
Is is possible to find the average (dominating) color in an image. For example it there's mostly white in the image, it should Messagebox.Show("Average Color: #FFFFFF") or MessageBox.Show("Average Color: R=255 G=255 B=255).
Thanks,
|
|
|
|
|
It depends how you define average color
|
|
|
|
|
There is alpha parameter. From here u can get exact decimal no.
|
|
|
|
|
Loop through the pixels in an image and see the results. A quick hack is to scale a bitmap to 1 pixel and read the color of the only pixel which should be the average and the results will depend on the scaling algorithm.
I think your question is what is the mode color?
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
HI,
Plz advice me to learn c# and .Net packages.
Guide me the way to start learning.
Priscribe the books or links to follow.
Tell the order of learning packages like can i learn ASP.Net without knowing c#
Awaiting for you valuble guidence.
Thanks,
Preethi.
|
|
|
|
|
Preethi_123 wrote: I have 3 years experiance in VC++, MFC
Honestly, Seeing your questions I kinda doubt your experience.
Plz advice me to learn c# and .Net packages.
I advice you to learn .Net
Guide me the way to start learning.
Buy a book
Priscribe the books or links to follow.
See amazon, there is a rating for each book I think, but if you have a good basics book, you'll learn the rest from msdn.
Tell the order of learning packages like can i learn ASP.Net without knowing c#
See this tells me you don't have a clue about .Net. .Net is language independent. You can create .Net winforms and webforms with VB, C++, C# and I even heard you can do it with COBOL if you really like too. The thing is that the only valid options you have considering your experience is C++ or C# and I would go for C#. ASP.Net is more complex then winforms and it's easier to develop if you can keep your mind off pointers and garbage collection.
hope this helps
|
|
|
|
|
Thanks, I dont know Anything about .Net that is why i asked these questions.
|
|
|
|
|
Start with C#. It's the main language for .NET, and is a more modern language than C++. While studying C#, you will gradually encounter more and more .NET concepts.
Start with any beginning book on C#. Then "Effective C#" by Bill Wagner is a good second book. It covers key points that a beginning book will gloss over.
There are three versions of C# in current use. After the first two books above, "C# in Depth" by Jon Skeet covers C# versions 2 and 3, assuming you already know version 1.
ASP.NET and ADO.NET can be used from any .NET language, and are used to make web pages and access databases.
|
|
|
|
|
What is the difference between AddPrinterConnection and AddPrinter.
And when do you use one instead of the other?
Thanks
|
|
|
|
|
please get me component and other requirement for this project.
|
|
|
|
|
no
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
succinct, to the point. its got my 5!
|
|
|
|
|
Why? Do your own homework.
Bob
Ashfield Consultants Ltd
|
|
|
|