Microsoft.Win32.RegistryKey rk=Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"
SOFTWARE/Classes/MIME/Database/Content Type");
foreach(string s in rk.GetSubKeyNames())
{
textBox1.Text+=s+"/r/n";
}
最后在我自己机上输出:
application/cdf
application/fractals
application/futuresplash
application/hta
application/mac-binhex40
application/msaccess
application/msword
application/pdf
application/pkcs10
application/pkcs7-mime
application/pkcs7-signature
application/pkix-cert
application/pkix-crl
application/postscript
application/set-payment-initiation
application/set-registration-initiation
application/vnd.adobe.xfdf
application/vnd.fdf
application/vnd.ms-excel
application/vnd.ms-pki.certstore
application/vnd.ms-pki.pko
application/vnd.ms-pki.seccat
application/vnd.ms-pki.stl
application/vnd.ms-powerpoint
application/vnd.rmf
application/vnd.visio
application/x-cdf
application/x-complus
application/x-compress
application/x-compressed
application/x-gzip
application/x-internet-signup
application/x-iphone
application/x-latex
application/x-mix-transfer
application/x-mplayer2
application/x-ms-wmd
application/x-ms-wms
application/x-ms-wmz
application/x-msexcel
application/x-mspowerpoint
application/x-pkcs12
application/x-pkcs7-certificates
application/x-pkcs7-certreqresp
application/x-shockwave-flash
application/x-stuffit
application/x-tar
application/x-troff-man
application/x-x509-ca-cert
application/x-zip-compressed
application/xml
audio/aiff
audio/basic
audio/mid
audio/midi
audio/mp3
audio/mpeg
audio/mpegurl
audio/mpg
audio/wav
audio/x-aiff
audio/x-background
audio/x-mid
audio/x-midi
audio/x-mp3
audio/x-mpeg
audio/x-mpegurl
audio/x-mpg
audio/x-ms-wax
audio/x-ms-wma
audio/x-wav
image/bmp
image/gif
image/jpeg
image/pjpeg
image/png
image/svg
image/svg+xml
image/svg-xml
image/tiff
image/tiff2
image/x-icon
image/x-jg
image/x-png
image/x-wmf
image/x-xbitmap
image/xbm
image/xiff
image/xiff2
message/rfc822
midi/mid
text/css
text/h323
text/html
text/iuls
text/plain
text/scriptlet
text/webviewhtml
text/x-component
text/x-scriptlet
text/x-vcard
text/xml
video/avi
video/mpeg
video/mpg
video/msvideo
video/quicktime
video/x-ivf
video/x-mpeg
video/x-mpeg2a
video/x-ms-asf
video/x-ms-asf-plugin
video/x-ms-wm
video/x-ms-wmp
video/x-ms-wmv
video/x-ms-wmx
video/x-ms-wvx
video/x-msvideo
foreach(string s in rk.GetSubKeyNames())
{
textBox1.Text+=s+"/r/n";
}
最后在我自己机上输出:
application/cdf
application/fractals
application/futuresplash
application/hta
application/mac-binhex40
application/msaccess
application/msword
application/pdf
application/pkcs10
application/pkcs7-mime
application/pkcs7-signature
application/pkix-cert
application/pkix-crl
application/postscript
application/set-payment-initiation
application/set-registration-initiation
application/vnd.adobe.xfdf
application/vnd.fdf
application/vnd.ms-excel
application/vnd.ms-pki.certstore
application/vnd.ms-pki.pko
application/vnd.ms-pki.seccat
application/vnd.ms-pki.stl
application/vnd.ms-powerpoint
application/vnd.rmf
application/vnd.visio
application/x-cdf
application/x-complus
application/x-compress
application/x-compressed
application/x-gzip
application/x-internet-signup
application/x-iphone
application/x-latex
application/x-mix-transfer
application/x-mplayer2
application/x-ms-wmd
application/x-ms-wms
application/x-ms-wmz
application/x-msexcel
application/x-mspowerpoint
application/x-pkcs12
application/x-pkcs7-certificates
application/x-pkcs7-certreqresp
application/x-shockwave-flash
application/x-stuffit
application/x-tar
application/x-troff-man
application/x-x509-ca-cert
application/x-zip-compressed
application/xml
audio/aiff
audio/basic
audio/mid
audio/midi
audio/mp3
audio/mpeg
audio/mpegurl
audio/mpg
audio/wav
audio/x-aiff
audio/x-background
audio/x-mid
audio/x-midi
audio/x-mp3
audio/x-mpeg
audio/x-mpegurl
audio/x-mpg
audio/x-ms-wax
audio/x-ms-wma
audio/x-wav
image/bmp
image/gif
image/jpeg
image/pjpeg
image/png
image/svg
image/svg+xml
image/svg-xml
image/tiff
image/tiff2
image/x-icon
image/x-jg
image/x-png
image/x-wmf
image/x-xbitmap
image/xbm
image/xiff
image/xiff2
message/rfc822
midi/mid
text/css
text/h323
text/html
text/iuls
text/plain
text/scriptlet
text/webviewhtml
text/x-component
text/x-scriptlet
text/x-vcard
text/xml
video/avi
video/mpeg
video/mpg
video/msvideo
video/quicktime
video/x-ivf
video/x-mpeg
video/x-mpeg2a
video/x-ms-asf
video/x-ms-asf-plugin
video/x-ms-wm
video/x-ms-wmp
video/x-ms-wmv
video/x-ms-wmx
video/x-ms-wvx
video/x-msvideo