How to create an application that automatically run after i insert smartphone into computer [closed]

StackOverflow https://stackoverflow.com/questions/20063017

Pergunta

I want to create an application that automatically runs after I insert a smartphone ( portable device ) into a computer. I has a big problem in creating an event handler to run my application. Can anyone help me on how I can do it on C# or registry of windows?

Foi útil?

Solução

solved

64 bit :

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\Test Device]
"Action"="Import pictures"
"DefaultIcon"="C:\\Test Devices\\Resource\\icon.ico,0"
"Provider"="Test Devices"
"InitCmdLine"="C:\\Test Devices\\AutoPlay.exe"
"ProgID"="Shell.HWEventHandlerShellExecute"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\Source\{80E170D2-1055-4A3E-B952-82CC4F8A8689}]
"Test Device"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\VideoSource]
"Test Device"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\ImageSource]
"Test Device"=""

32 bit :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\Test Device]
"Action"="Import pictures"
"DefaultIcon"="C:\\Test Devices\\Resource\\icon.ico,0"
"Provider"="Test Devices"
"InitCmdLine"="C:\\Test Devices\\AutoPlay.exe"
"ProgID"="Shell.HWEventHandlerShellExecute"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\Source\{80E170D2-1055-4A3E-B952-82CC4F8A8689}]
"Test Device"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\VideoSource]
"Test Device"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\WPD\ImageSource]
"Test Device"=""
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top