CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2016
    Location
    Missouri
    Posts
    5

    Need help with creating a service pack DVD

    Hello,
    I am using Visual Studio 2005. I need some help with coding. I am working on a Installation DVD. With Microsoft services packs. It works great on the computer and I have created a .exe file using Visual Studio 2005 of coarse.

    My problem is the path to get the .exe files is on the computer. I am trying to run the whole thing from the DVD.
    I have process.start("C:\Documents & Settings to user then the desktop to the Folder. But when I move the files to a DVD it works create on my computer, because the paths go to the the mention area's on the computer. When I run it from the DVD on another computer it crashes. I was hoping there is a wild card symbol to use. So everything points and runs from the DVD.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Process.Start("C:\Documents and Settings\CD_Menu\Resources\Windowsxp-kb835935-sp2-enu.exe")
    End Sub

    Thanks for any help on this topic

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need help with creating a service pack DVD

    Documents and settings ?? I take it you are using XP or older version of the OS.

    All the newer systems will use the Users folder for documents by default.

    You should not be hard coding your path instead have the exe execute from the DVD and have it use a retaliative path from where it is executed.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    May 2016
    Location
    Missouri
    Posts
    5

    Re: Need help with creating a service pack DVD

    Quote Originally Posted by DataMiser View Post
    Documents and settings ?? I take it you are using XP or older version of the OS.

    All the newer systems will use the Users folder for documents by default.

    You should not be hard coding your path instead have the exe execute from the DVD and have it use a retaliative path from where it is executed.

    Thanks a lot DataMiser. I appreciate your feedback. I am sorry, but I am still new to coding. I don't know where I found online the process.start cmd. But I have been searching and looking for code to help me online. Thanks for explaining that to me. Could you show a example of code and string to help me. I am still a new noob. I would appreciate it.

  4. #4
    Join Date
    May 2016
    Location
    Missouri
    Posts
    5

    Re: Need help with creating a service pack DVD

    Thanks DataMiser,

    I appreciate your post. I am new at coding. I found process.start online to help me out with this project. I didn't know there was another way to do this. I was wondering if you could show me your post in a example. This will help me understand your method. Thanks again. Sorry about placing code in the code brackets.

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Need help with creating a service pack DVD

    Try using Application.StartupPath instead of a hard coded path.

    The most likely reason you see the program work when ran from DVD on your system is because you still have the files on your HDD at the target location and that is where it is reading them from instead of the DVD. The other computer must not have those files there so it has a problem with it.

    I had typed in a longer more detailed response with an example but it did not post and was lost. Don't have time now to do it again hopefully this will get you started in the right direction anyway.
    Always use [code][/code] tags when posting code.

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

Featured