Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 31st, 2007, 11:28 AM
Registered User
 
Join Date: Dec 2007
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old January 2nd, 2008, 05:35 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
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...)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06:17 AM
Running Jar files in NetBeans Ibn_Aziz JSP Basics 0 May 17th, 2004 01:17 PM



All times are GMT -4. The time now is 10:27 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.