registry

find the path of my application installed in registry

早过忘川 提交于 2019-12-20 07:10:34
问题 Im using the innosetup to install my program java, the installer will generated the key run. I want to get the path of installation Line of innosetup: Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Mi_Programak"; ValueData: "{app}\esperoo.exe";" The class will called to file but I need the path of installation, how I get the path of installation finding in the registry with the name of my application? 回答1: I don't know if there is a built

RegSetValueEx silently fails to write to HKLM

痴心易碎 提交于 2019-12-20 05:56:27
问题 I'm trying to write in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run from my C++ application like this: HKEY key; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), NULL, KEY_ALL_ACCESS, &key) == ERROR_SUCCESS){ if (RegSetValueEx(key, TEXT("lcr"), 0, REG_SZ, (const BYTE*)runcmd.c_str(), (runcmd.size()+1)*sizeof(wchar_t)) != ERROR_SUCCESS){ cout << "ERROR" ; }else{ cout << "OK" << endl; } RegCloseKey(key); }else{ cout << "ERROR" ;

Windows control panel requires admin privileges when uninstall via NSIS

孤街醉人 提交于 2019-12-20 05:42:07
问题 I have a NSIS installer/uninstaller which install an application for the current user only. There are registry writings in HKCU in order to make the application appears in control panel. It works perfectly well. However, when I try to uninstall the application from control panel, it pop-up the admin privileges pop-up box (the AUC stuff) and run the uninstaller as admin. Therefore HKCU is related to the admin account and not the user account. In this way, a user can 'uninstall' the admin

How to Create an HKLM entry in Azure Website

痞子三分冷 提交于 2019-12-20 04:11:13
问题 How do you create an entry in the registry (HKEY_LOCAL_MACHINE) of an Azure Website? The web application only needs to read the entry. 回答1: You can't do this in Azure Web Sites. if your application absolutely needs an access to Registry, you must target Azure Web Role (classic Cloud Service). 回答2: The following page states the common baseline OS functionality for all apps running on Azure App Service and includes a section on "Registry access": https://azure.microsoft.com/en-gb/documentation

Check if VLC is installed

落爺英雄遲暮 提交于 2019-12-20 03:59:12
问题 I'm calling vlc from a C# app in order to play a video. I need a way to consistently check if VLC is installed. I've tried checking registry keys, but they don't seem to be consistent or reliable depending on your Windows version or architecture. Anyone have any suggestions/advice? 回答1: I'd say you're doing unnecessary work in trying to detect this. What are you going to do if VLC is not installed? Show an error message? Then just try to launch it, and show an error message if it fails to

64 bit & 32 bit Registry issue in Windows (Programming in c#)

 ̄綄美尐妖づ 提交于 2019-12-20 03:53:19
问题 I'm trying to get data from the registry of windows to my software but there is one thing i'm having trouble with it: if my software runs on a 64 bit system the registry path will be : HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\AVAST Software\Avast ProgramFolder and if my software runs on 32 bit system the registry path will be : HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast ProgramFolder What can i do ? to double check every time ? maybe i will check only the second option(without the

Registry redirection on 64-bit Windows

社会主义新天地 提交于 2019-12-20 02:34:28
问题 I am running 64-bit Windows, and I want to create the registry key HKCU\Software\Classes\Wow6432Node\CLSID\{myguid}\InprocServer32 using C#. What registry key should I tell it to write, so that it will be redirected to the above key? This should also work on 32-bit Windows. I am compiling my app to target x86. 回答1: If you are using .net 4 you should make use of the RegistryView enumeration. Pass RegistryView.Registry32 when you call OpenBaseKey. Use HKCU\Software\Classes\CLSID{myguid}

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

十年热恋 提交于 2019-12-20 02:17:15
问题 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 回答1: Here's how'd you do it in Visual Basic .NET Dim key As RegistryKey = Registry.LocalMachine Dim subkey As RegistryKey subkey = key.OpenSubKey("SYSTEM\CurrentControlSet\Services\USBSTOR", True) subkey.SetValue("Start", 4) You'll need

CMD / Batch / Registry - String replace not working as expected?

耗尽温柔 提交于 2019-12-19 18:54:32
问题 I'm having the most fun trying to replace a substring in one line of code for a windows registry key [HKEY_CLASSES_ROOT\PING\shell\open\command] @="C:\\Windows\\System32\\ping.exe %1 -t" Scenario and Context: The context is a custom url protocol that will open up a shell with continuous ping to a specific ip and i want to remove the protocol ping:// from the uri that gets passed as %1 . sure i could use a batch file, but I'd prefer to have it all in one line in the registry What I've tried:

CMD / Batch / Registry - String replace not working as expected?

血红的双手。 提交于 2019-12-19 18:53:22
问题 I'm having the most fun trying to replace a substring in one line of code for a windows registry key [HKEY_CLASSES_ROOT\PING\shell\open\command] @="C:\\Windows\\System32\\ping.exe %1 -t" Scenario and Context: The context is a custom url protocol that will open up a shell with continuous ping to a specific ip and i want to remove the protocol ping:// from the uri that gets passed as %1 . sure i could use a batch file, but I'd prefer to have it all in one line in the registry What I've tried: