registry

How to assign new rights (ACL) to existing registry key without inheriting rights from parent

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 02:28:34
问题 New rights can be set using RegistryKey.SetAccessControl(new RegistrySecurity(...)) . But after that the inheritance is turned on . Is there a way to assign new rights without turning the inheritance on? The whole code: void test { SecurityIdentifier sidAccUser = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null); NTAccount ntAccUser = sidAccUser.Translate(typeof(NTAccount)) as NTAccount; RegistryAccessRule regAcRule = new RegistryAccessRule( ntAccUser , RegistryRights.FullControl

How to launch vbs script after internet connection is detected in windows xp? [closed]

房东的猫 提交于 2019-12-25 02:15:03
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . How can i launch a vbs script after the wifi connection has been stablished? Thanks in advance. 回答1: You could launch a VBScript that loops looking for a response from an internet site/device/whatever. When it sees it, it will execute code, otherwise it will try for up to XX

RegQueryValueEx REG_SZ [C++]

本秂侑毒 提交于 2019-12-25 01:36:41
问题 which datatype should the variable that recives the data from the Registery have? HKEY hKey; HKEY hKey2; DWORD dwMHz = MAX_PATH; string pName; long lError = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &hKey); long lError2 = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &hKey2); // Working RegQueryValueEx(hKey, "~MHz", NULL, NULL, (LPBYTE) &dwMHz, &BufSize); //Not working <-- THIS -->

How can I change SharedSection in registry using C#?

谁说我不能喝 提交于 2019-12-25 01:29:51
问题 Regarding this stackoverflow entry in my registry System\\CurrentControlSet\\Control\\Session Manager\\SubSystems I have to change in value windows > string parameter SharedSection=SharedSection=1024,20480,768 the third value from 768 into 2048 . What is the best way to do that via C#? I tried the following: var myKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Session Manager\\SubSystems").GetValue("Windows"); The local variable myKey contains the following string

Split-Path with non standard key names

会有一股神秘感。 提交于 2019-12-25 01:18:19
问题 How does one deal with paths like this HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@microsoft.com/GENUINE when using Split-Path ? That forward slash near the end gets treated just like a backslash so GENUINE is treated as a separate key, rather than @microsoft.com/GENUINE being the key. Perhaps a better question is, how does one use Get-ItemProperty in this case? I have always used Split-Path to separate the Key from the Property in a path like HKEY_LOCAL_MACHINE\SOFTWARE\Key\Property but that

Fast Registry Searcher in Powershell

自作多情 提交于 2019-12-25 00:24:51
问题 I'm trying to incorporate this search-registry script that I found on Github into one of my scripts. https://github.com/KurtDeGreeff/PlayPowershell/blob/master/Search-Registry.ps1 To test it, I used one of the examples that it provided: Search-Registry -StartKey HKLM -Pattern $ENV:USERNAME -MatchData After executing, I was still prompted to enter a StartKey and a Pattern into the console. After providing that information once again, the command fails. cmdlet Search-Registry.ps1 at command

nsis uninstaller not deleting registry for electron app - nsh script

我怕爱的太早我们不能终老 提交于 2019-12-25 00:14:43
问题 I've set my electron app to auto-start on windows: app.setLoginItemSettings({ openAtLogin: true, path: process.execPaths }) This adds an entry to registry at location Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\electron.app my app I'm using electron-builder to package my app. It's mention there that I can add a script installer.nsh at the time of nsis uninstallation. Here's my custom installer.nsh : !macro customUnInstall SetRegView 64 DeleteRegKey /ifempty SHCTX

Adobe pdf printer doesn't creating the pdf file

纵饮孤独 提交于 2019-12-24 22:52:06
问题 I'm creating an add-in in Revit 2017. The addin will export drawing sheets to PDF files. So, whenever I try to export the sheet a dialog box appears to choose the location to save. I tried to turn off the Prompting programmatically by adding a key to the Windows registry (as described in Adobe documentation page 15-16). Now, the prompting got turned off and now I'm facing an issue. The issue is the Adobe Printer got stuck while creating the pdf file . See the below image: The PDF creating

Change internet explorer security settings

醉酒当歌 提交于 2019-12-24 21:47:43
问题 HI, How can i change internet explorer security settings by code. i want to do the steps below but by code: Tools -> Internet Options -> Security tab -> Custom Level -> and change the logon type to Anonymous logon. I think that it can be changed from the registry file but i can't found it. 回答1: Microsoft has rather extensive documentation on the registry keys used by the Internet Zones here. The settings are located under the key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion

Dynamicly Adjusting Tree populated with registry values

早过忘川 提交于 2019-12-24 20:16:55
问题 I am attempting to populate a tree structure with everything from the registry in string form so that I may use it to make comparisons to changes later on. So far I've come to an impasse with actually providing dynamic additions of children to the tree structure as I can never be certain as to how many children a subkey in the registry is going to have! Or how many values it will have, so I have to be able to dynamically populate the tree structure without knowing how many children there will