none
Deployment problems in Vista RRS feed

  • Question

  • Hi everyone

    I have problems when I want to install my foxpro application in Vista. The error messages is "the resource file is not valid". The installer is Installshield. But, this application package running very well in XP. 
    My structure application was located database file in folder \dbf like: "[installdir]\my application folder\dbf"
    Please, help me to solve this problems.
    Thanks for yours attention.
    Thursday, March 4, 2010 12:20 AM

Answers

  • there is two file in application direcotry or Data Directory "foxuser.dbf" & "foxuser.fpt" 

    delete or rename this both file.  your problem is solved.






    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog
    • Marked as answer by 4im Thursday, March 4, 2010 5:38 AM
    Thursday, March 4, 2010 4:03 AM
    Answerer
  • your command give access deined error.

    You have to write in Application Direcotry "Config.fpw" Visual FoxPro Setting File.

    DOS base FoxPro you have to set in "config.fp"

    Write below one line in config.fp or config.fpw file.



    RESOURCE=OFF





    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog
    • Marked as answer by 4im Thursday, March 4, 2010 8:57 AM
    Thursday, March 4, 2010 6:20 AM
    Answerer

All replies

  • there is two file in application direcotry or Data Directory "foxuser.dbf" & "foxuser.fpt" 

    delete or rename this both file.  your problem is solved.






    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog
    • Marked as answer by 4im Thursday, March 4, 2010 5:38 AM
    Thursday, March 4, 2010 4:03 AM
    Answerer
  • Thanks very much to Kalpesh :-)

    But how to make this automatically in my foxpro application? I must write DELETE FILE ('foxuser.dbf') and DELETE FILE ('foxuser.fpt') in my main .prg file?
    Thursday, March 4, 2010 5:38 AM
  • your command give access deined error.

    You have to write in Application Direcotry "Config.fpw" Visual FoxPro Setting File.

    DOS base FoxPro you have to set in "config.fp"

    Write below one line in config.fp or config.fpw file.



    RESOURCE=OFF





    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog
    • Marked as answer by 4im Thursday, March 4, 2010 8:57 AM
    Thursday, March 4, 2010 6:20 AM
    Answerer
  • Thanks again to Kalpesh :-)

    But now, I have facing one problem after I wrote that config.fpw.

    It's because I used one .dbf file with memo field to get and save a location of file directory address.

    In XP is not problem. But in Vista, there is a message error: "cannot update the cursor FILENAME, since it is read-only".

    What can I do to make this problem clear? I need your help again.
    Thursday, March 4, 2010 8:57 AM
  • In Vista and later you cannot write to files under 'Program Files'. Move your files that you need to write outside Program Files, such as ProgramData, Users\Public documents or to other personal folders of the user. Those folder names are different between windows version (ie: in XP Documents and Settings\All users\..., vista and win7 c:\Users\...). You can use this function to get those folder names:

    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

     
    Thursday, March 4, 2010 11:39 AM
  • Thanks for your answer CetinBasoz.

    I see that my problem was limited by Vista in protect "C:\Program Files\" from unwanted access.

    So, if I want to make all .dbf file not read-only aka writable, I must locate all files outside "C:\Program Files\".

    It's a big problem for me that I must exchanging data process between data in "C:\Program Files\My Application Folder\Data" with, example, data in "C:\ProgramData\Temp".

    What kind solution for this problem?
    Thursday, March 4, 2010 12:53 PM
  • your command give access deined error.

    You have to write in Application Direcotry "Config.fpw" Visual FoxPro Setting File.

    DOS base FoxPro you have to set in "config.fp"

    Write below one line in config.fp or config.fpw file.



    RESOURCE=OFF





    Please "Mark as Answer" if this post answered your question. :)

    Kalpesh Chhatrala | Software Developer | Rajkot | India

    Kalpesh's Blog

    It is exactly what I need, Thanks for your effort! It's very detailed.
    Monday, February 21, 2011 12:20 AM