| |
Your registry work is a little sloppy, as you place the files in the root of the C drive, and assume all computers are installed on C: (Mine is in fact D  . I've come up with a little fix: Code: Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.GIF]
@="GIFImage.Document"
[HKEY_CLASSES_ROOT\.GIF]
@="GIFImage.Document"
[HKEY_CLASSES_ROOT\GIFImage.Document]
"EditFlags"=dword:00010000
"FriendlyTypeName"=hex(2):40,00,25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,\
00,5c,00,67,00,69,00,66,00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,\
2e,00,64,00,6c,00,6c,00,2c,00,2d,00,33,00,30,00,36,00,00,00
"ImageOptionFlags"=dword:00000000
"BrowserFlags"=dword:00000008
@="GIF Image"
[HKEY_CLASSES_ROOT\GIFImage.Document\DefaultIcon]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,67,00,69,00,66,\
00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,2e,00,64,00,6c,00,6c,00,\
2c,00,34,00,00,00
[HKEY_CLASSES_ROOT\GIFImage.Document\shell]
@=""
[HKEY_CLASSES_ROOT\GIFImage.Document\shell\open]
"MuiVerb"="@shimgvw.dll,-550"
[HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\command]
@=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,67,00,69,00,66,\
00,5c,00,72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,\
65,00,20,00,25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,67,00,69,\
00,66,00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,2e,00,64,00,6c,00,\
6c,00,2c,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,00,5f,00,46,\
00,75,00,6c,00,6c,00,73,00,63,00,72,00,65,00,65,00,6e,00,20,00,25,00,31,00,\
00,00
[HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\DropTarget]
"Clsid"="{E84FDA7C-1D6A-45F6-B725-CB260C236066}"
[HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto]
[HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto\command]
@="C:\\rundll32.exe C:\\shimgvw.dll,ImageView_PrintTo /pt \"%1\" \"%2\" \"%3\" \"%4\""
"New Value #1"=hex(2):25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,67,\
00,69,00,66,00,5c,00,72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,\
65,00,78,00,65,00,20,00,25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,\
00,67,00,69,00,66,00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,2e,00,\
64,00,6c,00,6c,00,2c,00,49,00,6d,00,61,00,67,00,65,00,56,00,69,00,65,00,77,\
00,5f,00,50,00,72,00,69,00,6e,00,74,00,54,00,6f,00,20,00,2f,00,70,00,74,00,\
20,00,22,00,25,00,31,00,22,00,20,00,22,00,25,00,32,00,22,00,20,00,22,00,25,\
00,33,00,22,00,20,00,22,00,25,00,34,00,22,00,00,00 As well, I don't care for the installer or modified DLL, and found a way to set compatability through registry. For simplicity's sake, I wrote a one click installer. Literally double click and you're done(Now run again to un install), as well as source below source. The installer doesn't need autoit, and you don't need to set the compatiability settings - it does everything for you Code: #RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=XP Photo and fax viewer (For GIFS on Win 7).exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Fileversion=1.1.0.0
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Corgano, CorganoWade@gmail.com
Purpose:
This script provides a one-click instalation for easy gif viewing experience identical (literally!)
to that of windows XP
Terms of use:
This script is free to use, distribute, modify, and what else have your fancies be as long as these
three conditions are met
1: This header must remain intact with any mods or copies of this script
2: You may not sell or in any way make profit off of this script. It's free, for free use by
anyone, anywhere.
3: This is by no means an official fix. It's just a workaround to make windows XP's photo viewer
work on win 7. May work for win 8, may **** up your computer. I'm not responcable for any loss of
data or hair as result of this program
What it does:
This is based off of this idea - http://www.goofwear.com/windows/
However, there were many errors. All the addresses were static, and assumed that the system drive was
C:. It doesn't work if your system drive isn't C:, so I re-wrote it to use %WinDir% making it much, MUCH more robust. I also moved the
files to windows\gif, which is cleaner IMO. Replaced the modified "shimgvw.dll" with the real file
and wrote a simpler installer
1.1
Added an uninstal option
Fixed spelling mistakes (derp)
Added message confirming instal
Enjoy
#ce ----------------------------------------------------------------------------
$path = @WindowsDir&"\gif"
if RegRead("HKEY_LOCAL_MECHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path&"\rundll32.exe") = "WINXPSP3" or FileExists($path&"\rundll32.exe") Then
if msgbox(36,"Already installed!","Do you want to uninstal XP Photo and Fax Viewer (for gifs)?") = 6 Then
ConsoleWrite("Remove"&@CRLF)
RegDelete('HKEY_CLASSES_ROOT\.GIF')
RegDelete('HKEY_CLASSES_ROOT\GIFImage.Document')
FileDelete($path)
Exit
Else
Exit
EndIf
EndIf
ConsoleWrite("Instal"&@CRLF)
DirCreate($path)
FileInstall("rundll32.exe",$path&"\rundll32.exe",1)
FileInstall("shimgvw.dll",$path&"\shimgvw.dll",1)
RegWrite('HKEY_CLASSES_ROOT\.GIF','','REG_SZ','GIFImage.Document')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document','EditFlags','REG_DWORD','65536')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document','FriendlyTypeName','REG_EXPAND_SZ','@%WinDir%\gif\shimgvw.dll,-306')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document','ImageOptionFlags','REG_DWORD','0')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document','BrowserFlags','REG_DWORD','8')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document','','REG_SZ','GIF Image')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\DefaultIcon','','REG_EXPAND_SZ','%WinDir%\gif\shimgvw.dll,4')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell','','REG_SZ','')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open','MuiVerb','REG_SZ','@shimgvw.dll,-550')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\command','','REG_EXPAND_SZ','%WinDir%\gif\rundll32.exe %WinDir%\gif\shimgvw.dll,ImageView_Fullscreen %1')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\DropTarget','Clsid','REG_SZ','{E84FDA7C-1D6A-45F6-B725-CB260C236066}')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto\command','','REG_SZ','C:\rundll32.exe C:\shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"')
RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto\command','New Value #1','REG_EXPAND_SZ','%WinDir%\gif\rundll32.exe %WinDir%\gif\shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"')
RegWrite("HKEY_LOCAL_MECHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path&"\rundll32.exe", "REG_SZ", "WINXPSP3")
MsgBox(0,"Installed!","Try opening a gif now. Run again to uninstal") To run the source you will need Autoit installed, and the Rundll32 and shimgvw.dll files in the script's folder. I hope someone learns something or finds this useful :P
Last edited by corgano; 28 Feb 2013 at 03:19 AM..
|