For a local install on Windows, couldn't you put the path to the Filemaker database in the PATH environment variable during the installation (of the database)? Then in a shortcut you would only need the shortcut to be something like:
I tested this on my Windows Vista 32-bit workstation and it works OK.
if the database is on another networked location then you might need something a different command line (see the Filemaker knowledge base)
The database is 'shared' from another network location (FM Network sharing turned on). And I am not present for installation of my software (downloaded and installed from the internet). Since the local network IP addresses vary with each installation I can't pre-program the file reference for the remote access (rather I don't want to have to 'customize' and maintain the installation for each customer).
For script steps like 'import records', you can define a file reference in a 'set variable' script step and then use that reference in the 'import' step.
I'd like to be able to do the equivalent for the 'open file' script step, but don't think that's supported in FMP12. Is there any other way to achieve the same result?
Variables cannot be used with Open File and the type of file paths we put in $Path variables are direct references to files--not a method you want to use to open files hosted over the network anyway.
I could be wrong as I haven't done this myself, but I think Steve Tilbury is suggesting that you configure a software installer to install the needed short cut as I think some of them can be programmed to do this kind of thing automatically.
That's what I thought.
If I understand Steve's suggestion, the shortcut would directly open the shared file - and not open it over the FM File Sharing Network. I remember reading in the knowledge database that this is not recommended since it could corrupt the files opened on the host - (notes in http://help.filemaker.com/app/answers/detail/a_id/9827 ). If not, I need to better understand Steve's suggestion.
My installer currently installs an FMP file with a shortcut on the desktop to it that simply executes a File Open script step. The user has to be trained to find their database by clicking the 'Remote' button, selecingt the 'local host' and double clicking the only displayed file (I doubt that they would have other FMP shared files to choose from given the computer savvy - or lack of - of most of my users). Not that much to expect, but they don't want to be 'bothered' in getting to their database.
If I know the IP parameters for my customer's local network, I could 'specify' the file in the script and then when they click on the shortcut the remote file would open automatically. That's what they want - touch and go. It's unrealistic to give them instructions how to modify the script themselves to 'specify' the file, and I don't really want to maintain separate versions of the launch file (and also separate installers) for each customer. I guess either I'm lazy or just stubborn,
Still hoping for a miracle solution! It would be great if they only had to 'find' their database once and the script would then know where to look for it from then on.
You might be able to write a script in VBScript or Powershell to discover the IP address and then write the shortcut to the desktop.
That sounds like it could work. I'll just have to find somebody with those skills to write the script!
Thanks for sticking with me on this!
After further reflection, it still sounds like the remote file will be opened directly - outside the FM Network. From what I've read, that creates risk to the integrity of the database - especially if the file is already open on the 'host'.
Am I missing something?
I have tried to accomplish the same, but have discoverd "touch and go" is less practical that you might think.
INTERNET: External IP addresses must be FIXED. Extrernal Hacking Potential is made easier. What if there or more than one IP?
INTRANET: Local IP addresses must be FIIXED and may include both WiFi and Ethernet ports. Which one does the USER have? What if the USER switches from time to time.
The Favorite host name would have to be Defaulted to the Local IP address.
Local Admin would have to Set Up everytime there is a Router Change.