Results 1 to 7 of 7

Thread: \Support Files are not found

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    \Support Files are not found

    hey guys i made a program in vb that gets information from a text file when a number is entered, but when i use inno to make the setup program it cant find the files to read.


    the code is like this
    VB Code:
    1. If Text1.Text = "1" Then
    2. Text2.Text = ""
    3. iFileNo = FreeFile
    4.       'open the file for reading
    5.   Open "C:\WINDOWS\Desktop\History Helper\Backup\1.txt" For Input As #iFileNo
    6. 'change this filename to an existing file!  (or run the example below first)
    7.  
    8.       'read the file until we reach the end
    9.   Do While Not EOF(iFileNo)
    10.     Input #iFileNo, sFileText
    11.       'show the text (you will probably want to replace this line as appropriate to your program!)
    12.     Text2.Text = Text2.Text & sFileText
    13.   Loop
    14.  
    15.       'close the file (if you dont do this, you wont be able to open it again!)
    16.   Close #iFileNo
    17. End If

    Can anyone help? Thanks

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: \Support Files are not found

    Where do you install the program? Are you installing under the same user? You didn't give enough information to help.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: \Support Files are not found

    The program installs at C:\Program Files\MHX History Helper.


    The setup program is distributed to different computers all over so the users don't have the same user name - if thats what you mean?

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: \Support Files are not found

    Well that would help. Use {app} to install you application and files in Inno Setup.

    What does your script look like and how did you determine what files needed to be deployed with your app?

    What did yoyu use to create your script?

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: \Support Files are not found

    what is {app}?

    The script of the inno setup for my program looks like this

    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

    [Setup]
    AppName=MHX History Helper
    AppVerName=MHX History Helper 1.0.1
    AppPublisher=MicroHARDxce Enterprises
    AppPublisherURL=http://microhardxce.ipfox.com
    AppSupportURL=http://microhardxce.ipfox.com
    AppUpdatesURL=http://microhardxce.ipfox.com
    DefaultDirName={pf}\MHX History Helper
    DefaultGroupName=MHX History Helper
    AllowNoIcons=yes
    OutputDir=C:\WINDOWS\Desktop
    OutputBaseFilename=setup5
    Compression=lzma
    SolidCompression=yes

    [Languages]
    Name: "english"; MessagesFile: "compilerefault.isl"

    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

    [Files]
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\HistoryHelper4.exe"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\1.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\10.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\11.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\12.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\13.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\14.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\15.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\16.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\17.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\18.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\19.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\2.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\20.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\21.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\22.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\23.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\24.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\25.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\26.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\27.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\3.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\4.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\5.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\6.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\7.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\8.txt"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:\WINDOWS\Desktop\History Helper\Backup\9.txt"; DestDir: "{app}"; Flags: ignoreversion
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

    [Icons]
    Name: "{group}\MHX History Helper "; Filename: "{app}\HistoryHelper4.exe"
    Name: "{group}\{cm:UninstallProgram,MHX History Helper }"; Filename: "{uninstallexe}"
    Name: "{userdesktop}\MHX History Helper "; Filename: "{app}\HistoryHelper4.exe"; Tasks: desktopicon

    [Run]
    Filename: "{app}\HistoryHelper4.exe"; Description: "{cm:LaunchProgram,MHX History Helper }"; Flags: nowait postinstall skipifsilent

    ---

    I used the script wizard to make it, my problem is that when someone enters a number in one text box information to be shown for that search is in a text file that goes into a text box on the form, but whenever i install the finished program it says it cant find those text files, although when i put files into the installer program the text files are in the same folder as the program file if that matters? Any help would be appreciated

    I would it so that the user can install anywhere on the hard drive and still be able to use the files right.

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: \Support Files are not found

    First of all the Inno Setup Wizard does not find the dependency files you need to deploy your app (Try ********** to find the dependencies, it's free fro three days).

    You can't hard code folders in your code and expect the program to find your files on another computer ("C:\WINDOWS\Desktop\History Helper\Backup\1.txt" ). Use App.Path for the location of your file.
    VB Code:
    1. App.Path & "\1.txt"

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: \Support Files are not found

    Thank you I will see what I can do, lol this is my first deployed application so im working alot of bugs out thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width