registry

Find registry key using Excel VBA

一笑奈何 提交于 2020-03-05 18:05:33
问题 I want to check if a user has Microsoft SQL Native Client 2008 (sqlncli10) or Native Client 2012 (sqlncli11) installed. Dim key As String Dim myShell As Object Set myShell = CreateObject("WScript.Shell") key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SQLNCLI11\CurrentVersion\Version" 'key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentVersion" Dim strKey As String strKey = myShell.RegReadkey(key) When looking for the native client I receive the

COM & Late binding in Excel/VBA: ActiveX component can't create object

拥有回忆 提交于 2020-03-05 04:04:46
问题 I have built a .NET COM wrapper which I use in VBA to run a .NET assembly in Excel. For some reason I can't use late-binding to create objects from the .NET COM dll. Set obj = CreateObject("COMwrapper.MyClass") This throws Error 429: ActiveX component can't create object It works however if I: Use early-binding and reference the COMwrapper.tlb Run Excel with admin rights The COMwrapper .NET project and it's dependencies .NET DLLs are built with Visual Studio 2019 elevated to admin mode, so

COM & Late binding in Excel/VBA: ActiveX component can't create object

二次信任 提交于 2020-03-05 04:04:31
问题 I have built a .NET COM wrapper which I use in VBA to run a .NET assembly in Excel. For some reason I can't use late-binding to create objects from the .NET COM dll. Set obj = CreateObject("COMwrapper.MyClass") This throws Error 429: ActiveX component can't create object It works however if I: Use early-binding and reference the COMwrapper.tlb Run Excel with admin rights The COMwrapper .NET project and it's dependencies .NET DLLs are built with Visual Studio 2019 elevated to admin mode, so

Unabled to determine java version when running .bat command from within Qt installer

孤人 提交于 2020-03-03 12:16:10
问题 I would like to detect if java has been installed on a machine, and if so which JRE version. I have a simple .bat file script that runs and queries the registry. This works okay when run alone but when run within the Qt installer the same command returns no key, value pairs. I am a bit stumped. I have tried elevating the installer when executing the command, but frankly the script succeeds when running without privileges from the command, and it also did not make a difference. For instance,

Unabled to determine java version when running .bat command from within Qt installer

拜拜、爱过 提交于 2020-03-03 12:14:05
问题 I would like to detect if java has been installed on a machine, and if so which JRE version. I have a simple .bat file script that runs and queries the registry. This works okay when run alone but when run within the Qt installer the same command returns no key, value pairs. I am a bit stumped. I have tried elevating the installer when executing the command, but frankly the script succeeds when running without privileges from the command, and it also did not make a difference. For instance,

Powershell Export Multiple Keys To One .reg File

此生再无相见时 提交于 2020-03-03 05:43:40
问题 I would like to export multiple registry keys to the same .reg file. Every suggestion I've seen shows to use reg /e [key name] filename.reg, but I have a list of 4-5 registry entries I want to export and doing it this way will overwrite it each time. What I want is something like: Export HKLM\Software\Test\ABC RegFile.reg Export HKLM\Software\ABC\123 RegFile.reg Export HKLM\Software\XYZ\Lala RegFile.reg So that each registry key is appended to the same .reg file, not overwritten each time.

Read “OS install date” value from registry with RegQueryValueExA() api failed

狂风中的少年 提交于 2020-02-29 09:21:19
问题 I wanna read Windows Install Date value from registry using Windows API as bellow : HKEY hKey = { 0 }; LONG lResult = ERROR_SUCCESS; // Open a registry key lResult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &hKey); // If registry key opened if (lResult == ERROR_SUCCESS) { // Get OS install date/time DWORD dwInstallDate = 0; dwBufferSize = sizeof(DWORD); if (RegQueryValueExA(hKey, "InstallDate", 0, NULL, (LPBYTE)&dwInstallDate,

Add a separator in the Windows Explorer context menu (not in a submenu)

为君一笑 提交于 2020-02-27 07:23:49
问题 I have found that "CommandFlags"=dword:00000040 will add a separator below an entry, though only to a submenu (under the "subcommands"="" string). Example here. Is there a way to add a separator in the main context menu? The example I am using: [HKEY_CLASSES_ROOT\AllFilesystemObjects\shell\Delete With Rimraf] @="Delete With Rimraf" "CommandFlags"=dword:00000040 This gives no separator. 回答1: This example feature a separator after and before the item, this entry is for VirusTotal Uploader

IE Browser - Powershell script to add site to trusted sites list, disable protected mode & make all zones security level low

允我心安 提交于 2020-02-20 05:59:10
问题 For our website to run we need to: add site to trusted sites list [Solved] disable IE protected mode [Solved] bring down security level for all zones. [facing Issue] I am automating this site. As a prerequisite i have to take care of security features. I have create below code. But i am not able to set security level to zero. I can't find 1A10 in zones. I am adding solved issues code as well. Hoping it might help someone in need Helpful sites - https://x86x64.wordpress.com/2014/05/20

RegistrySecurity Access is denied. C#

ぐ巨炮叔叔 提交于 2020-02-15 07:31:38
问题 I'm currently having an issue when writing an app to set permissions on some Legacy keys. Legacy keys are quite locked down and to actually modify them in regedit you have to take ownership and then add yourself with full control. When trying to replicate this in code i cannot get the key for write with the error "Access is denied". Example code: RegistrySecurity rs = new RegistrySecurity(); rs.AddAccessRule(new RegistryAccessRule("Administrators", RegistryRights.FullControl,