I'll have to look at my other Vista machines and see if they have open as a default.
Perhaps a Photo program I downloaded changed the settings.
(Or I have read that the setting may depend on your default Internet Browser)
In Googleing around I see where others are having similar problems with Shell Execute in Vista.
I need a solution which will work for lots of users everywhere, with lots of different Windows settings.
What I did was to create a function to call UI.openURL, and then if it fails use ShellExecute with the NULL verb. This seems to work.
(I'm not sure why I call openURL first - just to be friendly to the SketchUp Ruby API I guess)
def launch_file(sfile)
trace("Launch; %s", sfile)
# Try SketchUp call first
if (UI.openURL(sfile))
return
end#if
# try shell_execute if openURL fails
shell_execute(sfile)
require 'Win32API'
shell = Win32API.new("shell32","ShellExecute", ['L','P','P','P','P','L'], 'L' )
#shell.call(handle, verb, file, params, folder, showCmd)
iret = shell.call(0, 0, sfile, 0, 0, 1)
if (iret == 42)
return true
end#if
do_error("Cannot Open file; '%s' - return value; %s", sfile, iret)
return(false)
end#def