I would like to create a USB stick with a simple HTML file in it which opens when the stick gets plugged in. It is meant to be some kind of merchandise thing. Thing is that I read that Microsoft disabled Autorun on Windows 7 for security reasons. But despite that I have such a USB stick lying around which does the exactly the thing I'm looking for. Unfortunately it is not displayed as a removable drive, therefore I can not take a look into it.
Can anyone recommend a method, which works on as many devices (with different OS, different Settings) as possible?
i think you are searching for the autorun.inf http://en.wikipedia.org/wiki.Autorun.inf
you can write your own autorun.inf and copy it on the stick (if it does not show up as removable disk format it, maybe run a data rescue tool first) if this will work depends on the os settings of the specific computer you plug in the stick. if autorun is disabled in the os it will not work...
Related
I want to create an application or modify USB in a way so that, upon insertion into any PC, I can get the information that PC was inserted.
eg. upon insertion, I can read PC name and make an API call with this as post data so I'm able to know that my USB was inserted in some PC. But this should happen right away as USB is read by the machine, so even if the user formats it thereafter, it should not matter.
If it was earlier windows, I could write autorun and that would work. But I want this detection mechanism for Windows 7 and above.
I have done some research on the topic but could not find any reliable content. Some articles were related to USB based hacking attacks by changing wiring (USB hardware, to harm the computer) or something like that. But I totally don't want to do that. Just the detection, that USB was used.
I tried to install windows7 from USB according to the instructions of following page.
http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/
But at the location where i select the partition it says me something like "device not found."(Cant give the exact machine as i came to somewhere else to search the internet, coz my machine's not working).
How can i overcome this?? I've formatted the whole disk. Got nothing to do now!!!
You have formatted the whole hard disk. That is the problem. It's a windows 7 specific problem. I'll describe the case in brief. the setup detects your pen drive as a part of the hard disk(at least something like this). Therefore you can overcome the issue by not letting this to happen.
Which means, you can make the pen drive read only (or make don't allow setup to use pen drives storage). One possible solution will be fill the empty space of the pen drive with bulky data. then there will be no space for the setup program to use in the pen.
Or else you can remove pen drive at the time where the setup is trying to access it (for the above mentioned purpose). How to know the exact time??? well it's trial and error. I myself have done it and it worked. It will require some Patience.
Of course, you can install some other os and then try install win7 after that.
Hope that helps..!!
I want to run a .exe file (or) any application from pen drive on insert in to pc. I dont want to use Autorun.inf file, as all anti virus software's blocks it. I have used portable application launcher also, that also using autorun only. so once again anti virus software blocks it. Is there any alternative option, such that .exe file from pen drive should start automatically on pen drive insert?
Anti-virus programs block autorun.inf on the solely purpose not to allow some .exe-s to start automatically on pen drive insert. So, basically, what you're asking is impossible.
I havent used Windows in a long time, but I am fairly sure there is a setting in Windows to enable/disable autorunning executeables on mounted drives. That and changing such setting in your antivirus application (or get a new, saner one) would be my best guess.
Good luck!
I want to move my program to USB memory stick. It will run only on memory stick and would not be copied (written on C# and has nearly 3GB of database).
Where can I find a good source for that and/or how can I do that?
What you described can't reasonably be done. If a user can run the program, they can run it. It doesn't matter whether they loaded it from your USB stick or not. You can write it such that it assumes it's being run from the USB stick (with relative paths, per #Kos's comment) but that will in no way prevent people from copying it to their hard drives and running it. Since you don't know where a USB stick will be mounted ahead of time, you can't even use absolute paths.
Allow me to disagree with nmichaels, it is possible to check in C# if your running from removable storage or hard drive.
Check this thread: How to detect if any specific drive is a hard drive?
However, it would be too easy to reverse the thing and allow it to run on hard drives.
As an additional protection, you can read the USB drive serial and if it doesn't match, kill the program.
OR... you if want to be hardcore, use a specific USB drive model, and read the VID/PID, or the chip itself (check mass production tool).
In the end, if the program worths it, someone would still reverse it and break the protection scheme :)
I have been looking into the possibility of creating a soft copy(image/EMF file) of everything printed from Windows - for archival purposes. Does anyone know if it is possible to create a hooking DLL that can grab the printed data in such a general way?
A low tech way of solving it might be to install pdf printer driver as the default printer and remove all others and set it up to automatically write all the files to certain directory on the network and then write a tiny app on another computer to monitor that folder for changes and if any new pdfs appear just print them out to a real printer.
Edit: Otherwise there's apparently something called the Print Monitor API. Here's an article that describes using that from VC++ 6 and seems to be pretty much what you want (assuming it's still supported by the OS you use).
Having looked at this problem in more detail the best solution seems to handle it through Spooler notifications in the Win32.