Creating a .dat file to autorun for my program

I have an proj.dat file I am working on and I need some code in order to make it autorun and bypass any security I may have on there. Or do I simply remove the security?
Who is Participating?
BillDLConnect With a Mentor Commented:
Hi angelic_webmaster

As has been stated by others, you are probably wasting your time trying to get anything to autorun on a PC that is running a recent version of Windows.  For a number of years System Administrators have had the headache of trying to prevent users in workplaces from using their own USB Flash Drives, etc, on systems that automatically try to run content from them.  Just look up "autorun.inf virus" and you will see that loads of systems still get infected with malicious software that uses the autorun weakness of Windows to spread from one removable drive to another and then onto other computers.

In case you wondered, there is a difference between "autoplay" (where Windows tries to detect the file content of removable media and execute some action that can be modified by the user), and "autorun" (where Windows looks for an autorun.inf file in the root of the removable medium and executes the actions specified in it).

For quite a number of years there were lots of software titles (free and retail) that helped users easily create some pretty fancy autorunning CDs.  Many of the driver CDs that came with sound and graphics cards used one of the readily available titles that I used to use.  I am sure that sales of this software has almost completely died in the last two or three years because of the tighter security restrictions that would make the generated CDs useless as "autorun" ones on most modern PCs.  The same is true of CDs that come with PC magazines.  These commonly used a method that circumvented browser restrictions and used the default browser to display content in a way that would not now be allowed in an up to date browser and Windows PC.

Back in the Windows 9x days autorun was enabled by default for CDs but you could disable it directly through the registry or with tweaking utilities.  You could even enable autorun on floppy disk drives if you wanted to test things.  Those days are gone and autorun is disabled by default for security reasons.

You say that you have an *.exe file and you need some type of "autorun" data file.  You have not mentioned anywhere what this EXE file is, nor where you got it from, so we have no way of knowing what parameters might be required by the EXE file.

It is not clear whether the *.DAT file you refer to is needed to supply the settings for the EXE to display an interface, or whether you are muddling this up for a simple autorun.inf file.

If detected by Windows, an autorun.inf file simply tells Windows what icon to display for the CD drive, what file to execute, and some other options.  See ve3ofa's earlier post with Wikipedia link, and also this one:

An exe file sometimes needs a "data file" that tells it what to display and how to display it, for example a menu of options that are interactive and display different images or icons for each tab or section.  These data files are different for every exe file.  It all depends what the program was written with.  The old interactive Microsoft CDs used to use a fairly basic EXE that was re-usable for different CDs, and a different data file was all you needed to make it show and run different things.  The data file was a simple text-based one divided into headings that were known to the EXE.  Some EXE files will use binary data files that are not easily editable and can only be created by the same software that compiled the original EXE file.

There are a few programs that allow you to open, edit, and resave EXE (and a few other types of) files, but you would generally be in breach of copyright and licensing terms, and you need to know what to change anyway.

If you can explain what it is that you are trying to modify I am sure that we can evaluate whether or not we can answer your question legally and within the Experts-Exchange rules.
David Johnson, CD, MVPOwnerCommented:
Bypassing Security is against the Experts-Exchange TOS.

.dat files are not executable's in any case.. where you thinking a a autorun.inf?
angelic_webmasterAuthor Commented:
Yea I was thinking autorun I believe. The dat file I found was inside of a CDD file - would the cdd file be an autorun file? Maybe not bypass the security, but add in info to make it run.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

David Johnson, CD, MVPOwnerCommented:
microsoft has pretty much disabled autorun.inf on removable media due to malware using it as a vector.
a basic autorun.inf

label=My install CD
angelic_webmasterAuthor Commented:
Can I open the exe and edit it? Any ideas or thoughts?
David Johnson, CD, MVPOwnerCommented:
WHY would you want to hex-edit an EXE?  Discussions about this are against the EE TOS
angelic_webmasterAuthor Commented:
This answered my question although my question was very vague, and I was still trying to understand what I wanted to do.
Thank you angelic_webmaster.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.