Make Windows Photo Viewer the default image viewer on Windows 10

Windows 10 Creator update replaced (read: forced users to use) the Microsoft Photos app with Microsoft’s new Paint 3D. I didn’t like Microsoft Photos app, and I really dislike Paint 3D.

I found an article on Howto Geek and it provides a downloadable Registry tweak to actually bring back the older Windows Photo Viewer that most of us are familiar with from Windows 7.

Note: If you do not want the older Windows Photo Viewer and just prefer the Microsoft Photos app, you can install that app from the Microsoft Store.

I have also saved the download and have made it available from this server as well.

Forgotten Scripts

This content is 2 years old. Technology changes with time. Keep that in mind as you read this article.

Came across a script I wrote some time ago. Sitting there in my user directory was patch.cmd. As I find my scripts, I’m putting them in Git for historical purposes… and for a good laugh.

What in the actual fuck are you, patch.cmd? –Rich

One thing I learned;  document the damn things.  I had no idea what this was, but I knew it was mine because of some of the commentary in the batch script.

Anyway, this script was used to patch atmfd.dll (see: MS15-078 Bulletin).

@echo off

if NOT %~n0==patch IF NOT %~n0==unpatch goto FAILINIT

reg Query HKLMHardwareDescriptionSystemCentralProcessor | find /i x86 > NUL && set ARCH=32BIT || set ARCH=64BIT

for /f tokens=2* %%a in ('REG QUERY HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion /v CurrentVersion') do set WINV=%%~b

REM Operating system              Version number
REM ----------------------------  --------------
REM Windows 10 Tech.Preview       10.0
REM Windows Server Techn.Preview  10.0
REM Windows 8.1                    6.3
REM Windows Server 2012 R2         6.3
REM Windows 8                      6.2
REM Windows Server 2012            6.2
REM Windows 7                      6.1
REM Windows Server 2008 R2         6.1
REM Windows Server 2008            6.0
REM Windows Vista                  6.0
REM Windows Server 2003 R2         5.2
REM Windows Server 2003            5.2
REM Windows XP 64-Bit Edition      5.2
REM Windows XP                     5.1
REM Windows 2000                   5.0


REM check to see if goto label is there.  if it's not, then we're not on a supported
REM system or Rich is a dork.
findstr /r /i /c:^:%~n0_%WINV%_%ARCH% %0>nul
if errorlevel 1 (
echo.
echo Looks like this system is not supported.  %ARCH% - Windows - %WINV%
goto EOF
)


goto %~n0_%WINV%_%ARCH%

REM catchall - shouldn't get here.
goto EOF

pause

:patch_6.0_32BIT
goto patch_1_32BIT

:patch_6.0_64BIT
goto patch_1_64BIT

:patch_6.1_32BIT
goto patch_1_32BIT

:patch_6.1_64BIT
goto patch_1_64BIT

:patch_6.2_32BIT
goto patch_2_32BIT

:patch_6.2_64BIT
goto patch_2_64BIT

:patch_6.3_32BIT
goto patch_2_32BIT

:patch_6.3_64BIT
goto patch_2_64BIT

:patch_10.0_32BIT
goto patch_2_32BIT

:patch_10.0_64BIT
goto patch_2_64BIT

REM unpatch routines

:unpatch_6.0_32BIT
goto unpatch_1_32BIT

:unpatch_6.0_64BIT
goto unpatch_1_64BIT

:unpatch_6.1_32BIT
goto unpatch_1_32BIT

:unpatch_6.1_64BIT
goto unpatch_1_64BIT

:unpatch_6.2_32BIT
goto unpatch_2_32BIT

:unpatch_6.2_64BIT
goto unpatch_2_64BIT

:unpatch_6.3_32BIT
goto unpatch_2_32BIT

:unpatch_6.3_64BIT
goto unpatch_2_64BIT

:unpatch_10.0_32BIT
goto unpatch_2_32BIT

:unpatch_10.0_64BIT
goto unpatch_2_64BIT



:patch_1_32BIT
cd %windir%system32
takeown.exe /f atmfd.dll
icacls.exe atmfd.dll /save atmfd.dll.acl
icacls.exe atmfd.dll /grant Administrators:(F)
rename atmfd.dll x-atmfd.dll
echo.
echo Done patching Windows %WINV% (%ARCH%)
echo.
goto EOF

