Click to See Complete Forum and Search --> : \Support Files are not found
Justin M
Jun 12th, 2006, 12:13 AM
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
If Text1.Text = "1" Then
Text2.Text = ""
iFileNo = FreeFile
'open the file for reading
Open "C:\WINDOWS\Desktop\History Helper\Backup\1.txt" For Input As #iFileNo
'change this filename to an existing file! (or run the example below first)
'read the file until we reach the end
Do While Not EOF(iFileNo)
Input #iFileNo, sFileText
'show the text (you will probably want to replace this line as appropriate to your program!)
Text2.Text = Text2.Text & sFileText
Loop
'close the file (if you dont do this, you wont be able to open it again!)
Close #iFileNo
End If
Can anyone help? Thanks
randem
Jun 12th, 2006, 02:09 AM
Where do you install the program? Are you installing under the same user? You didn't give enough information to help.
Justin M
Jun 12th, 2006, 04:15 AM
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?
randem
Jun 12th, 2006, 01:14 PM
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?
Justin M
Jun 23rd, 2006, 07:27 PM
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: "compiler:Default.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 :D
I would it so that the user can install anywhere on the hard drive and still be able to use the files right.
randem
Jun 23rd, 2006, 11:39 PM
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.
App.Path & "\1.txt"
Justin M
Jun 24th, 2006, 11:39 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.