Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7624 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have seen others ask this question, but havent seen an answer to the exact thing I need.

Little background. Have a FMPro Unlimited workstation that hosts files from a separate FM Server, publishing it to HTML using IWP. These files are password protected with the same full-access password. Got an idea from this list to create a new file (Startup.fp5) on the FMPU workstation with a startup script that opens the remote files. I set the same full-access password on this new Startup.fp5 file and the script works great. My next step is to get the opening of this Startup.fp5 file scripted so that I can run it remotely. If it helps, pretend I need to open this password protected file using Scheduled Tasks.

So...How do I script the opening of the Startup.fp5 file which has a password. I am running it on Windows 2000. If it were a Mac, I could use this applescript:

tell application "FileMaker"

open "Startup.fp5" with "PASSWORD"

end tell

So I figure I have two possible routes that I dont know how to do:

1) Figure out the same applescript thing for Windows Scripting Host.

2) Figure out if the FileMaker scripting can enter in a password when opening a file.

Based on what responses similar questions have generated, let me add that removing the passwords is not an option.

Any help would be appreciated.

Thanks,

Jason

Posted

Use the standard FileMaker script step open URL

Depending on your network setup use * or the server IP address

open URL fmp5://password@*/Startup.fp5

open URL fmp5://[email protected]/Startup.fp5

Posted

That looks very promising. I can't wait to try it out. Thank you. I have a couple of days before I can get to that customer again though so no immediate gratification.

Since it looks like this startup script method will probably work, the next thing I need to do is to get an fp5 file open via the command prompt. (Only because I will make a script that allows me to open the fp5 file on the FMPU workstation, while running the command from another machine. This allows me to bring up the hosted files which get converted with IWP to a web page without having to actually visit the workstation doing the web-serving. I have a tool to connect to a remote windows machine, and run commands as if local so that part isnt an issue.)

Most programs can do something like "application.exe -open file.txt" like "notepad.exe file.txt" opens the file. I tried running filemaker like that and it didnt appear to accept any flags. "filemaker.exe Startup.fp5" and other variants do nothing. (Ok, since I am not in front of a FM machine, I dont quite remember the filemaker executable name, probably not filemaker.exe)

How might this be accomplished?

Posted

Windows maintains a list of associations, so if Filemaker Pro is installed on that machine, it should be enough just write the fully qualified filename including the drive and path...

Works here. To test, place startup.fp5 on the desktop, and click Start - Run, and enter C:windowsdesktopstartup.fp5, then click OK.

No need to prefix the default application for that type of file in front of the filename.

Just my 0.02

Posted

Duh. Yeah, that works of course. Just tested it.

Except the previous suggestion of using fmp5:// OPEN URL syntax isn't working so well. It worked great the first time I tried. Then I went to duplicate it and nothing happened. The processing icon appeared but no database opened. Tried again few minutes later..same thing....database opened, I closed it, repeated script, nothing happened.

Any ideas?

Posted

I have a startup script in the Web Security database that opens all the hosted files. The startup script uses a plain old Open [] step, or alternatively (and preferably) a Perform Script [external] step that directly calls another script in the file.

The WS database has a "default" password in its document preferences. All hosted files *must* have this password defined with enough privileges (browse, export etc) to allow the files to be hosted. That's part of the hosting deal.

Posted

I don't understand how this helps me. I have done like you, make a Startup fp5 with a password (same as the files it opens afterwards). That file with its startup scripts works great, opens the other files.

The problem lies with opening this Startup.fp5 via command line when it has that password attached.

Pretend you need to run it as a scheduled task, how would you do it and input the password it needs?

PS. I am looking at 2 different methods right now. 1, as suggested, leave no password on the Startup.fp5 file and use OPEN URL statements in a script to allow me to open files with passwords. That sounds great but I have the above-mentioned problem where it seems to work once and then is not repeatable.

2, is to set the Startup.fp5 file with the same password and open the hosted files with the script, when it passes the credentials through. This is good except how do you open this password-protected file with a command line. I tried the fmp5:// url method but this machine is FMPro not Server so I am guessing it wont work, since it hasn't yet.

any thoughts?

Posted

More info. The script I have SHOULD work. It works sort of then just kinda stops. Looks like a bug or something to me.

Details.

I am doing my Option 1 from previous post. Startup.fp5 with no password. Script set to run upon Opening that basically runs the OPEN URL with these lines:

fmp5://password@FMServer/FileA.fp5

fmp5://password@FMServer/FileB.fp5

fmp5://password@FMServer/FileC.fp5

fmp5://password@FMServer/FileD.fp5

fmp5://password@FMServer/FileE.fp5

fmp5://password@FMServer/FileF.fp5

Here is what happens. It will open FileA and FileB one time, but apparently none of the others. (Yes they are all there and hosted.) Next running will open none of the files. Come back in a few minutes and do it again and it opens FileA and FileC. It never opens all of them. Any ideas as to why the script doesn't complete?

Help...so close.

Posted

"The problem lies with opening this Startup.fp5 via command line when it has that password attached."

Open the file in FMP and open the Document Preferences (in the Edit menu, Preferences, Document). Enter the password in the "Try default password" box. Click OK.

Why are you using the Open URL script step? This will open a web browser to process the URL which will then pass the request onto FMP (but only if the fmp5 url type has been configured in the browser -- a big if). It's a wacky idea, especially on a server because you need a correctly configured browser and it's going to remain running. Just use the plain Open [] command and select the file from the Hosts button.

"Looks like a bug or something to me."

Yeah, funny how bad programming often looks like bugs.

  • 1 month later...
Posted

Update 2:

Ok, I have a slight problem. My setup works as previously posted, until I dig deeper.

Here is my problem: The files I host are for certain users to add sensitive notes in, so each user has a password assigned and that password allows them to only view/edit their specific records matching their name. For one user, this works properly and they click on their file from the FMPU webpage and they get in. For every other user, they click on their file and it takes them back to the same webpage. Trying again gives "Database Not Open: Unable to process your request because the database xxx.fp5 is not open". Looking at FMPU, that specific file is open but all the fields are <No Access> and you have to close and re-open the file. The same user works every time. There is no difference between users, and about 30 users don't work per file. I have 7 files that do the exact same thing, all having different users and consequently each has a different user who works.

The error file in the FMP6 directory only gives the useless message "An Exception has occurred!!!. Most likely FMPro ran out of memory for this request."

I have plenty of memory and this message occurs even immediately after reboot. There is no memory problem.

Help!!!

Any clues?

Posted

Amend that last post. I figured out what is going on, partly. I get the No Access messages because the user I login as would normally display another user's information FIRST, but since that user has no display privileges except to himself, he cannot access the data, but he can find his own and view it. No problem there. However I still have a problem>

It would appear that for the cases where a user would open a file and the initial record is one where they have no display rights, IWP for some reason crashes and the file becomes un-hosted by FMPU.

Any ideas why?

This topic is 7624 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.