registry

Clickonce + HKEY_LOCAL_MACHINE

a 夏天 提交于 2019-12-24 17:19:10
问题 I have a WPF app written in .NET 4.0, VS2010 that I am looking to deploy via clickonce internally on our intranet. The issue is that I am trying to create a registry key in HKEY_LOCAL_MACHINE, and I am getting access denied. I have the app set for full trust, and even tried asserting the RegistryPermission to no avail. Is it truly not even possible to distribute an app via clickonce and have it access HKEY_LOCAL_MACHINE? 回答1: Not with ClickOnce. See here for a discussion. Relevant part: Due

How to sync Time with NTP server on windows

你说的曾经没有我的故事 提交于 2019-12-24 16:41:06
问题 I'm trying to find a way to sync my machine (win 7/8.1/TH) time with an NTP server every x time. i.e sync clock every 1 hour. I understood there's a way to do it by configuring something in the registry. Another good solution can be a way to automatically run a .bat file every x time, which will contain w32tm /config /update /manualpeerlist:" + NTPServerAddress But I prefer a reg solution if possible. THX! 回答1: found the solution here link Basically you just need to go to HKEY_LOCAL_MACHINE

Access registry from a web aplication

限于喜欢 提交于 2019-12-24 16:24:40
问题 Is it possible to access to the registry from a web application? 回答1: After reading you comment to @SLaks I'm inclined to point out that there are server tools that are there to do exactly that. In fact I think Windows Server editions come with these features out of the box. 回答2: It is completely impossible to access the end-users registry, unless you use an IE-only ActiveX control. (and there is (almost) no better way to make your users hate you than to use an ActiveX control) If you're

How to find/delete a string value in the registry based on its value

最后都变了- 提交于 2019-12-24 16:09:45
问题 I am trying to write a .reg file that would take a given key, and search for a string value based on its contents, and then delete it. For example: [path] "a"="b" "z"="y" "foo"="bar" And somehow delete the value "foo" by knowing either "bar" or a substring of that. Is this possible? Would I need to do this in a .bat script (which is fine, btw)? 回答1: try this in a BAT file SET KEY=HKLM\Software\MySoftware\Path SET VALUE=BAR for /F "tokens=1,*" %%a in ('REG QUERY "%KEY%" ^| findstr /I /C:"

Windows 10 toast notification issue

江枫思渺然 提交于 2019-12-24 15:17:51
问题 I've tried using the registry changes to move the windows 10 toast notification thing, but when I went in, there was no "DisplayToastAtBottom"(Mind you, they already appear at the bottom) Very sorry if this isn't the right place to ask! :s 回答1: In this question on the Microsoft answers site, a Microsoft rep tries to smooth things over, but then later replies and basically says you can't: The Toast notification which you receive at bottom is by design in Windows 10. This cannot be changed. In

Is there a windows registry entry for the original background location?

两盒软妹~` 提交于 2019-12-24 14:36:02
问题 Is there a windows registry entry for the original background location? At "HKEY_CURRENT_USER\Control Panel\Desktop", the value "Wallpaper" is "C:\Users\CURRENTUSER\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper.jpg". 回答1: It actually depends how the wallpaper got there. This works on Windows 7, when the wallpaper is set via the control panel and wallpaper slideshows are enabled: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\WallpaperSource In other

Windows right click context menu items number limit

独自空忆成欢 提交于 2019-12-24 14:32:03
问题 I follow this link from Microsoft to create Windows 10 context menu. How to Create Cascading Menus with the SubCommands Registry Entry: https://docs.microsoft.com/en-us/windows/desktop/shell/how-to--create-cascading-menus-with-the-subcommands-registry-entry However, I found if items in the context menu are more than a certain number. Windows only show part of the context menu items. If I have a structure like this, it will end up showing the submenu1 and submenu2. If you have even more items

Is it possible to register a multi-dotted file extension?

自古美人都是妖i 提交于 2019-12-24 13:34:58
问题 In our application, we have a file extension like this: filename.applicationName.zip Now I want to register its file extension .applicationName.zip Q: It this possible at all? (I know how to register file extensions, that's not the point here) 回答1: An extension is defined to be the characters that appear after the final dot in the filename. The file extension is determined by simple text processing. You start at the end of the filename and walk backwards until you find a dot. Using your

Unable to read registry: System.Security.SecurityException, Requested registry access is not allowed

懵懂的女人 提交于 2019-12-24 13:24:16
问题 I'm getting reported errors from users who are receiving the error "System.Security.SecurityException, Requested registry access is not allowed." when trying to read the registry. I can't think why someone would not have permission to read the registry and I'm unable to reproduce the problem on my Windows 7 PC. Affected users are running .NET 4.0 Here's the C# code I'm using: var baseReg = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32); var key = baseReg

Control Panel Settings from Command Line

不羁的心 提交于 2019-12-24 11:47:34
问题 I'm looking for a way to make a Registry Change take affect right away. Specifically the value I want to touch is: HKEY_CURRENT_USER/Control\ Panel/Desktop/WindowArrangementActive When you change this setting directly from the Control Panel it takes effect immediately, but when I'm changing it manually, it is not registered before rebooting. I'm trying to make a script to disable/enable window snapping in Windows 10. I've currently tried running the following command after the change with no