Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Paths running on Win 7 64Bit

Status
Not open for further replies.

fourletr

Technical User
Dec 1, 2003
29
0
0
CA
I have an app that installs and runs perfectly on Win 7 32 bit. It's installed using the IS Express that comes with VFP 9.0.
However when we try to install on a 64 bit it cannot find the data files which are, of course in a seperate sub-folder called data.
We can identify the fact that the machine is running win7 64 and then set the path to c:\Program Files(x86)\xxxx\data;xxxx;xxxx which is where the clever Win7 puts them (Something to do with WOW64 whatver that is) We set this up at the top of our MAIN.prg
However the path is not recognized and data cannot be found.
Is there a trick to setting up the path under a 64bit O/S ?

BTW it works fine is we "lump" all the files together in one folder.

HELP please! The app is ready for distribution but we must allow for the proliferation of machines running 64 bit.


Richard Myers (aka - fourletr)
Burlington - Ontario
Canada
 
Data should not be in the program files folder. Since the introduction of UAC files stored there are virtualised. Seee UAC file virtualization. For ages (in regard to computers and windows) there are application data folders for application data.

On Vista/Win7, setup your data to the public user directory: C:\Users\Public\Yourapp\Data\xxxx

Bye, Olaf.
 
Hi Richard,

Olaf is correct. All my data files now default to "C:\users\public\documents\(your app name)\data". In the interest of standarizing as much as possible, ALL my data files go to this location even for Windows 32bit applications. Like you, I had to learn about UAC the hard way. The new structure works quite well once you get used to it.

Best wishes,
Dave Higgins
 
Thanks Olaf & Dave, but...
Can you please explain how I can set this folder up in IS Express 5.0. (The one that comes with VFP 9.2)

TIA

Richard Myers (aka - fourletr)
Burlington - Ontario
Canada
 
Hi Richard,

first of all, ISE 5.0 for VFP9 is not Vista/Win7 aware, nevertheless UAC also is there for backward compatibility with older setups, so you can use it for Vista/Win7 setups anyway.

If you want to install something for all users with read/write ability you specify it to go into ALLUSERSPROFILE. This is one of the many system folder placeolder ISE offers.

Activate the Installation Tab of your ISE project. In the treeview on the left chose section 2 Specify Application Data, subnode "Files". On the right side you'll now see a file browser and the lower part is for the destination computer.

[AppDataFolder] is what is for Application data, eg a DBC and DBFs, but this is for the user installing the application only, it's the application data path for a single user.

You can add further systmfolders to the destination computer. Simply Right Cllick on the root node "Destination Computer", then choose "Show Predefined Folders" and from the list activate [ALLUSERSPROFILE]. Now you can put your dbc and dbfs there.

On Vista, even though ISE is not made for Vista, this should copy the files you put under that node into the C:\Public\ folder, on older systems data then will be in the ALLUSERS profile folder.

Your app should then determin what OS it's running on and determine that system folder accordingly.

While we're at it, you can set up, how the setup will set up user permissions on the destination computer. Eg you have the [ProgramFilesFolder], underneath that your company/name folder and underneath that your application folder and subfolders you create within there, eg /data/, right click there, click on "Properties", an in the properties dialog click on permissions. In that dialog you can setup permissions for users. As you typically don't know the usernames, there are generic names again, eg "Everyone" for all users of the computer or "LogonUser" for the current user installing.

Via the permissions you _can_ also let the setup allow users to write to a data subfolder of your app folder within the programfiles folder.

Bye, Olaf.
 
Thanks for the very comprehensive reply. Unfortunately it doesn't work as you suggested. I eventually got it to install from a disk but only after much tweaking of files into various sub-directories on ISE.

I then tried it on an XP box, hopeless! and then on a Vista box, didn't even install the data anywhere.

Has anyone produced a universal distribution method for VFP 9.0 applications that will install on virtually any current O/S ?

I'm not going to spend $600.00 on ISE 11 until I can be sure it will do what I want it to.

I'm trying to produce a Church management programme based on one of my "old" 2.6 apps that has worked for many years. The app is virtually finished ( but I have to find a reliable and universal installer.

Am I crying for the moon ?

Yours more in sorrow than anger...



Richard Myers (aka - fourletr)
Burlington - Ontario
Canada
 
I've been using Inno Setup compiler for my VFP apps since I started 7 years ago. It works fine on Win Xp and Win 7 .Many D/L utilities also use this free Compiler.

Visit for more details.

GenDev
 
I don't know if you ever did a setup with ISE at all. you know you need to specify redistributable merge modules?

I simply did a setup with the Northwind Sample data to install to [ALLUSERSPROFILE] and within a subdir of [Program Files], which I modified in terms of Permissions as stated above.

Tried this setup on Vista, and while it halted at the step to begin installation for quite some time (more than a minute or so) it did install. I did find data in the program files subdir and access was given to Everyone, as I specified.

I did not find the data in C:\Public\ but in C:\ProgramData, but that's also fine, it's even more accurate for program data to go there.

So all you have is probably not knowing how to handle ISE to create a setup.

Bye, Olaf.
 
Thanks for the suggestions Olaf but I think I will take GenDev's advice and use Inno Setup.

Hi GenDev:

Thanks for the link I was already looking at this app as a possible substitute for ISE.

Already produced a working install for my App, just one thing...

How do you set/change the Desktop Shortcut icon in the script. any idea.

Richard Myers (aka - fourletr)
Burlington - Ontario
Canada
 
Richard,

I couldn't contribute to the answers to your original question, but I can defintely endorse GenDev's suggestion that you consider Inno Setup. Once you've learned it, you'll never want to go back to InstallShield.

To answer your question about desktop shortcuts, you do that by adding an entry to the [Icons] section, using the IconFileName property to specify the icon file name (there's an example in the Help file, under "[Icons] Section").

Or, just add the icon in VFP in the normal way (from the Project Info window). Inno will use that as your default icon.

Now, having said all that, it would really be better if you start a new thread for your question. That way, it will be of benefit to other developers who might be seaching for a similar question.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
My two cents:

I still use InstallShield Express for my setups. One method of installing that has worked for me is to install the app off the root of the hard drive.

Another thing to keep in mind is you may also need to set your .DLLs as 'Self Registering' in ISE.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top