registry

How to pass a (byte[] lpData) with integer value to RegSetValueExW P/Invoke

I have this P/Invoke RegSetValueExW that sets the value to the registry key. in C# [DllImport("coredll.dll", EntryPoint = "RegSetValueExW")] public static extern int RegSetValueExW(uint hKey, string lpValueName, uint lpReserved, uint lpType, byte[] lpData, uint lpcbData); I'm having a pr...

Why is selfregistration bad?

Assuming self-registration is used to install components as part of a larger installer program, why is self-registration bad? E.g. self-registering vb custom controls or capicom or whatever. I acknowledge that self-registration is probably not as safe in the case of a dll you wrote yourself, but I'm not discussing those. The MSDN lists...

C# What is the best way to write the contents of a comboBox to the registry?

I have a comboBox that is filled at run time when a button is clicked (approx 6 items read in from a database), I want to write these comboBox items to the registry so I can read them back when the program loads so the comboBox is already populated without need to reread them from the database. My question is what is the best way to wr...

How to read a registry value whose name is a file path using WshShell.RegRead

I am writing some javascript to be executed by the Windows Scripting Host, and I need to be able to read the shared file counts from the registry for certain specific DLLs. The registry key and values look like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls] "C:\\Program Files\\Common Files\\ACME Corp\\...

GetProfileInt... where in the registry?

Hi all, Simple question, if someone happens to know the answer. I'm maintaining an old Windows app; it uses GetProfileInt to retrieve a setting. Documentation says it reads "from the registry". Whereabouts? I know on older OSs, it read from win.ini. Where do the win.ini-type entries get stored in the registry? Thanks, Laure ...

How can I edit a registry key with VB.NET or VB6?

I need to edit a registry key and set the data value to "4" I know how to do it through the command prompt but am trying to find some Visual Basic code to do it. If it helps, this is the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start ...

What is the most effecient way to get fill a ComboBox with all the registered file types (not just extenstions)

What is the most efficient to fill a ComboBox with all the registered file types in Windows? I want the full file type, not just the extension. I'm using VB 9 (VS2008). Thank you. ...

Writing string (REG_SZ) values to the registry in C++

Hello, I've got most of the code for writing a value to the windows registry, however when I change the path to a dummy key and value that I've set up for testing it fails. My code is below: HKEY hKey; LPCTSTR sk = TEXT("SOFTWARE\TestSoftware"); LONG openRes = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sk, 0, KEY_ALL_ACCESS , &hKey...

StructureMap and scanning assemblies

So, I have a .NET solution that uses StructureMap, and I'd like to have StructureMap read an outside assembly that implements an interface from a project in that solution and defines the registry entry for it. StructreMap configuration for my solution: ObjectFactory.Initialize(registry => { registry.Scan(assembly => { assembl...

Disk Drive properties read via WMI

I am using WMI to query some properties disk drive. Does WMI read this information from the Drive itself or does it query the registry? How do I read the properties directly from the drive? ...

How can I keep an IE page request alive more than 1 minute?

If you are connected to the Internet directly (and not through a proxy) and requests for a page (get/post) in Internet Explorer 7, the default time-out is 1 minute. If the response from the web server takes more than a minute then you end up getting a "Network error" from IE. How can I increase this timeout in IE? Microsoft has docume...

where ODBC File DSN in Windows Vista

Hi, In Windows XP, 2003 there is one entry in the registry for ODBC file DNS location in the system: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN\DefaultDSNDir Where can I get the default DSN folder in Windows Vista and/or Windows 2008 Thanks, ...

Changing the service's startup-type (Windows)

I was searching for ways to change the start-up type of a Windows service and I found 2 ways to do this... By editing the Registry Or By using the WMI classes I want to know which one is the best... I want my application to run properly on both Windows and Vista. ...

Saving Install Path to registry

I'm creating an installer and I want it to set a registry value with the location of were the user installs the program at. How can I do that? ...

Good tools for analysing COM object registry interference?

I have inherited two complicated COM objects. One was derived from the other and (allegedly) the GUIDs, etc., were all changed so that they should not interfere. They do interfere and so far our debugging has not identified the culprit -- we've done registry compares and source code diffs and looked through the SCCS checkins. Obviously...

How can I diagnose Windows access/permission error

The title says it. I'm looking for a way to determine exactly which file/registry key this executable is attempting to access. I have attempted to use Windows auditing capabilities and Process Monitor to determine where the failure is happening but, this failure does not produce audit failure events or show as access denial in Process Mo...

Visual Studio 2008 Product Key in Registry?

I have a friend who needs to reinstall windows, but he can't find his VS2008 activation code/product key. Is there a way to look up which product key he entered when he last installed VS2008 in the registry? Any other method of finding the key is also welcome. ...

how to delete registry value in c#

I can get/set registry value using Microsoft.Win32.Registry class. For example Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "MyApp", Application.ExecutablePath); But i can't delete any value. How to delete registry value? ...

vbscript : registry directories and keys listing

If I have a registry pathing of: HKEY_LOCAL_MACHINE\SOFTWARE\INTERSTAR\XFILES\CONFIG MANAGER\SYSTEM\COMPANIES How would I go about listing all the records under that path/directory and access the DWORDs, REG_SZs and data? thanks in advance ...

How do I check if wscript/cscript runs on x64 host OS?

I'm running a VBScript that may run under x64 Windows. I need to read a registry key from the 32-bit part of the registry. For that I use path HKLM\Software\Wow6432Node\xyz instead of HKLM\Software\xyz. How can I check if the script is executed under x64? ...