default open by pdf viewer registry edit windows 7 - windows

I am facing a problem in my friend's pc.All shortcuts pointing to an exe opens in adobe acrobat and output the error "This file format is not supported".This is the same when any exe(program exe or setup exe) is launched.I doubt the problem is in the registry that has become corrupt and is opening all executable files with adobe pdf.I cannot even run regedit to edit the entries as even that opens with adobe pdf with the error.Please guide how can the problem be solved through some script.The OS is windows 7 Ultimate.

You could to create .txt file from desctop. Then write:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.exe]
#="exefile"
"Content Type"="application/x-msdownload"
[HKEY_CLASSES_ROOT\.exe\PersistentHandler]
#="{098f2470-bae0-11cd-b579-08002b30bfeb}"
Then save as blabla.reg and run it. Click "OK". I think, it's all :)

Related

Removing mspaint as default image viewer for all users on Windows Server 2016

I am working on a script that assigns remote apps as default programs for opening different types of files on a Windows Server 2016 Remote Desktop Session Host.
It works for file types that don't already have a default.
I am trying to change the default image viewer. However, my script ends up adding it as an open with "choice" for the user but ms paint is used by default on a double click from file explorer.
Here is an example of the explorer registry tree for .jpg:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList]
"a"="mspaint.exe"
"MRUList"="ab"
"b"="mstsc.exe"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids]
"jpegfile"=hex(0):
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
"Hash"="Qw/OEl5uE2E="
"ProgId"="PBrush"
Can I simply delete the .jpg OpenWithList and UserChoice trees and replace it with this?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList]
"a"="mstsc.exe"
"MRUList"="a"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice]
Will this make explorer open the jpegfile with the mstsc.exe program without prompting the user to make a selection?

Forcing a launcher to be opened with Internet Explorer

Ok, I've read here and here that is not possible, on a gerneral browser, to force a link to be opened in IE.
So my question is: can I do it with a desktop launcher?
Extended question: Can I easily create a desktop launcher on Windows (10, 7 and maybe older versions) that if double clicked opens a specific URL in IE?
You can create a batch file to run the command to open IE with a specific url. You can create a .bat file and put the following code in the file:
start iexplore "http://www.bing.com"
Double click the .bat file, then it will open IE with Bing website.
Result:

Shell extension on Windows 8.1

I wrote a little command-line utility in C++ which I compiled and copied into a location in the system path. I then added the following registry entries. When I right-click a TXT file, the pop-up context menu shows the usual "Open" and "Edit" but also "DoSomething" and "SomethingElse". Selecting either sends the path of the file just clicked to the utility, which processes the file.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\txtfile\shell]
[HKEY_CLASSES_ROOT\txtfile\shell\cmd2]
#="&DoSomething"
[HKEY_CLASSES_ROOT\txtfile\shell\cmd2\command]
#="DoSomething.exe 0 %1"
[HKEY_CLASSES_ROOT\txtfile\shell\cmd3]
#="&SomethingElse"
[HKEY_CLASSES_ROOT\txtfile\shell\cmd3\command]
#="DoSomething.exe 1 %1"
This works great on Windows XP...but try as I might, I cannot get the context menu entry "DoSomething" to appear on Windows 8.1. And advice on how to modify the registry entries or use another method for 8.1?

Changing the icon of an exe using Resource Hacker from the command line

I'm trying to change the icon of an exe I have already compiled (can't recompile).
I've read that you can do this using CLI by doing:
ResHacker.exe -addoverwrite "FILE.exe", "FILE_OUT.exe", "ICON_FILE.ico", ICONGROUP, MAINICON, 0
My problem is that I tested this exe in several VMs.
On Windows 7 & 8 I see the new icon.
On XP & Server 2003, I see the "blank" icon Here's how it looks, it's basically white with a blue menu bar on top
The exe is a 7zip SFX. Anyone knows what could be going on?
Thanks.

.chm files in a VM won't display

I'm running Win7 in Parallels on a MacBook Pro. HTML help files (.chm) will not open, I get the "Navigation to the webpage was canceled" message. The files are not tagged as blocked in properties.
I've seen (but not tried) some registry entries that purport to solve the issue on a file-by-file or folder basis. I'm hoping for a more global solution.
Windows may be regarding the location of the .chm files as being on a network drive. There's a link to a program called HHReg on this page: http://social.msdn.microsoft.com/Forums/en-US/devdocs/thread/ef2b95e0-4198-4e1a-b876-314a23348b5e
After a while trying to fix this problem i noticed that my .chm files would not open if inside a folder (or full path) that contains the character #
I'm using Windows 7

Resources