473,699 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1626
Any suggestions on how to do this?


Try something like

Process.Start(" Explorer.exe",
Path.GetPathRoo t(Application.E xecutablePath))

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.GetPathRoo t(Application.E xecutablePath) with --
CurDir() and that did it. Thanks.
"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:ek******** ******@TK2MSFTN GP11.phx.gbl...
Any suggestions on how to do this?


Try something like

Process.Start(" Explorer.exe",
Path.GetPathRoo t(Application.E xecutablePath))

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.GetPathRoo t(Application.E xecutablePath) 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.GetPathRo ot' is not declared

duha

"Mattias Sjögren" <ma************ ********@mvps.o rg> wrote in message
news:ub******** ******@TK2MSFTN GP09.phx.gbl...
I replaced the --Path.GetPathRoo t(Application.E xecutablePath) 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.GetPathR oot' 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.o rg> wrote in message
news:OV******** ******@TK2MSFTN GP10.phx.gbl...
You are right, excpet I am getting an error at design time 'Path' in the
'Path.GetPathR oot' 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.o rg> wrote in message
news:ud******** ******@TK2MSFTN GP11.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
2357
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 without comments is only about 30 lines. Also included a setup.py at the end of the script so you can 'compile' it easily. py>#####################################################################
11
5054
by: Ray5531 | last post by:
I'm looking for a good Freeware autorun maker for my C# application.Any suggessions? Thanks
2
1509
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 or launches if it is already installed. If the end-user has the application open and inserts a new CD (containing the legacy app), a new instance of the application is launched. That's fine for the legacy application. The new application is a...
2
8528
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 one here may be able to answer this simple question. If I burn a CD/DVD and include a file in the root of the burned disk called Autorun.inf and the contents of it is: open=C:\Program Files\myProgram.EXE
2
3181
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 specific Flash Disk device. It would be very thankful If anyone could tell me about it.
0
6120
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). Much of the contents of this article are tested on Windows XP professional SP2 by the author. Some instances of this article may be altogether different/missing on Windows Vista, XP and other Windows NT systems, but I have tried to write a...
0
9211
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 settings on my PC? Ans: I recommend that you backup all of your important data before trying anything mentioned in this article. When a person is tweaking with autoruns, one has to rely on 'trial and error' methods and so there is always the possibility...
0
30226
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 a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them carefully: HKCU = HKEY_CURRENT_USER HKLM = HKEY_LOCAL_MACHINE
0
9952
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 on my Windows PC? Ans: Other than Sysinternals Autoruns, there are only a few programs which are good enough to be used when dealing with autoruns. For more information about Sysinternals Autoruns, read Que-7 in Windows Autorun FAQs: Description....
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.