Adding file type association using vbScriptvb


fext = "fcz"
prgid = "FCZ File"
des = "FCZ File"
extanm = "c:\Program files\TestApps\AppStart.exe"
Set o = CreateObject("wscript.shell")
o.regwrite "HKCR\." & fext & "\" , prgid , "REG_SZ"
o.regwrite "HKCR\" & prgid & "\" , des , "REG_SZ"
o.regwrite "HKCR\" & prgid & "\DefaultIcon\", extico, "REG_SZ"
o.regwrite "HKCR\" & prgid & "\Shell\","Open"
o.regwrite "HKCR\" & prgid & "\Shell\Open\Command\", extanm & " ""%1""", "REG_SZ"
Advertisements

2 thoughts on “Adding file type association using vbScriptvb

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s