All, I am attempting to write a new Remote Registry key Value string, but I keep receiving a "Cannot write to the registry key" exception. I have full access to the remote key and have set that access (as an extra measure) inside my program. Below is the code I an attempting to use. I can read the value fine, but cannot edit it. Thoughts? bool SetRegKey(String hostname, String strPrimaryUserGroup) { String strBaseKey = "Software\\Agent"; RegistryKey environmentKey = RegistryKey.OpenRemoteBaseKey( RegistryHive.LocalMachine, hostname).OpenSubKey( strBaseKey); String PUGValue = environmentKey.GetValue("PrimaryUserGroups").ToString(); if (PUGValue != strPrimaryUserGroup) { environmentKey.SetValue("PrimaryUserGroups", strPrimaryUserGroup); } return false; }
CNewbie
Posts
-
Issue Setting Remote Registry Key Value -
Runnimg Application as System ProcessIt is not a Windows Service in and of itself.
-
Runnimg Application as System ProcessAll, Is there a way in which I can run my application as a SYSTEM process instead of a user process? Thanks
-
Arithmetic ProblemWhen I try to perform the math below I get an answer of 0, but the result of the below should be 5.76 Int64 lpTotalNumberOfFreeBytes = 41085476864; Int64 lpTotalNumberOfBytes = 712212955136; Int64 strAnswer = ((lpTotalNumberOfFreeBytes / lpTotalNumberOfBytes) * 100); Does anyone see what I am doing wrong here? Thanks
-
Active Directory Authentication(For Domain User)Anyone?
-
Active Directory Authentication(For Domain User)All, I need to perform a Computer query in AD, but I am unsure how to authenicate myself. A little background: 1). I am currently logged into a machine on the domain with my domain userID. 2). I have Admin rights to the Domain as it works perfectly with VBScript (without authentication), but not with C#. I read that SetPrincipalPolicy() would allow you to authenticate yourself without providing a Username and password, but I have yet to find a way to use it successfully. Does anyone have any ideas? Thank you
-
Querying/Manipulating Active Directory with C++Does anyone have any good articles on doing these 2 things with c/c++? I see many articles for c# and VB. I would like to do simple everyday tasks but faster without the need of accessing AD Users and computers everytime. Thanks
-
Querying/Manipulating Active Directory with C++Does anyone have any good articles on doing these 2 things with c/c++? I see many articles for c# and VB. I would like to do simple everyday tasks but faster without the need of accessing AD Users and computers everytime. Thanks
-
Screen RecordingThank you for the link. While the documentation helps the library is in .NET (C#) and helps me none for c++. I will read the docs for directShow. If I remember correctly I believe Xvid has there own library in c++ which includes the Directshow filter. I may end up using that if I do not find anything better.
-
Screen RecordingI am interested in writing a program to video record all screen activity. Similar to screen capture programs (just with video). I posted here to hopefully get some ideas from my fellow coders on how one might go about getting this accomplished. Maybe a video hook similar to remote desktop or VNC. My hope is to record it to an AVi using some compression like Divx or Xvid. Anyone have any ideas? Thanks
-
Printable MSDN Winsock 2 Reference?Do you know where I can get a printable version of the MSDN Winsock 2 Reference? My eyes hurt when i have to read online much so I like to print out and read offline instead. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/winsock\_reference.asp Thanks
-
Internet/Network ProgrammingI have been putting it off for a month now because i couldnt find a real good place to start studying for this. So i figured I would ask you all here if you recommend some nice places or books to read to work with Internet programming using Windows Sockets or (if you think it is better) any other socket programming. obviously if at all possible I'd like to study Windows sockets 2, but 1.1 is ok I guess. Remember before you say go read MSDN I am really new to Internet/Network Programming, so something that will guide me is truly the most helpful. Thanks
-
Internet ProgrammingI have been putting it off for a month now because i couldnt find a real good place to start studying for this. So i figured I would ask you all here if you recommend some nice places or books to read to work with Internet programming using Windows Sockets or (if you think it is better) any other socket programming. obviously if at all possible I'd like to study Windows sockets 2, but 1.1 is ok I guess. Remember before you say go read MSDN I am really new to Internet/Network Programming, so something that will guide me is truly the most helpful. Thanks
-
Parallel Port I/O Library in C++Does anyone know where I can get information on writing a library (making a DLL of my own) for Parallel I/O Communication in C/C++? Thanks
-
Changing Text font size without changing window sizeI wanted to make some really large letters in my application but whenever I change the font size everything within the window becomes bigger, buttons, etc... Is there anyway to only change the letter font sizes only? Thanks
-
Executable not opening using ShellExecute()Just updating, I tried this and it still will not open the window, I just see the executable open in task manager then 1 second later it closes and I never see any window open:
ShellExecute(NULL,_T("open"),_T(".\\cd1\\CBTNuggetPlayer.exe"),NULL,NULL,SW_SHOW);
not sure what else to try. I've gone through the flags to no avail. -
Executable not opening using ShellExecute()Yes, I do understand that it starts from the current directory, that is why I start the relative path from the my program will be which is one directory up the tree which would be cd1/CBTNuggetsPlayer.exething I needed to know is the proper format for a relative path so i know I am doing it right.
-
Executable not opening using ShellExecute()This is a continuation from my earlier thread so all could respond. When I try to open an executable from my program using the following line it opens the executable then immdiatley closes it.:
ShellExecute(NULL,_T("open"),_T("cd1\\CBTNuggetPlayer.exe"),NULL,NULL,SW_SHOW);
The executable is a GUI and it opens fine if I go to the directory and double click on it, but it wont open the window when I try to open it from my program. As I said earlier, I am using a relative path since my program will be at the root of a CD and the executable will be 1 to 2 layers down as it is here. Anyone know why? thanks -
String Error using ShellExecute() in vs.net 2005no, I can go to the exe and double click and it opens fine. it is a GUI based exe. but trying to open it from my program doesnt bring up the window. Just opens the exe and then it closes without a window being drawn.
-
String Error using ShellExecute() in vs.net 2005Thanks that fixed the errors and taught me something :). Now it opens CBTNuggetPlayer.exe like it is supposed to but then it closes right away. No Window or anything. Why would that happen? Thanks