Autorun

D

duha

Writing my own flash screen and autorun.exe in VB .NET.



In most commercial packages the autorun flash screen includes at least three
buttons: "Install", "Browse CD" and "Quit." Hitting the "Browse CD" button
displays a directory of the CD , then exits, leaving the directory on
display.



I want my "Browse CD" button to show the root of the the CD then end the
program. But all I can get it to do is end the program.



Any suggestions on how to do this?
 
D

duha

I replaced the --Path.GetPathRoot(Application.ExecutablePath) with --
CurDir() and that did it. Thanks.
 
M

Mattias Sjögren

I replaced the --Path.GetPathRoot(Application.ExecutablePath) with --
CurDir() and that did it. Thanks.

Why? The current directory isn't necessarily the same as the disc
drive root directory.



Mattias
 
D

duha

You are right, excpet I am getting an error at design time 'Path' in the
'Path.GetPathRoot' is not declared

duha
 
M

Mattias Sjögren

You are right, excpet I am getting an error at design time 'Path' in the
'Path.GetPathRoot' is not declared

The Path class is located in the System.IO namespace so you either
have to Import that or fully qualify it as
System.IO.Path.GetPathRoot()



Mattias
 
D

duha

Does it really show that I am a novice programmer :) I fully qualified and
it worked. How do you import? Thanks

Duha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top