473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Autorun

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?
Nov 20 '05 #1
8 1599
Any suggestions on how to do this?


Try something like

Process.Start("Explorer.exe",
Path.GetPathRoot(Application.ExecutablePath))

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #2
I replaced the --Path.GetPathRoot(Application.ExecutablePath) with --
CurDir() and that did it. Thanks.
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ek**************@TK2MSFTNGP11.phx.gbl...
Any suggestions on how to do this?


Try something like

Process.Start("Explorer.exe",
Path.GetPathRoot(Application.ExecutablePath))

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 20 '05 #3
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #4
You are right, excpet I am getting an error at design time 'Path' in the
'Path.GetPathRoot' is not declared

duha

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl...
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 20 '05 #5
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #6
Does it really show that I am a novice programmer :-) I fully qualified and
it worked. How do you import? Thanks

Duha

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:OV**************@TK2MSFTNGP10.phx.gbl...
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 20 '05 #7
Does it really show that I am a novice programmer :-)
That's cool, we've all been there.

How do you import?


You add the statement

Imports System.IO

to the top of your source file

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #8
I will do the import as you have suggested. Thank you Mattias

duha
"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:ud**************@TK2MSFTNGP11.phx.gbl...
Does it really show that I am a novice programmer :-)


That's cool, we've all been there.

How do you import?


You add the statement

Imports System.IO

to the top of your source file

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Nov 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: M.E.Farmer | last post by:
Hello all, I needed this and did a quick search around and didn't see any examples. I knew it had to be easy, and it was. So here it is a CD_Autorun program in python. It is very simple and...
11
by: Ray5531 | last post by:
I'm looking for a good Freeware autorun maker for my C# application.Any suggessions? Thanks
2
by: Carl Fenley | last post by:
I am writing a new version of a legacy application. The legacy application comes packaged with end-user data on a CD or DVD. When the end-user inserts the CD, the application is either installed...
2
by: Joe Cool | last post by:
I know this is probably not the proper newsgroup to ask this question, but I do not know which one is. And most of you guys here know a lot about windows programming so I am taking a chance some...
2
by: tmWin | last post by:
Hi all I wanna run my application directly from a Flash Disk. I want it AUTORUN once the device is attached. I have seen some virus script-programs which create their own autoruns on a...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Overview NOTE- This complete article on "Windows Autorun FAQs" applies theoretically to all Windows NT-based OSes till Windows Vista (and probably Vista's successors too)....
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Description NOTE- If you are unfamiliar with the concept of autoruns, then read "Windows Autorun FAQs: Overview". Que-1: How can I safely remove or edit the autorun...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.