# enable autorun



## ankur3020 (Oct 18, 2008)

batch file code that enable cd autorun for all types of files specially for exe's in vista .


----------



## -Fabez- (Jul 28, 2008)

Can you elaborate on your problem please.


----------



## ankur3020 (Oct 18, 2008)

whenever we insert cd in vista operatinf system, it pop up windows that give you option whether to run exe /setup file as per autorun.inf or open folder . i want this should not happen instead the setup file should run automatically and there will not be any option /pop up window on inserting cd. 

batch file code that can do this.


----------



## draceplace (Jun 8, 2001)

I don't have vista but here is where someone address this issue thru the registry.

I'm sure it could be done by script or batch but I wouldn't want to do it without a place to test (no vista).


----------



## ankur3020 (Oct 18, 2008)

u pls give code , i will test on my pc.


----------



## draceplace (Jun 8, 2001)

Been a busy day. I'm about to call it week but look for keys like below in your registry and see if manually changing them fixes the problem then we'll make a .bat or .reg file.
Click Start, click Run, type regedit in the Open box, and then press ENTER. 

Locate and click the following registry key: 

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CDRom 
To disable automatically running CD-ROMs, change the Autorun value to 0 (zero). To enable automatically running CD-ROMs, change the Autorun value to 1. 

Restart computer.

Also you can try following the 'here' link above and try that. If you find one that fixes we can code.

I'm out for the week.


----------



## ankur3020 (Oct 18, 2008)

i know that option, but it will not solve the purpose. let me tell u frankly what i want?

the basic idea is as some virus does what he want, i want the same. means whenever i insert cd in any system it runs at every cost and do not take any input from user. 

i want my code should run and should not be stopped by user.

or u can guide something like my exe file runs automatically whenever some user access any file from cd where it is burned. again without user input.


----------



## -Fabez- (Jul 28, 2008)

If the user has Auto-Run disabled then you cannot force your program to run. You can do it using some code on thier computer, but external media alone cannot force the user to run the program.


----------



## draceplace (Jun 8, 2001)

It also looks like most options to change computer settings (auto run) require a reboot. It appears you need to have the computer(s) configured to match your specifications rather than changing them on the fly. As Fabez says "external media alone cannot force the user to run the program".


----------