:patch_1_64BIT
cd %windir%system32
takeown.exe /f atmfd.dll
icacls.exe atmfd.dll /save atmfd.dll.acl
icacls.exe atmfd.dll /grant Administrators:(F)
rename atmfd.dll x-atmfd.dll
cd %windir%syswow64
takeown.exe /f atmfd.dll
icacls.exe atmfd.dll /save atmfd.dll.acl
icacls.exe atmfd.dll /grant Administrators:(F)
rename atmfd.dll x-atmfd.dll
echo.
echo Done patching Windows %WINV% (%ARCH%)
echo.
goto EOF

:patch_2_32BIT
REM I'm not using the registry modification - I planned to, but backed out.  I'll
REM stick to just renaming the file for now.
goto patch_1_32BIT

:patch_2_64BIT
REM I'm not using the registry modification - I planned to, but backed out.  I'll
REM stick to just renaming the file for now.
goto patch_1_64BIT

REM unpatch routines

:unpatch_1_32BIT
cd %windir%system32
rename x-atmfd.dll atmfd.dll
icacls.exe atmfd.dll /setowner NT SERVICETrustedInstaller
icacls.exe . /restore atmfd.dll.acl
echo.
echo Done unpatching Windows %WINV% (%ARCH%)
echo.
goto EOF

:unpatch_1_64BIT
cd %windir%system32
rename x-atmfd.dll atmfd.dll
icacls.exe atmfd.dll /setowner NT SERVICETrustedInstaller
icacls.exe . /restore atmfd.dll.acl
cd %windir%syswow64
rename x-atmfd.dll atmfd.dll
icacls.exe atmfd.dll /setowner NT SERVICETrustedInstaller
icacls.exe . /restore atmfd.dll.acl
echo.
echo Done unpatching Windows %WINV% (%ARCH%)
echo.
goto EOF

:unpatch_2_32BIT
REM I'm not using the registry modification - I planned to, but backed out.  I'll
REM stick to just renaming the file for now.
goto unpatch_1_32BIT

:unpatch_2_64BIT
REM I'm not using the registry modification - I planned to, but backed out.  I'll
REM stick to just renaming the file for now.
goto unpatch_1_64BIT

:FAILINIT
echo Script needs to be named patch or unpatch.

:EOF

vCenter Converter unable to see disks on source

This content is 4 years old. Technology changes with time. Keep that in mind as you read this article.

I’m working on converting a physical 2008 R2 server to a virtual machine for ESX 4.1.  I installed vCenter Converter Standalone 4.3 on this machine and ran through the wizard.  When I got to the disk configuration, nothing was listed.

2015-01-27_113507

Some research pointed me to this VMware KB article indicating to check the logs which are located in C:ProgramDataVMwareVMware vCenter Converter Standalonelogs.

2015-01-27_113533

Upon reviewing the logs, I see the following error:

[#1] [2015-01-27 11:31:16.775 04316 warning 'App'] Failed to get info for \.PhysicalDrive0: error Read \.PhysicalDrive0 disk layout: Incorrect function (1)

Researching this error, I arrive at another VMware KB article which indicates GPT partition support was not available in vCenter Converter editions lower than 5.1 (I had installed 4.3).

2015-01-27_113540

 

Get Last Windows Update Installation Date

This content is 5 years old. Technology changes with time. Keep that in mind as you read this article.

This command will give you the last date and time Windows updates were installed on a computer.

reg query HKLMSoftwareMicrosoftwindowscurrentversionwindowsupdateauto update
esultsinstall /v LastSuccessTime

Use Runas in a Batch Script

This content is 5 years old. Technology changes with time. Keep that in mind as you read this article.

Runas does not accept a password on the command line, nor can you pipe it to it on STDIN. It requires keyboard input.

However, to make life easier, there’s a Visual Basic Script available that will allow you to use Runas from the command line and supply a password to it. It is created by Jefferey Hicks (MS MVP Powershell) and is called VBRunas.

cscript //nologo runas.vbs <Username> <Password> <Command>

You can download the script from my server, or from Jeffery’s website.