1 of 1 people found this helpful
The default browser is stored in the registry:
In tightly controlled environments this may be something that is set on the machine level instead of on the user level though so there probably is another in the HKLM hive for this.
So you'll need OS-level scripting or a plugin that can read from the registry to find this out.
Thank you for the registry key info.
OS level scripting reading from the registry at the user level sounds good as intended use will be per user on a personal machine. So I’m not as concerned about ‘…tightly controlled environments’ beyond the permissions configured on a standalone machine.
1st Question/idea: Is it possible/realistic to read the registry ‘HKEY_CLASSES_ROOT\http\shell\open\command’ using a ‘simple’ VB Script (?) then maybe:
1. Export the VB Script from Filemaker to a temp folder
2. Use Filemakers ‘send event’ to run it from cmd.exe with wscript.exe
3. Have the VB Script somehow output the result to a text file in the temp folder
4. Import the result into Filemaker. And then delete the temporary files
Steps 1, 2 and 4, I’m confident I can do. I’ve little/no knowledge of VB Script – so found a few VB Scripts today on the web that do read the registry, but all were more than I needed and feel a high risk to edit.
2nd Question/Idea: A lesser alternative perhaps is using Filemakers native file path Script steps; doing a folder search for all common browser.exc files; and presenting them for the user to select their default browser …even as I type this sounds more like a bad idea!?
Ok enough from me! Any feedback of good VB Script resources or ideas on another OS scripting approach recommended would be most helpful?
PS. Wim, Circa 2003 you posted a Filemaker.fp? of useful VB Scripts, not sure if it covered what I’m trying to do (?) I likely still have it on a hard drive somewhere.
I don't have a windows machine close by. The basics were probably covered in that VBscript inventory file.
This link shows the basics, you still need to write the result out to a file though: http://stackoverflow.com/questions/1233651/how-to-check-for-registry-value-using-vbscript
If all the machines are up to date you may want to do this in PowerShell instead, I think one could do it that way with one (long) command line which would make the deployment easier (no VBscript to export and clean up, just fire off the powershell command through a Send Event)
Cheers Wim for some great pointers; stackoverflow.com looks like a reliable resource and I shall now begin to pull info’ together and test the idea.
PowerShell sounds like a good option over VBscript “If all the machines are up to date…”! My understanding is Windows XP SP3 will not install if PowerShell is present and that Microsoft Windows update does not reinstall PowerShell by default – offering it only as an ‘Optional Update’. For that reason alone I shall begin with VBscript - assuming VBscript will work on any Windows machine of configuration unknown (?)
Another approach maybe! (?) Microsoft OneNote’s ‘side note’ ‘Dock to Desktop’ feature is invoked as a locked application window; and any current of subsequent application windows are forced to maximise restricted alongside to the left. If it were possible to achieve similar behaviour in the Filemaker Application Window – the same result could be achieved with an Open URL script step. I'd welcome any thoughts you may have on this theory?
Thank you for all your help; I’m excited about the possibilities discussed and the valuable links/ resources you’ve posted - Steve