How to make a Usb autorun Software using C++?

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

How to make a Usb autorun Software using C++?

Post by Powermun50 on Fri Dec 28, 2012 10:03 am
([msg=71870]see How to make a Usb autorun Software using C++?[/msg])

Can anybody help me by giving me Complete Source code to make a usb autorun software.May be i am in wrong place but i really need to make a Usb Autorun software which is perfect for me...
Powermun50
New User
New User
 
Posts: 13
Joined: Wed Dec 19, 2012 2:31 am
Blog: View Blog (0)


Re: How to make a Usb autorun Software using C++?

Post by centip3de on Fri Dec 28, 2012 1:23 pm
([msg=71871]see Re: How to make a Usb autorun Software using C++?[/msg])

Powermun50 wrote:Can anybody help me by giving me Complete Source code to make a usb autorun software.May be i am in wrong place but i really need to make a Usb Autorun software which is perfect for me...


The ability for a USB to auto-run a program is completely dependent on the operating system installed... I believe all the newer versions of Windows (Vista/7/8) have this feature removed, as there were a lot of security issues with it in XP. However, I suppose if you put a program on the persons computer first, you could make your own auto-run program; but you would need to access their computer first. And if you have access to their computer, it begs the question as to, why you wouldn't just get what you needed then and there? Anyway, the answer is yes it's possible, but not practical, and we're not going to give you the entire source code without you working on it at all.

TL;DR: It's possible, but not practical, and we're not going to give you the entire source code without you working on it at all.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1428
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)


Re: How to make a Usb autorun Software using C++?

Post by WallShadow on Fri Dec 28, 2012 8:32 pm
([msg=71874]see Re: How to make a Usb autorun Software using C++?[/msg])

centip3de wrote:The ability for a USB to auto-run a program is completely dependent on the operating system installed... I believe all the newer versions of Windows (Vista/7/8) have this feature removed


Vista/7/8 still have the feature, but it is disabled by default on them, as opposed to previous version that have it enabled by default. (I'm certain about Vista and 7, but not entirely sure about 8).



Powermun50 wrote:Can anybody help me by giving me Complete Source code to make a usb autorun software.May be i am in wrong place but i really need to make a Usb Autorun software which is perfect for me...


Auto-running in Windows requires creating a special file called 'autorun.inf' in the root of the drive with contents similar to:
Code: Select all
[AutoRun]
shellexecute=path/to/my/program/my_program.exe

where my_program.exe is the program you want to run. make sure to set the proper path.

It doesn't require any special source code, the program can be just a regular console program, or even just a batch script.

- WallShadow <3
User avatar
WallShadow
Contributor
Contributor
 
Posts: 594
Joined: Tue Mar 06, 2012 9:37 pm
Blog: View Blog (0)


Re: How to make a Usb autorun Software using C++?

Post by centip3de on Sat Dec 29, 2012 3:03 pm
([msg=71878]see Re: How to make a Usb autorun Software using C++?[/msg])

WallShadow wrote:Vista/7/8 still have the feature, but it is disabled by default on them, as opposed to previous version that have it enabled by default. (I'm certain about Vista and 7, but not entirely sure about 8).


Well, I suppose that's what I get for being a Linux user.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rick Cook
User avatar
centip3de
Moderator
Moderator
 
Posts: 1428
Joined: Fri Aug 20, 2010 5:46 pm
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron