FAQ Database Discussion Community


_winreg.SaveKey Error - A required privilege is not held by the client

python,registry,privileges,winreg
I want to save the registry key "Run" using _winreg in Python. This is my code: import _winreg key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r'Software\Microsoft\Windows\CurrentVersion\Run') _winreg.SaveKey(key, "C:\key.reg") When executing, I get a Windows error message: "A required privilege is not held by the client" Can anyone see what is wrong?...

RegSetValueEx returns 998 (ERROR_NOACCESS) if called without ref

c#,pointers,winapi,visual-studio-2013,registry
I'm trying to write a DWORD to registry using c#. Using p/invoke because of registry reddirection. I've searched for this issue and finally could get it working but i don't understand. [DllImport("advapi32.dll", SetLastError = true)] static extern uint RegSetValueEx( IntPtr hKey, [MarshalAs(UnmanagedType.LPStr)] string lpValueName, int Reserved, RegistryValueKind dwType, ref IntPtr...

Is there any registry key to check all outlook inactive Addins (Not Disabled)

outlook,registry,outlook-addin
We know in outlook there are three states of a AddIn Active , Inactive , Disabled. ** My question is how we can determine if a AddIn is in Inactive state using some registry Keys ** or any other method to do so. ...

How do I time out a REGQUERY command in Powershell?

powershell,registry,wait
I am trying to find a way (maybe with a job?) to timeout system jobs. It seems my regquery will normally time out after 42 seconds if the computer is not online, and the code can't reach the registry. I am looking to limit the query to around 5 seconds...

VBScript/HTA - Using WMI to search registry

vbscript,registry,wmi,hta
I'm running into an interesting problem when I attempt to run VBScript code from within an HTA application. Specifically, when I query the Registry using WMI. Below is the VBscript (within .HTA file) code I am using to determing instance names of SQL server installations: <script language="VBScript"> Sub searchRegistry Const...

Filter and delete Registry values with Where-Object

powershell,registry
I'm not sure why I'm finding this so difficult. From under a particular registry key, I'd like to query certain registry-values based on their data (not name), and delete the resulting registry-values. For example: How would I delete any values in this key that contain, let's say, "foo". I can...

REG add Doesn't Run

windows,batch-file,registry
I've written a batch file that tests for a user's Microsoft Office version, copy an Excel Add-In to their device from a shared drive, and add a registry key to their device. Each individual action in the batch works as designed. But when I combine them all together, the file...

Error 404: cordova-plugin-file when trying to install cordova-plugin-zip for iOS

ios,cordova,plugins,registry,http-status-code-404
When trying to install the cordoba-plugin-zip using: cordova plugin add https://github.com/MobileChromeApps/zip.git as documented (https://github.com/MobileChromeApps/cordova-plugin-zip), I get the below 404 error message. Has the cordova-plugin-file its trying to reference been moved? How can I tell the plugin to look for it elsewhere if so? Installing "cordova-plugin-zip" for ios Fetching plugin "cordova-plugin-file"...

Inno Setup, Registry section, link 2 files extensions in the same entry

registry,inno-setup,file-type
This is probably a basic question, but I don't understand registry well enough. My application uses 2 kinds of files : .bmc and .mef. I want them to be displayed with 2 different icons. I did: Root: HKCR; Subkey: ".bmc"; ValueType: string; ValueName: ""; ValueData: "MyProg"; Flags: uninsdeletevalue Root: HKCR;...

Windows 8.1: can't edit registry with a VBS called from an HTA while calling the VBS alone works fine

vbscript,registry,windows-8.1,hta
I'm developping a Windows 8.1 HTA realizing various operations. At some point, I need to insert values into the registry (for autologon and runonce purposes). Here is the VBS code: Sub RunOnce() Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objShell = CreateObject("WScript.Shell") Set objRegistry = GetObject("winmgmts:\\" & strComputer &...

How to migrate registry entries with PowerShell with Get-Item : Set-Item and ExportTo-CliXml

windows,powershell,registry
I am trying to export selective registry entries, preferences and configurations for various software applications, and them import them on to a new machine. Get-ChildItem Registry::HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\OneNote -Recurse | Export-Clixml -Depth 3 -Path OneNote.xml And then reverse this process on another machine at a different time using Import-CliXml -Path OneNote.xml |...

Time Conversion with TimeZoneInfo for past years

c#,timezone,registry
Does the TimeZoneInfo.ConvertTimeFromUtc method read the daylight saving settings from the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zone to calculate the local time? If so, does it work for only the current time and not for any past years or dates? I would like to know if I can convert a past date...

Delete Registry Key with spaces at the end of line through VBS

vbscript,registry,whitespace
It seems that reg delete does not work with keys that have spaces at the end. I'm trying to delete a key with spaces, for example: "HKCU\Software\Microsoft\Sample " Does anyone have any idea on how to delete this, I already use the replace and trim function to convert the registry...

Trying converting registry code to Vb.net

vb.net,windows,registry
I am trying to convert this registry code to my vb.net code... and having some trouble! Here is the registry code: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\worldoftanks.exe\PerfOptions] "CpuPriorityClass"=dword:00000003 This code makes the application "worldoftanks.exe" run at high priority at launch. Here is my Vb.net code: Try...

Reading from Windows registry in Perl [duplicate]

windows,perl,registry
This question already has an answer here: How do I make the 32-bit Perl read the 64-bit Windows registry? 3 answers I'm trying to get the installation location of a program without checking a series of hard-coded paths, hoping to get it from the path stored in the Windows...

Registry aren't fully deleting when uninstalling

registry,inno-setup
Inno Setup isn't deleting the full registry key. Here is what I have done: [Registry] Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: GDFBinary; ValueData: {app}\GDFBinary_en_US.dll; Flags: uninsdeletekey Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: DisplayName; ValueData: Need for Speed Most...

How to tell if my process was started from Windows autorun key?

c++,windows,winapi,registry,windows-explorer
I'm curious if there's a way to know from within my process if it was started from a Windows autorun key? This one: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run EDIT: After posting this question, I discovered that evidently there's a way to find out. Process Explorer knows it somehow: Or does it simply scan the...

Find registry value types in VB.Net

vb.net,types,registry,value,dword
I am creating a very basic registry viewer in VB.Net. I need to find the type of registry key (String, DWORD, Binary .etc) but I dont know how to using VB.Net and I cannot find an answer anywhere. http://s22.postimg.org/98acwiz01/Capture.png Here is a picture of what I am trying to do....

Automate process of Disk Cleanup cleanmgr.exe without user intervention

powershell,registry,powershell-v3.0,resource-cleanup
I am developing a powershell script file which shall execute some disk cleanup without user intervention. The user shall not be able to configure anything. When I run cleanmgr.exe /d c: sageset:1 a popup window appears to select files/folders to be cleaned(cleanup options). This will create a registry entry containing...

Silverlight version not display in Listbox WPF

c#,wpf,xaml,registry
Can anyone help me what's the problem. When I run it, it will show a blank Listbox how can I want to display. Only silver light version. Thank you. private void GetSilverLightInstall() { string uninstallKey = @"SOFTWARE\Microsoft\Silverlight\Version"; using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey)) { foreach (string skName in rk.GetSubKeyNames()) { using...

batch file reg query with logical operators (NOT)

windows,batch-file,windows-7,registry,logical-operators
I am trying to write a reg query batch file that looks for key data that does NOT contain something. Currently, this code searches for a key Dependent Files (REG_MULTI_SZ) and will write the output to a file. I need it to ignore any data within Dependent Files containing "**.GPD*"....

How to launch a jar file on windows startup from the registry?

java,windows,jar,registry
I am trying to launch a jar file on Windows Server 2008 R2 startup. I tried to add a key\value to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run I tried as a value several alternatives: java -jar c:\jcm\jcm.jar "java -jar c:\jcm\jcm.jar" c:\program files(x86)\java\jre1.8.31\bin\java.exe -jar c:\jcm\jcm.jar "c:\program files(x86)\java\jre1.8.31\bin\java.exe -jar c:\jcm\jcm.jar" "c:\program files(x86)\java\jre1.8.31\bin\java.exe" -jar c:\jcm\jcm.jar But none of...

