├── Setup.ico ├── shimgvw.dll ├── splash.jpg ├── l-249485.gif ├── Windows7GifViewer.exe ├── test.au3 ├── .gitattributes ├── .gitignore ├── Windows7GifViewerNo-UAC.au3 └── Windows7GifViewer.au3 /Setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corgano/Windows7GifViewer/HEAD/Setup.ico -------------------------------------------------------------------------------- /shimgvw.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corgano/Windows7GifViewer/HEAD/shimgvw.dll -------------------------------------------------------------------------------- /splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corgano/Windows7GifViewer/HEAD/splash.jpg -------------------------------------------------------------------------------- /l-249485.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corgano/Windows7GifViewer/HEAD/l-249485.gif -------------------------------------------------------------------------------- /Windows7GifViewer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Corgano/Windows7GifViewer/HEAD/Windows7GifViewer.exe -------------------------------------------------------------------------------- /test.au3: -------------------------------------------------------------------------------- 1 | ;~ FileSetAttrib("C:\Windows\system32\rundll32.exe", "-RS") 2 | DirCreate("C:\Program Files (x86)\123") 3 | FileCopy("C:\Windows\system32\rundll32.exe" , "C:\Program Files (x86)\Windows7GifViewer\rundll32.exe",9) 4 | ;~ FileSetAttrib("C:\Windows\system32\rundll32.exe", "+RS") -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /Windows7GifViewerNo-UAC.au3: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | #Region ;**** Directives created by AutoIt3Wrapper_GUI **** 3 | #AutoIt3Wrapper_Icon=Setup.ico 4 | #AutoIt3Wrapper_Outfile=Windows7GifViewer-NoUAC.exe 5 | #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** 6 | 7 | #cs ---------------------------------------------------------------------------- 8 | 9 | AutoIt Version: 3.3.8.1 10 | Author: Jarmezrocks aka Digitalfacade82 jarmezrocks@gmail.com 11 | 12 | Script Function: 13 | This installer is based off the one written by Corgano, CorganoWade@gmail.com from sevenforums and autoIT forums 14 | 15 | Additions added by me: 16 | 1. Instead of forcing us to install anywhere let alone root of the system drive I would rather give people a choice. This makes the solution a bit more "polished" 17 | - Note as it was I was using Corgano's installer and then carrying with me an additional reg file to run afterwards to move the install away from the root of C:\ and correct the following: 18 | 19 | 2. I made some small adjustments to Registry writes to incorrect locations that were annoying for me to have to go and change after installing 20 | 3. Correctly added the rundll32.exe in compatability mode for Windows XP Service Pack 3 21 | 4. I fixed a lot of spelling mistakes, but drastically changed the script so most likely added some as well :-) 22 | 23 | Notes taken directly from Corgano's script 24 | 25 | "This script provides a one-click Installation for easy gif viewing experience identical (literally!) 26 | to that of windows XP 27 | 28 | Terms of use: 29 | This script is free to use, distribute, modify, and what else have your fancies be as long as these 30 | three conditions are met 31 | 1: This header must remain intact with any mods or copies of this script 32 | 2: You may not sell or in any way make profit off of this script. It's free, for free use by 33 | anyone, anywhere. 34 | 3: This is by no means an official fix. It's just a workaround to make windows XP's photo viewer 35 | work on win 7. May work for win 8, may fuck up your computer. I'm not responsible for any loss of 36 | data or hair as result of this program 37 | 38 | What it does: 39 | This is based off of this idea - http://www.goofwear.com/windows/ 40 | However, there were many errors. All the addresses were static, and assumed that the system drive was 41 | 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 42 | files to windows\gif, which is cleaner IMO. Replaced the modified "shimgvw.dll" with the real file 43 | and wrote a simpler Installer 44 | 45 | 1.1 46 | Added an unInstall option 47 | Fixed spelling mistakes (derp) 48 | Added message confirming Install 49 | 50 | Enjoy" 51 | 52 | You will require AutoIT version 3x to run this as an uncompiled script. Please use the exe provided. 53 | 54 | #ce ---------------------------------------------------------------------------- 55 | $Title = "Windows 7 Fax & Scan Gif Viewer" 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | 66 | Opt("WinTitleMatchMode", 2) 67 | 68 | 69 | Func CreateSplash() 70 | EnvSet("path", EnvGet("path") & ";" & @ScriptDir) 71 | ;Include splash image in exe 72 | FileInstall("splash.jpg", @TempDir & "\splash.jpg", 1) 73 | 74 | ;Show splash 75 | $splash = GUICreate("Loading...", 430, 154, -1, -1, $WS_POPUPWINDOW) 76 | WinSetTrans($splash, "", 0) 77 | GUICtrlCreatePic(@TempDir & "\splash.jpg", -0, -0, 432, 155) 78 | GUISetState(@SW_SHOW, $splash) 79 | For $i = 0 To 255 Step 6 80 | WinSetTrans($splash, "", $i) 81 | Sleep(1) 82 | Next 83 | Sleep(3000) 84 | GUIDelete($splash) 85 | MsgBox(0, "", "Please select a location to install Windows 7 Gif Viewer") 86 | EndFunc ;==>CreateSplash 87 | 88 | 89 | Func SystemCheck() 90 | Local $path = FileSelectFolder("Please select install location", "") 91 | Local $command, $command1, $command2, $command3, $command4, $command5, $Msg1 92 | ;Detect if another installation exists 93 | If FileExists('C:\rundll32.exe') Then 94 | FileDelete('C:\rundll32.exe') 95 | EndIf 96 | If FileExists('C:\shimgvw.dll') Then 97 | FileDelete('C:\shimgvw.dll') 98 | EndIf 99 | If FileExists('C:\Windows\Gif\rundll32.exe') Then 100 | FileDelete('C:\Windows\Gif\rundll32.exe') 101 | EndIf 102 | If FileExists('C:\Windows\Gif\shimgvw.dll') Then 103 | FileDelete('C:\shimgvw.dll') 104 | EndIf 105 | If FileExists('C:\Windows\Gif') Then 106 | Run(@ComSpec & " /c rd C:\Windows\Gif", @SW_HIDE) 107 | EndIf 108 | If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path & "\Windows7GifViewer\rundll32.exe") = "WINXPSP3" Or FileExists($path & '\Windows7GifViewer') Then 109 | ;If one does exist ask to remove it 110 | $Msg1 = MsgBox(3, "Application already installed", "Setup has detected a previous installation" & @CRLF & "Would you like to uninstall the existing Windows 7 Gif Viewer first?") 111 | Select 112 | Case $Msg1 = 6 113 | ConsoleWrite("Remove" & @CRLF) 114 | RegDelete('HKEY_CLASSES_ROOT\.GIF') 115 | RegDelete('HKEY_CLASSES_ROOT\GIFImage.Document') 116 | RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path & "\Windows7GifViewer\rundll32.exe") 117 | FileDelete($path & "\Windows7GifViewer") 118 | DirRemove($path & "\Windows7GifViewer") 119 | ;neither of the above work so good ol dos seems to do the trick here 120 | $command = 'rd Windows7GifViewer ' & '>nul ' & '2>&1' 121 | Run(@ComSpec & " /c " & $command, $path, @SW_HIDE) 122 | $command1 = 'del /Q' & $path & '\Windows7GifViewer ' & '>nul ' & '2>&1' 123 | Run(@ComSpec & " /c " & $command, $path, @SW_HIDE) 124 | MsgBox(0, "Existing Installation Removed", "Please re-run the installer to install again") 125 | Case $Msg1 = 7 126 | Local $RegPath = ($path & "\Windows7GifViewer\shimgvw.dll,4") 127 | ; Double check there's no directory before prompting the user if they want to create one 128 | If Not FileExists($path & '\Windows7GifViewer') Then 129 | If MsgBox(36, "Location does not exist", "There is no directory for Windows 7 Gif Viewer? " & @CRLF & "Would you like to create one?") = 6 Then 130 | DirCreate($path & '\Windows7GifViewer') 131 | ConsoleWrite("Install" & @CRLF) 132 | ;Commence installation 133 | FileInstall("E:\Users\James\Dropbox\WinApps\Windows7GifViewer\rundll32.exe", $path & "\Windows7GifViewer\rundll32.exe", 1) 134 | FileInstall("E:\Users\James\Dropbox\WinApps\Windows7GifViewer\shimgvw.dll", $path & "\Windows7GifViewer\shimgvw.dll", 1) 135 | ;Note:- This works from an uncompiled script and the source files can be either in the script directory or referenced from somewhere else in this case and works 136 | ;For some reason again this likes to only register from the command line? 137 | $command4 = 'regsvr32 /s ' & $path & "\Windows7GifViewer\rundll32.exe" 138 | $command5 = 'regsvr32 /s ' & $path & "\Windows7GifViewer\shimgvw.dll" 139 | Run(@ComSpec & " /c " & $command4, $path & "\Windows7GifViewer", @SW_HIDE) 140 | Run(@ComSpec & " /c " & $command5, $path & "\Windows7GifViewer", @SW_HIDE) 141 | ;Here commence normal Writes to the registry....all is good from here on 142 | RegWrite('HKEY_CLASSES_ROOT\.GIF', '', 'REG_SZ', 'GIFImage.Document') 143 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'EditFlags', 'REG_DWORD', '65536') 144 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'FriendlyTypeName', 'REG_EXPAND_SZ', '@' & $path & '\Windows7GifViewer\shimgvw.dll,-306') 145 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'InstallTemp', 'REG_EXPAND_SZ', @ScriptDir) 146 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'ImageOptionFlags', 'REG_DWORD', '0') 147 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'BrowserFlags', 'REG_DWORD', '8') 148 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', '', 'REG_SZ', 'GIF Image') 149 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\DefaultIcon', '', 'REG_EXPAND_SZ', '@' & $path & '\Windows7GifViewer\shimgvw.dll,4') 150 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell', '', 'REG_SZ', '') 151 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open', '', 'REG_SZ', 'Windows 7 Gif Viewer') 152 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open', 'Icon', 'REG_SZ', $path & '\Windows7GifViewer\shimgvw.dll,1') 153 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\command', '', 'REG_EXPAND_SZ', $path & '\Windows7GifViewer' & '\rundll32.exe shimgvw.dll,ImageView_Fullscreen %1') 154 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\DropTarget', 'Clsid', 'REG_SZ', '{E84FDA7C-1D6A-45F6-B725-CB260C236066}') 155 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto\command', '', 'REG_SZ', $path & '\Windows7GifViewer' & '\rundll32.exe shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"') 156 | RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', $path & '\Windows7GifViewer' & '\rundll32.exe', 'REG_SZ', 'WINXPSP3') 157 | ;Corrected the key from HKLM to HKCU to make this work - This is why rundll32.exe was not actually being set to Windows SP3 mode 158 | RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', $path & '\Windows7GifViewer' & '\rundll32.exe', 'REG_SZ', 'WINXPSP3') 159 | MsgBox(0, "Installation Complete!", "To run double click or open any .Gif file. Run again to Uninstall") 160 | RunWait(@ComSpec & " /e:on /f:on /s /k ", "taskkill /f /IM explorer.exe >nul 2>&1", @SW_HIDE) 161 | EndIf 162 | EndIf 163 | Case $Msg1 = 2 164 | MsgBox(48 + 4096, "Installation Aborted!", "User cancelled installation", 5) 165 | ;This part will only work once the script is compiled 166 | If ProcessExists("Windows_7_Gif_Viewer.exe") Then 167 | OnAutoItExitRegister("Restart") 168 | Exit 169 | EndIf 170 | EndSelect 171 | Else 172 | ;Obviously here I was lazy and couldn't bothered to a re-arrange all my code with a nicer loop 173 | ;A good developer never re-uses large chunks of code twice! 174 | If Not FileExists($path & '\Windows7GifViewer') Then 175 | If MsgBox(36, "Location does not exist", "There is no directory for Windows 7 Gif Viewer? " & @CRLF & "Would you like to create one?") = 6 Then 176 | DirCreate($path & '\Windows7GifViewer') 177 | ConsoleWrite("Install" & @CRLF) 178 | ;Commence installation 179 | FileInstall("E:\Users\James\Dropbox\WinApps\Windows7GifViewer\rundll32.exe", $path & "\Windows7GifViewer\rundll32.exe", 1) 180 | FileInstall("E:\Users\James\Dropbox\WinApps\Windows7GifViewer\shimgvw.dll", $path & "\Windows7GifViewer\shimgvw.dll", 1) 181 | ;Note:- This works from an uncompiled script and the source files can be either in the script directory or referenced from somewhere else in this case and works 182 | ;For some reason again this likes to only register from the command line? 183 | $command2 = 'regsvr32 /s ' & $path & "\Windows7GifViewer\rundll32.exe" 184 | $command3 = 'regsvr32 /s ' & $path & "\Windows7GifViewer\shimgvw.dll" 185 | Run(@ComSpec & " /c " & $command2, $path & "\Windows7GifViewer", @SW_HIDE) 186 | Run(@ComSpec & " /c " & $command3, $path & "\Windows7GifViewer", @SW_HIDE) 187 | ;Here commence normal Writes to the registry....all is good from here on 188 | RegWrite('HKEY_CLASSES_ROOT\.GIF', '', 'REG_SZ', 'GIFImage.Document') 189 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'EditFlags', 'REG_DWORD', '65536') 190 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'FriendlyTypeName', 'REG_EXPAND_SZ', $path & "Windows7GifViewer" & '\shimgvw.dll,-306') 191 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'ImageOptionFlags', 'REG_DWORD', '0') 192 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', 'BrowserFlags', 'REG_DWORD', '8') 193 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document', '', 'REG_SZ', 'GIF Image') 194 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\DefaultIcon', '', 'REG_EXPAND_SZ', $path & "Windows7GifViewer" & '\shimgvw.dll,4') 195 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell', '', 'REG_SZ', '') 196 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open', 'MuiVerb', 'REG_SZ', 'shimgvw.dll,-550') 197 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\command', '', 'REG_EXPAND_SZ', $path & "\Windows7GifViewer" & '\rundll32.exe shimgvw.dll,ImageView_Fullscreen %1') 198 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\open\DropTarget', 'Clsid', 'REG_SZ', '{E84FDA7C-1D6A-45F6-B725-CB260C236066}') 199 | RegWrite('HKEY_CLASSES_ROOT\GIFImage.Document\shell\printto\command', '', 'REG_SZ', $path & "\Windows7GifViewer" & '\rundll32.exe shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"') 200 | RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path & "\Windows7GifViewer" & "\rundll32.exe", "REG_SZ", "WINXPSP3") 201 | ;Corrected the key from HKLM to HKCU to make this work - This is why rundll32.exe was not actually being set to Windows SP3 mode 202 | RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $path & "\Windows7GifViewer" & "\rundll32.exe", "REG_SZ", "WINXPSP3") 203 | MsgBox(1, "Installation Complete!", "To run double click or open any .Gif file. Run again to Uninstall") 204 | EndIf 205 | EndIf 206 | EndIf 207 | EndFunc ;==>SystemCheck 208 | 209 | Func Restart() 210 | Run(@ScriptDir & "\Windows_7_Gif_Viewer.exe") 211 | EndFunc ;==>Restart 212 | 213 | Func Cleanup() 214 | FileDelete(@TempDir & "\splash.jpg") 215 | EndFunc ;==>Cleanup 216 | 217 | Sleep(100) 218 | CreateSplash() 219 | SystemCheck() 220 | Cleanup() -------------------------------------------------------------------------------- /Windows7GifViewer.au3: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | #RequireAdmin 3 | #region ;**** Directives created by AutoIt3Wrapper_GUI **** 4 | #AutoIt3Wrapper_Icon=Setup.ico 5 | #AutoIt3Wrapper_Outfile=Windows7GifViewer.exe 6 | Global $Name = "Windows7GifViewer" ;the name of the programm is now stored in variable $Name, so if we want to change it, it's easy 7 | ;Global $Name = "WindowsPictureandFaxViewer" ;Posible alturnate name? Gif viewer implies Gifs only, and honestly, I like to change the origional files / naming as little as posible 8 | #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** 9 | 10 | #cs ---------------------------------------------------------------------------- 11 | 12 | AutoIt Version: 3.3.8.1 13 | Author: Jarmezrocks aka Digitalfacade82 jarmezrocks@gmail.com 14 | 15 | Script Function: 16 | This installer is based off the one written by Corgano, CorganoWade@gmail.com from sevenforums and autoIT forums 17 | 18 | Additions added by me: 19 | 1. Instead of forcing us to install anywhere let alone root of the system drive I would rather give people a choice. This makes the solution a bit more "polished" 20 | - Note as it was I was using Corgano's installer and then carrying with me an additional reg file to run afterwards to move the install away from the root of C:\ and correct the following: 21 | 22 | 2. I made some small adjustments to Registry writes to incorrect locations that were annoying for me to have to go and change after installing 23 | 3. Correctly added the rundll32.exe in compatability mode for Windows XP Service Pack 3 24 | 4. I fixed a lot of spelling mistakes, but drastically changed the script so most likely added some as well :-) 25 | 26 | Notes taken directly from Corgano's script 27 | 28 | "This script provides a one-click Installation for easy gif viewing experience identical (literally!) 29 | to that of windows XP 30 | 31 | Terms of use: 32 | This script is free to use, distribute, modify, and what else have your fancies be as long as these 33 | three conditions are met 34 | 1: This header must remain intact with any mods or copies of this script 35 | 2: You may not sell or in any way make profit off of this script. It's free, for free use by 36 | anyone, anywhere. 37 | 3: This is by no means an official fix. It's just a workaround to make windows XP's photo viewer 38 | work on win 7. May work for win 8, may fuck up your computer. I'm not responsible for any loss of 39 | data or hair as result of this program 40 | 41 | What it does: 42 | This is based off of this idea - http://www.goofwear.com/windows/ 43 | However, there were many errors. All the addresses were static, and assumed that the system drive was 44 | 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 45 | files to windows\gif, which is cleaner IMO. Replaced the modified "shimgvw.dll" with the real file 46 | and wrote a simpler Installer 47 | 48 | 1.1 49 | Added an unInstall option 50 | Fixed spelling mistakes (derp) 51 | Added message confirming Install 52 | 53 | Enjoy" 54 | 55 | You will require AutoIT version 3x to run this as an uncompiled script. Please use the exe provided. 56 | 57 | #ce ---------------------------------------------------------------------------- 58 | #include 59 | #Include 60 | #include 61 | #include 62 | #include 63 | #include 64 | #include 65 | #include 66 | #include 67 | 68 | OnAutoItExitRegister("Cleanup") 69 | Global $aTypes[8] = [ 7, "BMP", "JPEG", "JPG", "PNG", "ICO", "TIFF", "GIF" ];used by instal, maininstaller, and uninstal funcs so moved up here 70 | ;~ Global $Name = "Windows7GifViewer.exe" ;Declaired up top, can be declaired here too 71 | 72 | ;moved the main script up top 73 | ConsoleWrite("Hello"&@CRLF) 74 | MainInstaller() 75 | ConsoleWrite("Bye"&@CRLF) 76 | 77 | ;then have all the functions. It doesn't really matter, but most people have 78 | ; includes and global declaration at top, 79 | ; then main code, 80 | ; then functions underneith 81 | Func MainInstaller() 82 | Local $defaultpath = @ProgramFilesDir&"\"&$Name 83 | Local $cTypes[$aTypes[0]+1], $iCurTab, $iNextTab, $i, $Quick = False 84 | Local $hTab[5] 85 | Consolewrite("Started Main loop"&@CRLF) 86 | Consolewrite("Generating GUI..."&@CRLF) 87 | 88 | FileInstall('.\splash.jpg',@TempDir&'\splash.jpg') 89 | 90 | #Region ### START Koda GUI section ### Form= 91 | $GUI = GUICreate("Windows Picture and Fax Viewer for Win7", 426, 342, 192, 124) 92 | GUICtrlCreatePic(@TempDir & "\splash.jpg", 0, 0, 425, 155) 93 | $hTabs = GUICtrlCreateTab(0, 160, 425, 153) 94 | $hTab[0] = GUICtrlCreateTabItem("Welcome!") 95 | GUICtrlSetState(-1,$GUI_SHOW) 96 | GUICtrlCreateLabel( "Welcome to the Windows Picture and Fax Viewer installer for Win7 (and maybe 8)."&@CRLF& _ 97 | "This will install Windows Picture and Fax Viewer, the picture viewer that came stock with XP. "& _ 98 | "If you liked the way Windows Picture and Fax Viewer worked in WinXP, then you'll like this."&@CRLF&@CRLF& _ 99 | "Windows Picture and Fax Viewer.", 8, 186, 399, 78) 100 | 101 | $hTab[1] = GUICtrlCreateTabItem("Install Path") 102 | GUICtrlCreateLabel("Please select the directory to install Windows Picture and Fax Viewer:", 8, 192, 329, 17) 103 | $iPath = GUICtrlCreateInput($defaultpath, 8, 216, 335, 21) 104 | $bBrowse = GUICtrlCreateButton("Browse...", 344, 216, 72, 21) 105 | 106 | $hTab[2] = GUICtrlCreateTabItem("File Types") 107 | Consolewrite(" Loading types...") 108 | For $i = 1 to $aTypes[0] 109 | Consolewrite(" "&$aTypes[$i]) 110 | $cTypes[$i] = GUICtrlCreateCheckbox("."&$aTypes[$i], (144*Mod($i,3))-120+144, 192+(24*Floor(($i-1)/3)), 97, 17) 111 | if $aTypes[$i] = "GIF" Then GUICtrlSetState( $cTypes[$i], $GUI_CHECKED) 112 | Next 113 | Consolewrite(" Done!"&@CRLF) 114 | 115 | $hTab[3] = GUICtrlCreateTabItem("Instalation Progress") 116 | Global $Edit1 = GUICtrlCreateEdit("", 8, 184, 409, 121, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL,$WS_HSCROLL)) 117 | GUICtrlSetData(-1, "Started, Creating GUI..."&@CRLF) 118 | 119 | $hTab[4] = GUICtrlCreateTabItem("Status") 120 | 121 | GUICtrlCreateTabItem("") 122 | 123 | $bQuickInstall = GUICtrlCreateButton("Just install the damn thing", 78, 314, 184, 25) 124 | $bUninstall = GUICtrlCreateButton("Uninstall", 2, 314, 75, 25) 125 | $bNext = GUICtrlCreateButton("Next", 347, 314, 75, 25) 126 | $bPrev = GUICtrlCreateButton("Back", 271, 314, 75, 25) 127 | GUICtrlSetState($bPrev, $GUI_HIDE) 128 | GUISetState(@SW_SHOW) 129 | #EndRegion ### END Koda GUI section ### 130 | _Consolewrite("GUI Done! Starting Main Loop"&@CRLF) 131 | 132 | While 1 133 | $nMsg = GUIGetMsg() 134 | Switch $nMsg 135 | Case $GUI_EVENT_CLOSE 136 | FileDelete(@TempDir&"\splash.jpg") 137 | Exit 138 | 139 | Case $bNext 140 | $iCurTab = GUICtrlRead($hTabs) 141 | GUICtrlSetState($hTab[$iCurTab + 1], $GUI_SHOW) 142 | $nMsg = $hTabs 143 | 144 | Case $bPrev 145 | $iCurTab = GUICtrlRead($hTabs) 146 | GUICtrlSetState($hTab[$iCurTab - 1], $GUI_SHOW) 147 | $nMsg = $hTabs 148 | 149 | Case $bQuickInstall 150 | $Quick = True 151 | GUICtrlSetState($hTab[3], $GUI_SHOW) 152 | $nMsg = $hTabs 153 | 154 | EndSwitch 155 | 156 | If $nMsg = $hTabs Then 157 | $iCurTab = GUICtrlRead($hTabs) 158 | If $iCurTab <= 0 Then 159 | GUICtrlSetState($bPrev, $GUI_HIDE) 160 | GUICtrlSetState($bNext, $GUI_SHOW) 161 | ElseIf $iCurTab >= UBound($hTab)-1 Then 162 | GUICtrlSetState($bPrev, $GUI_SHOW) 163 | GUICtrlSetState($bNext, $GUI_HIDE) 164 | Else 165 | GUICtrlSetState($bPrev, $GUI_SHOW) 166 | GUICtrlSetState($bNext, $GUI_SHOW) 167 | EndIf 168 | 169 | ConsoleWrite("HI "&$iCurTab&@CRLF) 170 | Switch $iCurTab 171 | Case 3 172 | ;~ If $Quick = True or MsgBox(4, "Install", "Ready to start instalation?") = 6 Then 173 | $sTemp = "" 174 | For $i = 1 To $aTypes[0] 175 | If GUICtrlRead($cTypes[$i]) = $GUI_CHECKED Then $sTemp &= $aTypes[$i] & "|" 176 | Next 177 | $sTemp = StringTrimRight($sTemp,1) 178 | 179 | GUICtrlSetState($bNext, $GUI_DISABLE) 180 | GUICtrlSetState($bPrev, $GUI_DISABLE) 181 | GUICtrlSetState($bQuickInstall, $GUI_DISABLE) 182 | GUICtrlSetState($bUninstall, $GUI_DISABLE) 183 | ConsoleWrite("GIF_Install "&GUICtrlRead($iPath)&" "&$sTemp&@CRLF) 184 | $result = WPaFV_Install(GUICtrlRead($iPath),$sTemp, $Quick) 185 | sleep(2000) 186 | $Quick = False 187 | GUICtrlSetState($bNext, $GUI_ENABLE) 188 | GUICtrlSetState($bPrev, $GUI_ENABLE) 189 | GUICtrlSetState($bQuickInstall, $GUI_ENABLE) 190 | GUICtrlSetState($bUninstall, $GUI_ENABLE) 191 | 192 | If $result = 1 Then GUICtrlSetState($hTab[$iCurTab + 1], $GUI_SHOW) 193 | 194 | ;~ EndIf 195 | EndSwitch 196 | 197 | EndIf 198 | 199 | WEnd 200 | 201 | EndFunc 202 | 203 | 204 | Func WPaFV_Install($Path, $sTypes = 'GIF', $Quick = False) 205 | 206 | Local $aTypes = StringSplit($sTypes,'|') 207 | Local $iType, $Type 208 | _ConsoleWrite("Starting Install"&@CRLF) 209 | 210 | ConsoleWrite($sTypes&@CRLF) 211 | If not IsArray($aTypes) Then 212 | ConsoleWrite("ERROR -2: Type error!"&@CRLF) 213 | return -2 214 | EndIf 215 | 216 | 217 | If StringRight($Path, StringLen($Name)) = $Name Then $Path = StringReplace($Path, "\"&$Name, "") 218 | _ConsoleWrite("Path = "& $Path & "\"&$Name&@CRLF) 219 | 220 | 221 | ;Detect if another installation exists 222 | CleanOtherInstalls() 223 | 224 | _Consolewrite("Checking for old installs..."&@CRLF) 225 | ;If already installed (by registry check) 226 | If RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers", $Path & "\" & $Name & "\rundll32.exe") = "WINXPSP3" Or FileExists($Path & '\" & $Name & "') Then 227 | 228 | _Consolewrite(" Old installs found"&@CRLF) 229 | ;If we're doign a quick install don't ask questions just get it done 230 | If $Quick Then 231 | _Consolewrite(" Removing...") 232 | WPaFV_Uninstall($Path, "GIF") 233 | _Consolewrite(" Done"&@CRLF) 234 | 235 | Else ;Otherwise ask to remove 236 | 237 | _Consolewrite(" Asking user to remove old installs") 238 | Switch MsgBox(3, "Application already installed", "Setup has detected a previous installation" & @CRLF & "Would you like to uninstall the existing Windows 7 Gif Viewer first?") 239 | Case 6 ;they say yes 240 | _Consolewrite(" Removing...") 241 | WPaFV_Uninstall($Path, "GIF") 242 | _Consolewrite(" Done"&@CRLF) 243 | 244 | Case 2 ;they say no 245 | _Consolewrite("ERROR -1: Installation Cancled by User. Click the install button below to retry.") 246 | Return -1 247 | 248 | EndSwitch ;In this case, no and no response is the same thing so just ocntinue the script 249 | 250 | EndIf ;end quickinstall check 251 | EndIf ;end already installed check 252 | _Consolewrite("Check end"&@CRLF) 253 | 254 | _Consolewrite('Installing...' & @CRLF) 255 | ;Let's copy the system's rundll32.exe. Not only will this reduce file size 256 | ; but will prevent other malicious jerks from changing it with a bad exe, 257 | ; and will prevent "exe in an exe" flags from antiviri 258 | ; Flag 9 will overwrite (flag 1), AND make the folder if it does not exist! (flag 8) 259 | FileCopy(@WindowsDir & '\system32\rundll32.exe', $Path & '\' & $Name & '\rundll32.exe', 9) 260 | _Consolewrite(@error&' Copied "'&@WindowsDir & '\system32\rundll32.exe" to '& $Path & '\' & $Name & '\rundll32.exe'&@CRLF) 261 | 262 | ;Using ".\shimgvw.dll" is the same as @ScriptDir & "\shimgvw.dll", 263 | ; so it will use the dll that's in the source folder 264 | FileInstall('.\shimgvw.dll', $Path & '\' & $Name & '\shimgvw.dll', 1) 265 | _Consolewrite(@error&' Installed shimgvw.dll to ' & $Path & '\' & $Name & '\shimgvw.dll'&@CRLF) 266 | 267 | ;Note:- This works from an uncompiled script and the source files can be either in the script directory or referenced from somewhere else in this case and works 268 | ;For some reason again this likes to only register from the command line? 269 | Run(@ComSpec & ' /c regsvr32 /s ' & $Path & "\" & $Name & "\rundll32.exe", $Path & "\" & $Name, @SW_HIDE) 270 | _Consolewrite(@error&' ' & @ComSpec & ' /c regsvr32 /s ' & $Path & "\" & $Name & "\rundll32.exe" & @CRLF) 271 | Run(@ComSpec & ' /c regsvr32 /s ' & $Path & "\" & $Name & "\shimgvw.dll", $Path & "\" & $Name, @SW_HIDE) 272 | _Consolewrite(@error&' ' & @ComSpec & ' /c regsvr32 /s ' & $Path & "\" & $Name & "\shimgvw.dll" & @CRLF) 273 | 274 | for $iType = 1 to $aTypes[0] 275 | $Type = $aTypes[$iType] ;I like arrays. Can you tell? :D 276 | 277 | _Consolewrite(" Regestering type "&$Type&@CRLF) 278 | ;Here commence normal Writes to the registry....all is good from here on 279 | RegWrite('HKEY_CLASSES_ROOT\.'&$Type, '', 'REG_SZ', $Type&'Image.Document') 280 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\."&$Type&", '', 'REG_SZ', "&$Type&'Image.Document'&@CRLF) 281 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', 'EditFlags', 'REG_DWORD', '65536') 282 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, EditFlags, REG_DWORD, 65536"&@CRLF) 283 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', 'FriendlyTypeName', 'REG_EXPAND_SZ', '@' & $Path & '\' & $Name & '\shimgvw.dll,-306') 284 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, FriendlyTypeName, REG_EXPAND_SZ, @"& $Path & '\' & $Name & '\shimgvw.dll,-306'&@CRLF) 285 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', 'InstallTemp', 'REG_EXPAND_SZ', @ScriptDir) 286 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, InstallTemp, REG_EXPAND_SZ, "&@ScriptDir&@CRLF) 287 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', 'ImageOptionFlags', 'REG_DWORD', '0') 288 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, ImageOptionFlags, REG_DWORD, 0"&@CRLF) 289 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', 'BrowserFlags', 'REG_DWORD', '8') 290 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, BrowserFlags, REG_DWORD, 8"&@CRLF) 291 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document', '', 'REG_SZ', $Type&' Image') 292 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document, '', REG_SZ, "&$Type&' Image'&@CRLF) 293 | 294 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\DefaultIcon', '', 'REG_EXPAND_SZ', '@' & $Path & '\' & $Name & '\shimgvw.dll,4') 295 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\DefaultIcon', '', REG_EXPAND_SZ, @" & $Path & '\' & $Name & '\shimgvw.dll,4'&@CRLF) 296 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell', '', 'REG_SZ', '') 297 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell, '', REG_SZ, ''"&@CRLF) 298 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell\open', '', 'REG_SZ', $Name) 299 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell\open, '', REG_SZ, Windows 7 "&$Type&' Viewer'&@CRLF) 300 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell\open', 'Icon', 'REG_SZ', $Path & '\' & $Name & '\shimgvw.dll,1') 301 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell\open, Icon, REG_SZ, " & $Path & '\' & $Name & '\shimgvw.dll,1'&@CRLF) 302 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell\open\command', '', 'REG_EXPAND_SZ', $Path & '\' & $Name & '\rundll32.exe shimgvw.dll,ImageView_Fullscreen %1') 303 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell\open\command, '', 'REG_EXPAND_SZ', " & $Path & '\' & $Name & '\rundll32.exe shimgvw.dll,ImageView_Fullscreen %1'&@CRLF) 304 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell\open\DropTarget', 'Clsid', 'REG_SZ', '{E84FDA7C-1D6A-45F6-B725-CB260C236066}') 305 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell\open\DropTarget, Clsid, REG_SZ, {E84FDA7C-1D6A-45F6-B725-CB260C236066}"&@CRLF) 306 | RegWrite('HKEY_CLASSES_ROOT\'&$Type&'Image.Document\shell\printto\command', '', 'REG_SZ', $Path & '\' & $Name & '\rundll32.exe shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"') 307 | _Consolewrite(" "&@error&" Registering HKEY_CLASSES_ROOT\"&$Type&"Image.Document\shell\printto\command, '', 'REG_SZ', " & $Path & '\' & $Name & '\rundll32.exe shimgvw.dll,ImageView_PrintTo /pt "%1" "%2" "%3" "%4"'&@CRLF) 308 | _Consolewrite(@CRLF) 309 | 310 | Next 311 | 312 | _Consolewrite(" Setting Compatibility Mode..."&@CRLF) 313 | RegWrite('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', $Path & '\' & $Name & '\rundll32.exe', 'REG_SZ', 'WINXPSP3') 314 | ;Corrected the key from HKLM to HKCU to make this work - This is why rundll32.exe was not actually being set to Windows SP3 mode 315 | RegWrite('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', $Path & '\' & $Name & '\rundll32.exe', 'REG_SZ', 'WINXPSP3') 316 | 317 | RunWait(@ComSpec & " /e:on /f:on /s /k ", "taskkill /f /IM explorer.exe >nul 2>&1", @SW_HIDE) 318 | 319 | _Consolewrite("Installation completed successfully!"&@CRLF&"Open an image and see if it worked."&@CRLF&"To reinstall, hit back then next or click the download button below"&@CRLF) 320 | return 1 321 | EndFunc 322 | 323 | Func WPaFV_Uninstall($Path, $sTypes = 'ALL') 324 | If $sTypes <> "ALL" Then Local $aTypes = StringSplit($sTypes,'|') 325 | Local $iType, $Type 326 | _Consolewrite('Removeing...' & @CRLF) 327 | for $iType = 1 to $aTypes[0] 328 | $Type = $aTypes[$iType] ;makes it simpler on our brains for the rest of it 329 | _Consolewrite(' '&$Type&@CRLF) 330 | RegDelete('HKEY_CLASSES_ROOT\.' & $Type) 331 | _Consolewrite(@error & ' HKEY_CLASSES_ROOT\.' & $Type &@CRLF) 332 | 333 | RegDelete('HKEY_CLASSES_ROOT\' & $Type & 'Image.Document') 334 | _Consolewrite(@error & ' HKEY_CLASSES_ROOT\' & $Type & 'Image.Document' &@CRLF) 335 | 336 | RegDelete('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers', $Path & '\' & $Name & '\rundll32.exe') 337 | _Consolewrite(@error & ' HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers ' & $Path & '\' & $Name & '\rundll32.exe' &@CRLF) 338 | 339 | Next 340 | FileSetAttrib($Path, "-RS", 1) ;should work, will test. Filedelete can't delete files of certin attibutes (Probably as a security feature). We'll use dos if we have to 341 | FileDelete($Path & "\" & $Name) 342 | DirRemove($Path & "\" & $Name) 343 | ;neither of the above work so good ol dos seems to do the trick here 344 | ;~ Run(@ComSpec & ' /c rd ' & $Name & ' >nul 2>&1', $Path, @SW_HIDE) ;you don't need to specify a variable for the command 345 | ;~ Run(@ComSpec & ' /c del /Q' & $Path & '\' & $Name & ' >nul 2>&1', $Path, @SW_HIDE) ;and you could have reused $command instead of making a $command1, $command2, etc 346 | EndFunc 347 | 348 | Func _Consolewrite($s) 349 | Consolewrite($s); holder for proper logging 350 | GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $s) 351 | local $iEnd = StringLen(GUICtrlRead($Edit1)) 352 | _GUICtrlEdit_SetSel($Edit1, $iEnd, $iEnd) 353 | _GUICtrlEdit_Scroll($Edit1, $SB_SCROLLCARET) 354 | EndFunc 355 | 356 | Func CleanOtherInstalls() 357 | If FileExists('C:\rundll32.exe') Then 358 | FileDelete('C:\rundll32.exe') 359 | EndIf 360 | If FileExists('C:\shimgvw.dll') Then 361 | FileDelete('C:\shimgvw.dll') 362 | EndIf 363 | If FileExists('C:\Windows\Gif\rundll32.exe') Then 364 | FileDelete('C:\Windows\Gif\rundll32.exe') 365 | EndIf 366 | If FileExists('C:\Windows\Gif\shimgvw.dll') Then 367 | FileDelete('C:\shimgvw.dll') 368 | EndIf 369 | If FileExists('C:\Windows\Gif') Then 370 | Run(@ComSpec & " /c rd C:\Windows\Gif", @SW_HIDE) 371 | EndIf 372 | EndFunc 373 | 374 | Func Cleanup() 375 | FileDelete(@TempDir & "\splash.jpg") 376 | EndFunc ;==>Cleanup 377 | --------------------------------------------------------------------------------