MnInShdw
asked on
How to change bmp file association from registry?
Double clicking on a bmp file, launches the file in Windows Picture and fax viewer.
How can I change the default viewer for bmp (only bmp) files to MsPaint.
I know that I can do it from windows explorer's Folder Option or right click the file, select Open with...
from the context menu, select MsPaint and check the checkbox that says : always open with this application.
I NEED to have a *.reg file to double click it to change the bmp files' association to
MsPaint and another one to reset it (change it to Windows Picture and Fax Viewer).
Any kind of quick help is much appreciated.
How can I change the default viewer for bmp (only bmp) files to MsPaint.
I know that I can do it from windows explorer's Folder Option or right click the file, select Open with...
from the context menu, select MsPaint and check the checkbox that says : always open with this application.
I NEED to have a *.reg file to double click it to change the bmp files' association to
MsPaint and another one to reset it (change it to Windows Picture and Fax Viewer).
Any kind of quick help is much appreciated.
Export the following two keys from your system, once before the change and another afterwards, combine the two key sets i.e. the two for Paint Shop and the other two for Windows Picture and Viewer, to make one one reg file for each product.
1. HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\Explor er\FileExt s\.bmp\
2. HKEY_CLASSES_ROOT\.bmp\
Cheers
1. HKEY_CURRENT_USER\Software
2. HKEY_CLASSES_ROOT\.bmp\
Cheers
Sorry I meant MSPaint not Paint Shop :-)
Cheers
Cheers
If you wish to make it a little easier download the following program
AutoIT 3.0 from here http://www.autoitscript.com/autoit3/downloads.php
Once installed, copy the script below into notepad and save as bmpext.au3. Now right click bmpext.au3 and select compile to exe, this will create an executable for you, just double click and it will either enable MSPaint or Microsoft Windows Picture and Viewer.
Cheers
AutoItSetOption ("ExpandVarStrings" , 1)
AutoItSetOption ("TrayIconHide" , 1)
$MSPaintReg = RegRead("HKEY_CURRENT_USER \Software\ Microsoft\ Windows\Cu rrentVersi on\Explore r\FileExts \.bmp", "Application")
If $MSPaintReg = "mspaint.exe" Then
RegDelete("HKEY_CURRENT_US ER\Softwar e\Microsof t\Windows\ CurrentVer sion\Explo rer\FileEx ts\.bmp", "Application")
MsgBox(0, "BMP Extension", "Windows Picture and Fax Viewer Associated")
EndIf
If NOT $MSPaintReg = "mspaint.exe" Then
RegWrite("HKEY_CURRENT_USE R\Software \Microsoft \Windows\C urrentVers ion\Explor er\FileExt s\.bmp", "Application", "REG_SZ", "mspaint.exe")
MsgBox(0, "BMP Extension", "MSPaint Associated")
EndIf
AutoIT 3.0 from here http://www.autoitscript.com/autoit3/downloads.php
Once installed, copy the script below into notepad and save as bmpext.au3. Now right click bmpext.au3 and select compile to exe, this will create an executable for you, just double click and it will either enable MSPaint or Microsoft Windows Picture and Viewer.
Cheers
AutoItSetOption ("ExpandVarStrings" , 1)
AutoItSetOption ("TrayIconHide" , 1)
$MSPaintReg = RegRead("HKEY_CURRENT_USER
If $MSPaintReg = "mspaint.exe" Then
RegDelete("HKEY_CURRENT_US
MsgBox(0, "BMP Extension", "Windows Picture and Fax Viewer Associated")
EndIf
If NOT $MSPaintReg = "mspaint.exe" Then
RegWrite("HKEY_CURRENT_USE
MsgBox(0, "BMP Extension", "MSPaint Associated")
EndIf
ASKER
matrixnz
Million thanks for trying to help
Unfortunately I wasn't able to make your first suggestion work for me.
Am I missing something? It's what I did :
I exported the 2 reg keys and merged them while the default program for bmp files
was Picture viewer, named it fax.reg.
Then right clicked a bmp file, selected Open with and then choose program, selected
MsPaint and checked "Use this program to open this kind of file"
Once the default program changed to MsPaint, exported the 2 keys again, merged
them and named it paint.reg
Now I'm following your autoit3 solution.
Once again thanks for your time
Million thanks for trying to help
Unfortunately I wasn't able to make your first suggestion work for me.
Am I missing something? It's what I did :
I exported the 2 reg keys and merged them while the default program for bmp files
was Picture viewer, named it fax.reg.
Then right clicked a bmp file, selected Open with and then choose program, selected
MsPaint and checked "Use this program to open this kind of file"
Once the default program changed to MsPaint, exported the 2 keys again, merged
them and named it paint.reg
Now I'm following your autoit3 solution.
Once again thanks for your time
ASKER
I downloaded autoit and followed you.
Second time of double clicking the exe file gives me this message :
MSPaint Associated but still the bmp file association hasn't changed.
I tested it on 3 PCs but it seems it doesn't work for me. Does it work for you?
when I click a bmp file, it still opens in Windows Picture and Fax Viewer.
Once again thanks for your help
Second time of double clicking the exe file gives me this message :
MSPaint Associated but still the bmp file association hasn't changed.
I tested it on 3 PCs but it seems it doesn't work for me. Does it work for you?
when I click a bmp file, it still opens in Windows Picture and Fax Viewer.
Once again thanks for your help
Hi MnInShdw
Strange cause it works for me, can you try the following for me
Download RegShot http://regshot.blog.googlepages.com/regshot
a. Run Regshot
b. Click 1st shot (Wait until Complete)
c. Now Right Click a .bmp file
d. Select Open With > Choose Program
e. Check Always use the selected program to open this kind of file.
f. Click Browse... or Select the correct Program from the list
i. Click OK
j. Now reselect Regshot from the taskbar
k. Click 2nd shot (Wait until Complete)
l. Click Compare
Can you post the results here.
Cheers
Strange cause it works for me, can you try the following for me
Download RegShot http://regshot.blog.googlepages.com/regshot
a. Run Regshot
b. Click 1st shot (Wait until Complete)
c. Now Right Click a .bmp file
d. Select Open With > Choose Program
e. Check Always use the selected program to open this kind of file.
f. Click Browse... or Select the correct Program from the list
i. Click OK
j. Now reselect Regshot from the taskbar
k. Click 2nd shot (Wait until Complete)
l. Click Compare
Can you post the results here.
Cheers
ASKER
The compare result was too much and I preferred to keep it clean.
Here is the result :
http://kou.mninshdw.net/1.txt
thanks
Here is the result :
http://kou.mninshdw.net/1.txt
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works perfect.
Million thanks for your time and help.
Million thanks for your time and help.
It doesn't have one for a BMP file unfortunately, but try editing it in notepad.