Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Integrate .Net Framework Application into Windows Autoplay Features

I want to integrate an application into the autoplay feature of windows so that i can detect when a user plugs in a memory card into their computer. How do you get your applications icon Listed in the Auto Play feature of windows.
0
talker2004
Asked:
talker2004
  • 3
1 Solution
 
alexcohnCommented:
It is not clear what "Autoplay" you Imply. If you want your application to start automatically when the Windows is loaded, it is enough set the Windows registry entry:
  HKLM\Software\Microsoft\Windows\CurrentVersion\Run
name: any (it is ignored)
type: REG_SZ
data: path to your program, maybe - with parameters, e.g.
  "C:\Program Files\Dell Support\DSAgnt.exe" /startup

You can use
  HKCU\Software\Microsoft\Windows\CurrentVersion\Run
if you want to start it only if the particular user logs in.

The application will start when a user logs in, and inherit this user's account permissions.

You can convert your application to become a system service. It will inherit system permissions, but such processes cannot have user interface.
0
 
talker2004Author Commented:
The feature of windows i am referring to is called AutoPlay. When you insert a disk / memory card into your computer windows responds with the autoplay window prompting you with a list of options. An example is that when i insert a blank cd the autoplay window appears and one of the options are to burn with Nero. Since Nero is a 3rd party application i would like to know how they got their icon registered in there. The feature you are referring to above is considered the AutoRun feature of windows.

0
 
alexcohnCommented:
Thanks for clarification. See the following step-by-step article, http://www.codeproject.com/cs/system/AutoplayDemo.asp

You will tweak the ssytem registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers.
You will need to register your handler in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers and put references to it in appropriate sub-keys of HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers

Vista-specific details may be found in MSDN, http://msdn2.microsoft.com/en-us/library/aa969686.aspx
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now