How to get an exe i created to run on multiple computers?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fuzz13
    New Member
    • Jun 2010
    • 110

    #1

    How to get an exe i created to run on multiple computers?

    I wrote a simple program that has a close button and a ping button. When you click the ping button it is hard coded to ping a specific website and return into the richtextbox the ip address returned. I built it on a windows 7 machine in VS 2010 pro then chose to Build > Build console app. It created an .exe that I launched on my computer and installed to make sure it ran which it did. I then sent the file to a different computer where it wouldn't install (windows 7 machine as well). It gave this error:
    Code:
    PLATFORM VERSION INFO
     Windows    : 6.1.7600.0 (Win32NT)
     Common Language Runtime  : 4.0.30319.1
     System.Deployment.dll   : 4.0.30319.1 (RTMRel.030319-0100)
     clr.dll    : 4.0.30319.1 (RTMRel.030319-0100)
     dfdll.dll    : 4.0.30319.1 (RTMRel.030319-0100)
     dfshim.dll    : 4.0.31106.0 (Main.031106-0000)
    SOURCES
     Deployment url   : file:///D:/Guy/Desktop/setup/IP%20Address%20Tester.application
    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of D:\Guy\Desktop\setup\IP Address Tester.application resulted in exception. Following failure messages were detected:
      + Downloading file:///D:/Guy/Desktop/setup/IP Address Tester.application did not succeed.
      + Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
      + Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
      + Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.
    WARNINGS
     There were no warnings during this operation.
    OPERATION PROGRESS STATUS
     * [10/30/2010 8:08:54 PM] : Activation of D:\Guy\Desktop\setup\IP Address Tester.application has started.
    ERROR DETAILS
     Following errors were detected during this operation.
     * [10/30/2010 8:08:54 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype)
      - Downloading file:///D:/Guy/Desktop/setup/IP Address Tester.application did not succeed.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
       at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
       at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
       at System.Deployment.Application.DownloadManager.DownloadManifestAsRawFile(Uri& sourceUri, String targetPath, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation)
       at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
       at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
       at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
      --- Inner Exception ---
      System.Net.WebException
      - Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
      - Source: System
      - Stack trace:
       at System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.FileWebRequest.GetResponse()
       at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
      --- Inner Exception ---
      System.Net.WebException
      - Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
      - Source: System
      - Stack trace:
       at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
       at System.Net.FileWebRequest.GetResponseCallback(Object state)
      --- Inner Exception ---
      System.IO.FileNotFoundException
      - Could not find file 'D:\Guy\Desktop\setup\IP Address Tester.application'.
      - Source: mscorlib
      - Stack trace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
       at System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async)
       at System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint)
    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.
    I don't understand what the error is saying or why it wouldn't install on the other computer. Thanks to anyone who has some suggestions.
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    It looks like you "published" your application, then tried to copy just one of the files that the publish resulted in. That's just not going to work.

    You'd have to copy the entire directory that it published, if you want to use the ClickOnce deployment.

    Otherwise, you can just build the project, then go into the /bin/debug folder of the project directory and copy the executable from there. That will have NO installation, just run as an application.

    Comment

    • Fuzz13
      New Member
      • Jun 2010
      • 110

      #3
      I chose to publish it then I moved the "setup.exe" it created. Is that not the entire program? If it is not how the heck do I make an application that people can run without having every single file I have?

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        "Publish" creates a sort of installable package deployment. It's supposed to be either hosted on a web server or distributed via CD or installed off a shared drive. It's not an actual setup file as you would think. All setup.exe does is start the .application file.

        If you have a full version of Visual Studio, you can create a setup package that is a true installer. Not if you have Express though. There are third party installers, but I have no experience with that.

        Your third alternative is to do what I mentioned earlier. Find the executable in the Bin directory of the project and distribute that. It won't run as an installer, it will run as a program. But if your application relies on DLLs, those have to be copied as well.

        Comment

        • Bassem
          Contributor
          • Dec 2008
          • 344

          #5
          Curtis,

          If you have a full version of Visual Studio, you can create a setup package that is a true installer. Not if you have Express though. There are third party installers, but I have no experience with that.
          This is a great piece of information, I never knew that. Could you please tell me a name of a third party?

          Thanks

          Comment

          • Curtis Rutland
            Recognized Expert Specialist
            • Apr 2008
            • 3264

            #6
            Nullsoft makes one:
            http://nsis.sourceforge.net/Main_Page

            Also InstallShield:
            Build secure, reliable Windows Installer (MSI) and MSIX packages with InstallShield, the industry standard for creating professional Windows installations.


            And more.

            But I've never used any of them, so I have no experience with them.

            Comment

            • Fuzz13
              New Member
              • Jun 2010
              • 110

              #7
              So if I have the full version of VS how do I go about creating an .exe that I can distribute out and have other computers install or launch and run without sending them all my files? If you can tell me at least what its called when you do it I can search msdn for it but I thought that's what publish was and I was wrong.

              Comment

              • Curtis Rutland
                Recognized Expert Specialist
                • Apr 2008
                • 3264

                #8
                You know, this is the third time I've mentioned that you can directly run the executable from the /bin/debug folder in the project. It won't run as an installer. It will just run the program. If you aren't depending on any DLLs, this is an incredibly simple way of doing what you want to do.

                The Project type for creating an installable package is called Setup Project. This is how it looks in Visual Studio 2010 Ultimate.



                Your version and edition may be different. But you can search for tutorials on using Setup Projects and you should find what you need.
                Attached Files

                Comment

                • Fuzz13
                  New Member
                  • Jun 2010
                  • 110

                  #9
                  I apologize if I sound redundant Curtis I understand I can launch the .exe directly from the bin folder but can I email that .exe to a friend and they would be able to launch it by clicking it? I was under the impression that in order for them to be able to use that .exe they would need my entire project, code files etc. which I would rather not have to send every time I want them to run it. You said if it uses .dll files they need to be included which is what I'm asking about as far as packaging an executable that I can send off to someone so they only need to have that single .exe. If I can send the one located in the bin folder that's fantastic, a simple solution but like I mentioned I thought that particular executable was dependent on having every file it is created out of present.

                  Comment

                  • Curtis Rutland
                    Recognized Expert Specialist
                    • Apr 2008
                    • 3264

                    #10
                    The Bin folder is the output of the compilation of your program. If you haven't added any external references or DLLs or app.config files, you should just see a few .exe, .vshost.exe, and .pdb files. The .pdb and .vshost.exe files are for Visual Studio's debugging. The .exe is the entire executable, packaged and ready to go.

                    Again, if there are DLLs in that folder, or a .config file, those would have to be distributed with it.

                    If that's the case, it's probably better to use the Setup Project. Otherwise, that's a lot of overhead for a small application.

                    Also, there's nothing wrong with using the Publish option. You could ZIP up the directory that it creates and distribute that. That way, you're still just sending one file.

                    Comment

                    • Bassem
                      Contributor
                      • Dec 2008
                      • 344

                      #11
                      Thanks a lot Curtis, I will go with Nullsoft because it is open-source.

                      Comment

                      • Fuzz13
                        New Member
                        • Jun 2010
                        • 110

                        #12
                        Curtis: I sent the .exe in the bin folder and it worked as needed. I appreciate your patience in helping me/us with this. It is good information to know.

                        Comment

                        • Curtis Rutland
                          Recognized Expert Specialist
                          • Apr 2008
                          • 3264

                          #13
                          No prob. Remember to mark the appropriate response as the answer, so that other people with the same problem can quickly see the resolution.

                          Comment

                          Working...