Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 31st, 2007, 12:28 PM
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running Install files from DVD?

Hi all,

As my first post to these here fora, I'd like to say thanks to Wrox and everybody else for offering this service - much appreciated!!

OK, now down to the nitty gritty. I am responsible for the preparing and replicating of an insane number of DVDs (23 masters and a total of 1,300 duplicates). These DVDs contain the install and information files for an application used within my group. Up until now, I've been using a program called CD Autorun Creator to automatically open a form when the user puts the DVD into the drive, and the form has a series of buttons that will install the particular file the user has selected. My problem is that CD Autorun Creator sucks, and I can only use it on the one PC we have it installed on, which of course I cannot access remotely. This makes it difficult when I'm trying to work on this stuff from home.

So I came up with the brilliant idea to use Visual Basic 2005 for the development of the form. In doing some testing, I have finally figured out how to use relative paths (yeah for me!) but when I burn everything to a CD, I get an error saying that the installation file cannot be found (even though it is definitely on the disc).

This works fine when running on my local machine (changed the path):
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Computer.FileSystem.CurrentDirectory = "c:\documents and_ 
        settings\currentuser\desktop\"
        Shell(My.Computer.FileSystem.CurrentDirectory _      
        & "\Setup.exe", , , )
    End Sub
End Class
This is, in theory, what I want:
Code:
    
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        System.IO.Directory.GetCurrentDirectory()
        Shell(My.Computer.FileSystem.CurrentDirectory _  
        & "\Setup.exe", , , )
    End Sub
End Class
Does anyone have any suggestions? Also, I need to make sure that A) this will work on machines that do not have the .NET Framework and B) If I can avoid installing the application I'm building, but run it right off the DVD, that would be preferable. I know I'll need to write the Autorun.ini file to start the application, I just don't want the users to have to install the application I'm working on.
Really appreciate any ideas.
Thanks in advance!!
Chris

 
Old January 2nd, 2008, 06:35 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

No .NET programs will run without the framework. That's the whole idea. Prgs are compiled to an intermediate state (the CLR), which is then connected with the specifics for the platform (the hardware/OS/software collaboration) only when the program is actually run. What it is connected to is the framework for that platform...

Does
Code:
  Shell(My.Computer.FileSystem.CurrentDirectory.Name _  
        & "\Setup.exe", , , )
        or
Code:
  Shell(My.Computer.FileSystem.CurrentDirectory.toString() _
Code:
        & "\Setup.exe", , , )
        (or some such way to get the string that represents the folder) work? (You can't actually join a folder to a string. They are different animals...)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Install problem on running Infopath toolkit flyfish Infopath 3 March 30th, 2007 01:20 PM
DVD files(.vob, .ifo) and Window Media player Andraw Classic ASP Basics 2 March 9th, 2007 07:17 AM
Running Jar files in NetBeans Ibn_Aziz JSP Basics 0 May 17th, 2004 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.