registrykey

Read Registry_binary and convert to string

限于喜欢 提交于 2019-12-19 04:07:53
问题 I have been searching for the last 2 hours, and I actualy just have been searching stupid. I am trying to read a Registry_binary Value and convert this to a string. I tried several things I've found online(includeing some stackoverflow posts), but seems I cannot get it work: class Class1 { RegistryKey RegKey; String keys; static void Main() { Class1 c=new Class1(); c.initialize(); } void initialize() { RegKey=Registry.LocalMachine.OpenSubKey("the location", true); var bytearray=Converter

accessing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData

心已入冬 提交于 2019-12-17 20:47:16
问题 Can anyone tell me why I can't access the registry key of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData" ? if I query the GetSubKeysNames of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer" it only returns one value being "Secure" ----> Where are all the other subkeys? Thanks. 回答1: High odds that you are running your program on the 64-bit version of Windows and it is forced to run in 32-bit mode. The registry redirector will make you

How to programmatically derive windows downloads folder “%USERPROFILE%/Downloads”?

大憨熊 提交于 2019-12-17 05:09:41
问题 In .Net we can retreive the paths to 'special folders', like Documents/Desktop etc. Today I tried to find a way to get the path to the 'Downloads' folder, but it's not special enough it seems. I know I can just do 'C:\Users\Username\Downloads', but that seems an ugly solution. So how can I retreive the path using .Net? 回答1: The problem of your first answer is it would give you WRONG result if the default Downloads Dir has been changed to [Download1]! The proper way to do it covering all

How to programmatically derive windows downloads folder “%USERPROFILE%/Downloads”?

强颜欢笑 提交于 2019-12-17 05:08:33
问题 In .Net we can retreive the paths to 'special folders', like Documents/Desktop etc. Today I tried to find a way to get the path to the 'Downloads' folder, but it's not special enough it seems. I know I can just do 'C:\Users\Username\Downloads', but that seems an ugly solution. So how can I retreive the path using .Net? 回答1: The problem of your first answer is it would give you WRONG result if the default Downloads Dir has been changed to [Download1]! The proper way to do it covering all

Changes to TRegistry key dont 'hold'

谁都会走 提交于 2019-12-13 22:14:25
问题 From my Win32 app I'm reading and writing HKEY_CURRENT_USER\Software\Embarcadero\BDS\9.0\History Lists\hlRunParameters , that is where the Delphi XE2 IDE writes run-time parameters. This is the write code: procedure TFrmCleanIDEParams.BtnWriteClick(Sender: TObject); var lReg : TRegistry; lValue, lKey : String; i, lNrToWrite, lNrRegVals: Integer; begin ..... lKey := Trim(EdtRegKey.Text); // '\Software\Embarcadero\BDS\9.0\History Lists\hlRunParameters' if lKey = '' then Exit; if lKey[1] = '\'

Delete stubborn registry key

為{幸葍}努か 提交于 2019-12-13 07:15:18
问题 Description One driver left a mess in the registry (even when I uninstalled it from the system). If I check the security setting it will not display anything in “Group or user names”. And when I check the owner it shows only “Unable to display current owner.”. When I want to delete the registry keys I have to: Take the ownership. Add group. Delete the key. The problem is that each registry has several sub keys and I have to repeat the process on each key. Inherit permission option will not

WiX RemoveRegistryKey element not behaving as advertised

喜夏-厌秋 提交于 2019-12-12 23:03:24
问题 I can't seem to delete a registry key when I uninstall. Note that this isn't a repeat of this question, as I don't think that I have the same problem. Or, if I do, I'd like some clarification as to why. This problem happens when I install on a fresh VM, so it's not like I'm installing on top of the same GUID. What I'm doing is placing values from the user (from a UI) into some properties, importing those into some C# code through a CustomAction , where I then encrypt the values and put them

Run Program At Windows StartUp

社会主义新天地 提交于 2019-12-12 10:21:01
问题 I was wandering if someone could explain to me how I could make my Program run on startup? My program is a C# WCF with a small WPF UI that has to run on a server, and I need to make sure that the program will start whenever that server restarts or for whatever other reason. I have had a look around, and it appears that I have to use the registry keys but I am not to familiar with how to use registries keys, could someone please explain to me how I could use this. I am using VS2010 with

Issue With Registry Key of dfshim.dll

感情迁移 提交于 2019-12-12 01:56:16
问题 I was getting error when opening ReportBuilder Application from my WPF app on a Windows Server 2012 machine with Report Builder 3.0 for Sql Server 2012. As I workfound I deleted the registry key of dfshim.dll from below location:[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\dfshim.dll]. After this I am not getting any error and report builder is opening fine. What is the use of this registry key and what will be the impact if I delete this entry? I am not

How to read and write ¬ in Xml

旧时模样 提交于 2019-12-12 00:54:11
问题 I am writing some registry information into a XML file. There is ¬ symbol that is getting generated as a value for a string in regkey. When I write into XML I am geting and when I try read it back, I am getting an error. Is there a way to overcome this, how can I proceed? Error while reading is: > System.InvalidOperationException was unhandled > Message="There is an error in XML document (235, 28)." Read From file: public diagnostics readregkey(diagnostics diagnostics, string filename) {