Registry import from some other system's exported .reg file?

windows,registry
I am trying to import .reg file which is exported from another system who is having same configuration. Is it possible? If it is possible what kind of problem i may face? Thanks in advance

How can I remove delta-homes.com from browsers?

search,registry,malware
whenever I open my browsers, delta-homes.com tab is added to the browser. I try to remove delta-homes.com in all of my browsers(IE,FF,chrome,Opera) by registry in run > regedit, about:config in firefox, changing home page and search engine defaults and reset Internet Explorer(and reinstall it from "Turn Windows features on or...

C# DWORD and QWORD - signed and unsigned madness

c#,registry,dword
I've noticed that DWord and QWord values when written to the Registry supposed to be Signed Integers, not Unsigned. This code will throw an exception if value is UInt64 or UInt32: registryKey.SetValue(name, value); According to MSDN DWORD is a 32-bit unsigned integer (range: 0 through 4294967295 decimal) https://msdn.microsoft.com/en-us/library/cc230318.aspx So, to...

Catch result of process from exe (right click context)

batch-file,command-line,cmd,registry,right-click
I wrote following reg file inorder to delete files/folders securely. Cmd working as expected. But sometimes I would like to see result of it (I do not want to disappare of cmd window) How can I pause / wait / stop before windows disappared "D:\Desktop\_NotUse\SDelete\sdelete.exe -s -p 5 \"%1\"" /pause...

COM registration for a 64-bit application

c#,.net,com,64bit,registry
I am creating an Installer for a 64-bit application that uses a third-party SDK. This SDK requires COM registration and seems to have some conflicting instructions so I'd like to find out best practices regarding the follows: To achieve registry-free activation (for the COM DLLs which support them), I am...

C# get values of registry subkeys

c#,registry
I have something like that in registry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MyKeys\Keys1 > random subkey 1 / value a = 1 > random subkey 2 / value b = 2 > random subkey 3 / value c = 3 > random subkey 4 / value d = 4 random subkey x - random numbers...

How do I set windows service “command line” parameters through the Parameters subkey?

c#,windows,service,parameters,registry
The windows service c# walkthrough on msdn says that the service can receive command line style args via the "Paremeters subkey" in HKLM\System\CurrentControlSet\Services\. Now, I'm assuming that means a sub-foldery looking thing as a child of the folder in the tree, and not just a value of some type named...

How can I use alternative credentials to write a registry key?

windows,powershell,registry,credentials
The script I am authoring needs to query a reg key (done), connect to a webservice via a proxy (done) and then set a registry key in HKLM. We are attempting to adapt a script to store the warranty end date of Dell machines in the registry. The script needs...

Force Inno Setup to store data in non-admin HKCU with PrivilegesRequired=admin

registry,inno-setup
I have a VBA add-in component that's being installed as part of an application that can only write to the HKCU area of the registry (GetSetting and SaveSetting functions are sandboxed in VBA). But, the installer also needs to place files in the Windows system folder so it therefore requires...

VBScript: How to add a HEX value into a registry key?

vbscript,registry
binary data to insert(from .reg file): "FailureActions"=hex:00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,\ 00,01,00,00,00,60,ea,00,00,01,00,00,00,60,ea,00,00,00,00,00,00,00,00,00,00 MSDN says: "RegWrite will write at most one DWORD to a REG_BINARY value. Larger values are not supported with this method." wshShell.RegWrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Service1\FailureActions", hexValueHere, "REG_BINARY" I am trying to avoid calling Regedit and importing a .reg file. I just need to add...

How reliable is HKEY_USERS if I know the user's SID?

c#,.net,windows,registry,registry-virtualization
I'm attempting to access registry values (written by another program) that should be readily available via the HKEY_CURRENT_USER registry base key when accessed from the logged on user's context. Unfortunately, I'm accessing this information from a service, therefore from what I've gathered, I have two options: Impersonate the logged on...

Add Registry Key Data With Quotes

windows,batch-file,registry,add-in
I have written a batch that adds a new registry value under a specified key. The data value is a file path and must have outer quotes like so: "C:\Program Files\Microsoft Office\Office15\Library\Custom_AddIn.xlam" But even when using escape characters to keep the quotes, the closest I've been able to get is...

Get argument from registry C#

c#,winforms,arguments,registry
I'm set key value in registry as follows- RegistryKey registryKey = Registry.CurrentUser.OpenSubKey ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); registryKey.SetValue("MobiCheckerTest", Application.ExecutablePath + "%autostart"); Registry looks like- C:\Users\skpaul\Desktop\StartupApp\StartupApp\bin\Debug\StartupApp.EXE%autostart In Program.cs static void Main(string[] args) //args= string[0]. { Program.LaunchedViaStartup = args != null && args.Any(arg => arg.Equals("autostart",...

How to add a new dword (32-bit) value in registry using ruby?

ruby,windows,registry
I need to add a new dword (32-bit) value '1001' in the following registry path: path = "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\" After adding, the registry structure should look like this: How can achieve the same using ruby?...

RegCreateKeyEX returns ERROR_INVALID_FUNCTION

c++,windows,error-handling,registry
I am writing a program that needs to create/delete a registry key. I am having a problem that the code to create the key returns ERROR_INVALID_FUNCTION. If you look in the registry the key has been created so I'm not sure what the impact of this error is. The value...

System.NullReferenceException with registry edit in Vb.net

.net,vb.net,internationalization,registry,nullreferenceexception
i have a problem with changing a registry value. i want to set the decimal symbol from "." to "," bud everytime i debug it, it gives a System.NullReferenceException i do partly understand what it means bud i just dont know how to fix the problem. i am using visual...

How to find a DLL when the CLSID does not exist in registry

c++,com,registry,windows-server-2012,clsid
One of system services reports in his log that it has loaded some object. In the log mentioned also the CLSID of loaded object (value is 1CECAF7C-B7A0-4B81-912D-78F202E3F0EA, see also the screenshot: Of course, first of all I searched this value in registry (I have readed also this Stack Overflow question)....

accessing a remote registry with local credentials (of the remote machine) on the domain

c#,registry,credentials
The title is a bit long but i will try to explain: i'm trying to connect from one machine (which is connected to a domain) to another machine which also connected to a domain but lost the supportedencryptiontypes of the kerberos. path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\kerberos\parameters basically, when this value changes i as...

read a remote registry key with alternate credentials in powershell

powershell,registry,credentials
I am using the following function to read remote registry keys in powershell but I now need to pass alternate credentials. How do I do that? I already have my credentials stored in $cred using the get-credential command. Param($computer) $HKEY_Local_Machine = 2147483650 $reg = [WMIClass]"\\$computer\ROOT\DEFAULT:StdRegProv" $Key = "SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\CurrentVersion\SharedDefs"...

How can I read a reg_qword in winreg in python 3.4?

python,windows,registry,python-3.4,winreg
I inserted a registry key, HKEY_LOCAL_MACHINE\SOFTWARE\test\test_qword of type REG_QWORD and value 20150509091344 (0x1253a7efba10). I then tried to load it using winreg with the following code in Python 3.4: import winreg key_dir = r"SOFTWARE\test" reg = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, key_dir, 0, winreg.KEY_WOW64_64KEY+winreg.KEY_ALL_ACCESS) test_dir = list(winreg.QueryValueEx(reg, r'test_qword'))[0] print(test_dir) ans = "".join(map(lambda b: format(b, "02x"),...

write protection mode will not change

c#,registry,file-attributes
I use this following code to remove the write protection folder so that I can delete that. But It won't work. File.SetAttributes(@"F:\File", FileAttributes.Normal); File.Delete(@"F:\File"); How can I remove the write protection? If I can remove file protection from the disk, so give some codes to do that. Any help will...

Set printer security binary key in registry via PowerShell

powershell,printing,registry
I have been struggling on how to set Security on a printer object in 2008 R2. Was super nice on a 2012 machine and want to do something similar on 2008 R2 but am failing. I wrote a function to get the value of that registry, and then a secondary...

Unable to create a new registry after a certain point in the structure

c++,registry
Hi, I am currently trying to create an application that can disable/enable the options from the ctrl+alt+del menu in windows 7. This is a snippet of code, it's hardcoded to remove the Task Manager: HKEY hkey; DWORD dwDisposition; bool ok = false; if (RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"), 0, NULL, 0, KEY_WRITE,...

How to modify Registry Value owned by System

c++,windows,winapi,com,registry
I'm trying to change registry value, and I receive this error code as result(Error code 1: Incorrect function.). I receive this error code inside, ModifyValue as result of RegSetValueEx. The method is defined in: utils.h Could someone help me ? I have uploaded the code on GitHub: https://github.com/mariopavlov/C/tree/master/RegistryManipulations Thank you...

Private docker registry and high availability

registry,docker,mirroring
We are currently running a private registry on one server hosting all our images on it. If the server crash, we basically loose all our images. We would like to find a way to enable high availability on our images. An easy solution I see would be to have a...

C++ delete key from registry HKEY_LOCAL_MACHINE

c++,visual-studio,delete,registry
I want to make uninstaller which should delete registry key from HKEY_LOCAL_MACHINE. Problem is that every time when i try delete location get LASTERROR 2, which is usually wrong name. HKEY hKey = HKEY_LOCAL_MACHINE; LSTATUS deletes = SHDeleteKey(hKey, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\NameOfApp\\"); if (deletes == ERROR_SUCCESS) { return true; } I have same...

ICallFactory with 32-bit and 64-bit type libraries side by side

windows,winapi,com,registry,typelib
I have a in-proc COM server for which I want to build 32-bit and 64-bit versions. I can do this with no problem. However, I am encountering some issues when both versions are registered. I am not using ATL. In my DllRegisterServer function, I am using RegisterTypeLibForUser. I am acquiring...

DLCleanerlite.exe launches at Windows startup but is not in startup folder or in msconfig.exe startup tab [closed]

windows,registry,malware,virus
I don't know how i got DLCleanerLite.exe installed in my Windows 7 computer, but every time my Windows loads up, DLCleanerLite loads up. I have checked Add/Remove Program feature in the Window's Control Panel. Startup Folder. MSConfig.exe Startup Tab. HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run But I don't see anything related to DLCleanerLite.exe DLCleanerLite.exe is...

Why does Docker “ancestry” API command not work?

api,registry,docker
The Docker Registry API Documentation (here) states that you can do: https://index.docker.io/v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/ancestry However this (with several image ids I have tried) only yields a 404. Why?...

Not able to execute the vbs using command prompt

vbscript,registry
i have a piece of code in the form of vbs that i have used to convert the excel file to csv. But when i execute the below code using command prompt i am getting error "There is no file extension in c:\source code" command cscript //d //Nologo C:\\Source code\\Folder1\\FileConverter.vbs...

Run on windows startup CMD with arguments

windows,cmd,registry
For some reason I need to run CMD on windows startup. I need to run CMD with arguments. Is it possible to do via registry key? I am trying the "parameter"="\"C:\\Windows\\System32\\cmd.exe\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\parameter] But how can I add arguememnts to it, if that's possible? I made this simple task "C:\Windows\System32\cmd.exe /c...

Trouble creating DWORD in LocalMachine registry field with C# WinForms

c#,winforms,registry
I am trying to create a DWORD in the LocalMachine registry field using a WinForms (C#) application. No errors are raised, but the entry is never created. RegistryKey registryKey; registryKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\InetStp\Configuration"); registryKey.SetValue("MaxWebConfigFileSizeInKB", 512, RegistryValueKind.DWord); Any ideas? ...

Launch an application using HTML

html,registry,launching-application,yahoo-messenger
I know that <a href = 'ymsgr:sendim?contactID'>Send me a message</a> will launch Yahoo Messenger. can I create something like this to launch MSWord or my own application?...

Get Windows ID c++

c++,registry
I would like read the Windows ID in my program. So I use RegGetValue in TCHAR value[255]; DWORD BufferSize = 255; int a=RegGetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "ProductId", RRF_RT_ANY, NULL, (PVOID)&value, &BufferSize); My problem is that in 64 bits OS the function read the folder "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion" and not "SOFTWARE\Microsoft\Windows NT\CurrentVersion" Unfortunetaly...

Can not get data from registry, After install update window

c++,registry
After installing Windows update KB3000850, I can write to the Registry OK: #define SIZE 16383 actionaa = "0"; RegOpenKeyExA(HKEY_CURRENT_USER, "SOFTWARE\\Demo\\App\\Setting", 0, KEY_ALL_ACCESS | KEY_WOW64_64KEY, &hKey); DWORD dwSize = lstrlen(actionaa) * sizeof(TCHAR); NumOutput = RegSetValueEx(hKey, "Start", 0, REG_SZ, (unsigned char*)actionaa, dwSize); But it is not possible to read from the Registry...

Run a batch file at folder's context menu

windows,batch-file,cmd,registry,explorer
I'd like to run this batch file (setenv.cmd) when I right click on any folder: @echo off SET CPLUS_INCLUDE_PATH=C:\mingw32\include;C:\mingw32\lib\gcc\mingw32\4.9.2\include; SET PATH=%PATH%;C:\Archivos de programa\7-Zip;C:\Archivos de programa\WinRAR;C:\usr\bin;C:\msys\1.0\bin;C:\gtk2\bin SET PKG_CONFIG_PATH=C:\gtk2\lib\pkgconfig;C:\usr\lib\pkgconfig @echo on I setuped my registry from this page, with the "prompt here". My question is how to open the console window from...

Change OS Language Silently (Windows 7)

powershell,batch-file,registry,windows-7-x64,regedit
I'm writing a script (powershell) for SQL Server 2014 Express Install. The problem is: I have to change the OS Language (Region and languages) to fr_FR (French from France) Silently. The current language is fr_CA (French from Canada). My question is: Can i change the language from intl.cpl (Region and...

Why declare like “var _ I = T{}” and “var _ I = &T{}” continuously in golang?

go,registry,docker
When I read a copy of the docker/distribution source code, I find there are variables declared which make me quite confused. The code is: var _ FileInfo = FileInfoInternal{} var _ FileInfo = &FileInfoInternal{} I don't know what the declare mean, and hope to get some help....

Determine whether VS or SSMS is installed and, if so, which version

visual-studio,registry
I am creating an installation package for an addIn made for a few versions of Visual Studio, Data Tools and SQL Server Management Studio. My installation package has to be able to detect which one of these tools is installed (if any) so that my install wizard can disable the...

Programmatically check whether the Java Development Kit is installed

java,c#,.net,registry
As part of an installer, I'm building, I want to check whether the Java Development Kit is installed already (specifically the JDK, the JRE will not do). On my local machine, I can clearly see the key in the registry (HKLM\SOFTWARE\JavaSoft\Java Development Kit), but the following code (C#) doesn't find...

Puppet: Conditional exec using unless-option

windows,command-line,registry,puppet
Puppet version is 3.7 and OS is Windows 7. I am trying to create Puppet exec that would only execute if certain Windows registry value does not exist. I am trying to use code like this: exec { 'example': path => 'C:\Windows\System32', command => 'something', unless => 'reg query "HKEY_LOCAL_MACHINE\Software\My...

Using Powershell to grab Registry Key data to build an If Else

powershell,key,registry
I am trying to use Powershell to check a particular registry key we use on servers in HKLM\SOFTWARE to identify their status as an Alpha, Beta or General server. I am not seeing an easy way to do this. I took a look at the Get-ItemProperty cmdlet, but that doesn't...

RegSetValueEx returns “Access is denied”, even though regedit allows the same user to edit this value

winapi,vb6,registry,windows-security
Our VB6 legacy application calls RegSetValueEx to set a registry value. This registry value can be easily set using regedit. However, when our application tries to set it, RegSetValueEx returns 5 - Access Is Denied. We use the same code to write to other registry keys and everything works fine....