I have a short python script that is set as my default browser in the registry. It will choose to launch IE or Firefox based on the URL (Some work sites only function in IE). In the past, I just used a full path to the python installation to launch it, but this recently broke due to a change in the python install location (it is now bundled with our project files, so it may change more frequently). The path should be updated when it moves, so simply depending on the current environment to find python should be sufficient.
This is the old registry command entry:
@="\"C:\\Python26\\python.exe\" \"C:\\browser_chooser.pyw\" \"%1\""
Here's the best working option I have come up with so far:
@="\"C:\\Windows\\System32\\cmd.exe\" \"/c\" \"C:\\browser_chooser.pyw\" \"%1\""
However, this briefly pops up the command window when opening a link. I'd like to avoid that.
Without rewriting my script in another language and compiling it into an executable I can reference directly, is there a good way to get this to execute without knowing the path?