SetRegistry Here again with Windows 7
Posted: Tue Oct 02, 2012 6:12 pm
Hi all.
I'm trying to build my own installer but I'm having problems with file association in Windows 7, while it runs fine on Windows XP.
This is the code I'm using, found on various website:
This is the property of the file
This is the RegEdit listing (seems OK)
Still, when I double click on the document ("Paoli.tcl") it does not launch Tcal.exe, and there is no sign of the doc icon.
The app Tcal.exe should be Ok since, if installed with Inno, it works fine and i have the icon.
More...if on Windows I change the default app of the paoli.tcl to "NotePad", when I run the script above it does not revert to Tcal.exe, even if the quesryregistry shows correct keys...
Any clue ? Am I missing something ? Thanks
Trevix
Livecode 5.5.2, Windows 7 professional sp1 running under VMware
I'm trying to build my own installer but I'm having problems with file association in Windows 7, while it runs fine on Windows XP.
This is the code I'm using, found on various website:
Code: Select all
put "Tcal into TheAppName
put "C:\Program Files\AA_MyApp\Tcal.exe" tAppPath
put ".tcl" into TheExension
if queryregistry("HKEY_CLASSES_ROOT\.tcl\") <> "Tcal" then
get setRegistry("HKEY_CLASSES_ROOT\.tcl\","Tcal")
end if
if queryregistry("HKEY_CLASSES_ROOT\Tcal\") <>"Tcal document" then
get setRegistry("HKEY_CLASSES_ROOT\Tcal\","Tcal document")
end if
put tAppPath & ",1" into tVar
if queryregistry("HKEY_CLASSES_ROOT\Tcal\DefaultIcon\") <> tVar then
get setRegistry("HKEY_CLASSES_ROOT\Tcal\DefaultIcon\",tVar)
end if
put tAppPath & " %1" into tVar
if queryregistry("HKEY_CLASSES_ROOT\Tcal\shell\open\command\") <> tVar then
get setRegistry("HKEY_CLASSES_ROOT\Tcal\shell\open\command\",tVar)
end if
The app Tcal.exe should be Ok since, if installed with Inno, it works fine and i have the icon.
More...if on Windows I change the default app of the paoli.tcl to "NotePad", when I run the script above it does not revert to Tcal.exe, even if the quesryregistry shows correct keys...
Any clue ? Am I missing something ? Thanks
Trevix
Livecode 5.5.2, Windows 7 professional sp1 running under VMware