Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP on Windows7 (64 bit)
Message
From
05/10/2010 11:01:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/10/2010 08:58:32
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Miscellaneous
Thread ID:
01483794
Message ID:
01483984
Views:
93
>Are any tricks to install VFP9 application on Windows7 (64 bits). Current problem is following: installed application (setup was created with InstallShield Express under Windows XP) seemingly grabs data exclusively, i.e. any attempts to open tables from another application or from VFP itself get error message "File Access Denied". I tried various installation paths: C, Program Files, ProgramData, all the same. Needless to say that application works Ok under Windows XP, and SET EXCLUSIVE OFF is in all places.

Hi Ed,
You are not allowed to write under Program Files. That creates such problems if you don't move the data folders outside Program Files. Other than that it works fine. Here is my routine that gets some special folder locations to use on different OS (the physical location names are different under XP,Vista,W7):
clear
? GetSpecialFolderName('APPDATA')
? GetSpecialFolderName('LOCALAPPDATA')
? GetSpecialFolderName('COMMONAPPDATA')
? GetSpecialFolderName('COMMON')
? GetSpecialFolderName('COMMONDOCUMENTS')

procedure GetSpecialFolderName
Lparameters tcFolderIdentifier
#Define CSIDL_APPDATA                   0x001a
#Define CSIDL_LOCAL_APPDATA             0x001c
#DEFINE CSIDL_COMMON_APPDATA            0x0023        && All Users\Application Data
#DEFINE CSIDL_PROGRAM_FILES_COMMON      0x002b        && C:\Program Files\Common
#define CSIDL_COMMON_DOCUMENTS          0x002e        && All Users\Documents


#Define SHGFP_TYPE_CURRENT 0   && current value for user, verify it exists
#Define SHGFP_TYPE_DEFAULT 1,   && default value, may not exist
#Define CSIDL_FLAG_CREATE  0x8000	&& create folder if not there

#Define MAX_PATH 267

Declare Integer SHGetFolderPath In 'shell32.dll' ;
  integer hwndOwner, ;
  integer nFolder, ;
  integer hToken, ;
  integer dwFlags, ;
  string @ pszPath

tcFolderIdentifier = Upper(Trim(Evl(m.tcFolderIdentifier,'')))

Return GetFolderLocation(;
  ICASE( ;
  m.tcFolderIdentifier == 'APPDATA',       CSIDL_APPDATA, ;
  m.tcFolderIdentifier == 'LOCALAPPDATA',  CSIDL_LOCAL_APPDATA, ;
  m.tcFolderIdentifier == 'COMMONAPPDATA', CSIDL_COMMON_APPDATA, ;
  m.tcFolderIdentifier == 'COMMON',        CSIDL_PROGRAM_FILES_COMMON, ;
  m.tcFolderIdentifier == 'COMMONDOCUMENTS',    CSIDL_COMMON_DOCUMENTS, ;
  CSIDL_PERSONAL ), .T.)

Function GetFolderLocation(tnCSIDL,tlCreate)
  Local pszPath
  pszPath = Replicate(Chr(0),MAX_PATH)
  If (m.tlCreate)
    tnCSIDL = m.tnCSIDL + CSIDL_FLAG_CREATE
  Endif

  Return Iif ( ShGetFolderPath(0,m.tnCSIDL,0,SHGFP_TYPE_CURRENT, @pszPath ) = 0, ;
    Left(pszPath,At(Chr(0),pszPath)-1), ;
    '')
endfunc
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform