Computing.Net > Forums > Programming > Auto run (for CD) program in vb6

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Auto run (for CD) program in vb6

Reply to Message Icon

Name: dulon
Date: October 10, 2004 at 00:01:29 Pacific
OS: windowsXP
CPU/Ram: P3/128MB
Comment:

Hi,
I am in need of a source code in vb6 to make an auto run exe file to open a program (exe) file. Can anyone help please!

86166



Sponsored Link
Ads by Google

Response Number 1
Name: livingdecay
Date: October 10, 2004 at 02:24:51 Pacific
Reply:

if you mean you just want a certain program to run when you insert a cd, you just need to create a text file that looks like this:

[autorun]
open=<name of file to run>
Icon=<icon or exe file containing icon>
Name=<name of app [can be anything]>

if you want to create a program that runs another program (when it opens, or when you click a button or whatever) you just use the "shell" function. The syntax is:

Shell(<executable path>)

if you want a program to run at windows startup, theres probably an api function you can use to add it to the startup menu list, or you can use use RegCreateKey to create a registry entry in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run".

hope this helps, try to be more clear with exactly what you want to do in future.

Athlon XP 1800+
512Mb DDR266 RAM
Leadtek Geforce 6800
Thermaltake 360W PSU
56X CD-ROM
52x24x52 Samsung CD-RW
20 GB Maxtor HDD
80 GB Hitachi HDD
Gigabyte GA-7DX+ mobo


0

Response Number 2
Name: BlueRaja
Date: October 10, 2004 at 08:00:26 Pacific
Reply:

It says "for CD" in the title, so the former solution would be the correct one...
I should note that the textfile should be named "autorun.inf", and be placed in the root folder of the CD (ie. D:\autorun.inf)

AKhalifman@hotmail.com


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Auto run (for CD) program in vb6

nasty fonts in VB6! www.computing.net/answers/programming/nasty-fonts-in-vb6/4645.html

cd player in vb6.0 www.computing.net/answers/programming/cd-player-in-vb60/10189.html

how to run my C++ program in bakgrn www.computing.net/answers/programming/how-to-run-my-c-program-in-bakgrn/12618.html