Results 1 to 20 of 20

Thread: [RESOLVED] installer problem

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Resolved [RESOLVED] installer problem

    I have my completed VB.NET program but in order to make it as generic as possible, I had to copy all of the external files the VB.NET program uses to the bin folder. I created a Windows installer so the program can be distributed. I installed it on a different machine from that which created the program. I tried running it but I get an error message saying it can't find a file needed. Aren't all of the files in the bin folder compiled with the program? If not how do I get them where they are needed? Thanks in advance for the advice!!

    Dave

  2. #2
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    You should include a .NET Framework Redistributable package with your program. The computer that you are running it on probably does not have that.

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    Okay, how do you include the kit? Do you somehow put it in the installer file or is it separate? I take it that the kit can be obtained from Microsoft? Thanks again!

    Dave

  4. #4
    Fanatic Member
    Join Date
    May 2005
    Posts
    898

    Re: installer problem

    I don't think that any files that you've put in the bin folder manually automatically get included in your install.
    "so just keep in mind that fantasy is not the same as realtiy and make sure u remember that wii sports may be fun but u cant count on it as exercise ok cool bye" - HungarianHuman

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    If they do not get included automatically and I NEED them to be in the bin folder so they can be found by the program, then what do I have to do?

    Dave

  6. #6
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    In the installer be sure to specify all the files you want included... Also when you install your stuff on another computer it's always a good idea to check what the installer copied over...

    Here's the link for Redistributable:
    Microsoft .NET Framework Version 1.1 Redistributable Package

    P.S.: Be sure to install the framework package before you run your program.

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    Thanks. I will try this out and see if it works.

    Dave

  8. #8
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: installer problem

    Also, you can download the bootstrapper plug-in

    http://msdn.microsoft.com/vstudio/do.../bootstrapper/

    to install the framework when your program loads. It's handy if you're deploying over a network, or on a CD, but if your program is being downloaded, you might just want to use the built in launch condition that points to the web to download the 25 meg dotnetfx.exe framework redistributable.

    Bill

  9. #9

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    Okay, I included all the files in the setup file using the Windows setup wizard. When I run the program after installing, it still cannot find the files. In my VB.NET program I had to put those files in the bin directory so the program could find them without hard coding the directory path. The .NET framework is installed on the computer where I am trying to run the program. Could the problem be with NOT hardcoding the path to the outside files? If so is there a way to tell the .NET program that the files needed are in the directory where the program is running?


    Dave

  10. #10
    Frenzied Member conipto's Avatar
    Join Date
    Jun 2005
    Location
    Chicago
    Posts
    1,175

    Re: installer problem

    Try this:

    Right click on your setup project in the solution explorer, and go to add.. then pick the files you need in the working directory. Then, make sure they are under "Application Folder" underneath "File System on target Machine". they should automatically get added.

    Bill

  11. #11

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    They are in a folder called Module Retagetable Folder under the File System on Target Machine. Here is the code for the button that starts the program....
    Dim strFlight As String
    Dim strArgu As String
    Dim strDirectory As String
    Dim strVers As String
    Dim strProg As String
    Dim oProc As New Process
    strFlight = LTrim(RTrim(CType(lstFlights.SelectedItem, String)))
    If txtPath.Text = "" Then
    MessageBox.Show("You must type in the version of Windows you are using in the space provided!!", "Data entry error")
    Exit Sub
    End If
    strVers = UCase(txtPath.Text)
    If strVers = "XP" Then
    strProg = "cmd"
    Else
    strProg = "command.com"
    End If
    If Val(strFlight) < 1060 Then
    strDirectory = "ah64a1\"
    Else
    strDirectory = "ah64a2\"
    End If
    strArgu = strDirectory & strFlight & "\"
    Try
    oProc.StartInfo.FileName = strProg
    'oProc.StartInfo.Arguments = "/k call " & strPath & "\close.bat " & strPath & "\" & strDirectory & strFlight & "\"
    oProc.StartInfo.Arguments = "/k call close.bat " & strDirectory & strFlight & "\"
    oProc.Start()
    Catch MyError As IOException
    MessageBox.Show(MyError.ToString)
    MessageBox.Show(MyError.Message)
    Finally
    End Try

    Should the program be finding the files using this code?

    Dave

  12. #12
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    you don't have to hardcode that path, you can just do:

    Application.StartupPath & "\file.txt"

  13. #13

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    Do I type that in for each file and will it work with directories? I have two directories included with the program where other files are located.

  14. #14

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    I am in dire need of a GOOD book that helps with this kind of problem. I am a noob at this so it has to be written for the lowest common denominator. Any suggestions?

  15. #15
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    Application.StartupPath is just the path of your .exe no matter where it is located. And yes you might want to type that in for every time you use a file in the same directory as your exe.

    If your exe is here: C:\temp\files\program.exe
    and you put something like this in your code: Application.StartupPath & "\whatever\hey.txt"

    then it will be the same as: C:\temp\files\whatever\hey.txt

  16. #16
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    I don't have any good book suggestions (migrated from VB6), but try looking at Amazon.com and just read some of the suggestions that other users give. If you want something "for the lowest common denominator" , try Step by Step books...

  17. #17

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    The Application.StartUpPath is fine but the file it needs is not put in that path by the installer so the program can't find it. The files I need are listed under the Detected Dependencies folder of the Setup folder in Solution Explorer. I also included Debug Symbols, Content Files, Localized resources, and Primary output. I am sure I am overlooking something simple but my ignorance of the syntax is showing. By the way, I program in QuickBasic here at work. We need a simple easy-to-use way to run the QB program which is why I am trying VB.NET.

    Dave
    Last edited by davros51; Jun 30th, 2005 at 12:32 PM.

  18. #18
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    If you are just using VB .NET to run stuff, have you considered using batch programming instead? (just a suggestion: maybe that'll be more convinient)

  19. #19

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    58

    Re: installer problem

    The boss wants a GUI to start it up. I don't know why. I guess he is concerned the people using this program are not familiar with DOS. And maybe their computers do not have a DOS base. We are still using Win 98 because everything is either batch or QB. I took VB6 in school but they made us do our final project in VB.NET so I had to learn the language on the fly. Glad I had some exposure but certainly not enough to solve this file problem.

  20. #20
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: installer problem

    Well, you should double check the files and where you are putting them in the setup. Sometimes the smallest bugs are the meanest.

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