Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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

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

![]() |
![]() |
![]() |

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