wrote :: 2006.01.17
HKEY_CLASSES_ROOT\MIME\Database\Content Type\image/jpeg\Extension
Private Sub Command1_Click()
Dim WshShell, Key As String
Key = "HKCR\MIME\Database\Content Type\image/jpeg\Extension"
Set WshShell = CreateObject("WScript.Shell")
Select Case WshShell.RegRead(Key)
Case Is = ".jpeg"
If MsgBox("jpegが登録されています。jpgにしますか?", vbYesNo + vbQuestion) = vbYes Then
WshShell.RegWrite Key, ".jpg", "REG_SZ"
End If
Case Is = ".jpg"
MsgBox "jpgが登録されています", vbExclamation
Case Else
MsgBox "予期せぬ値です", vbExclamation
End Select
Set WshShell = Nothing
End Sub