' Zum Entfernen der Anwendung und der Registry-Einträge einfach
' Start -> Ausführen -> cscript register.vbs /u
On Error Resume Next
Dim iAction
If WScript.Arguments.Count = 0 Then
iAction = 0
Else
If WScript.Arguments(0) = "/u" Then
iAction = 1
Else
iAction = 0
End If
End If
' get Windows folder
Const WindowsFolder = 0
Set fso = CreateObject("Scripting.FileSystemObject")
Dim strWinDir
strWinDir = fso.GetSpecialFolder(WindowsFolder)
' create Shell object
Set Sh = CreateObject("WScript.Shell")
Dim strJPEGKey
strJPEGKey = Sh.RegRead("
HKCR\.jpg\")
If iAction = 1 Then
' delete EXE
fso.DeleteFile(strWinDir & "\ExifReader.exe")
' remove Registry entries
If strJPEGKey <> "" Then
Sh.RegDelete("
HKCR\" & strJPEGKey & "\shell\ExifReaderExt\")
End If
Else
' copy EXE
fso.CopyFile "ExifReader.exe", strWinDir & "\"
' register EXE for ".jpg"
If strJPEGKey = "" Then
strJPEGKey = "ExifJPEGFile"
Sh.RegWrite "
HKCR\.jpg\", strJPEGKey
End If
Sh.RegWrite "
HKCR\" & strJPEGKey & "\shell\ExifReaderExt\", _
"JPEG-Exif Informationen"
Sh.RegWrite "
HKCR\" & strJPEGKey & "\shell\ExifReaderExt\command\", _
CHR(34) & strWinDir & "\ExifReader.exe" & CHR(34) & " " & _
CHR(34) & "%1" & CHR(34)
End If