Member
Iscritto dal: Dec 2009
Messaggi: 98
|
Aggiungere applicazione all'AutoPlay Dialog
Quando collego la mia chiavetta usb, per esempio, mi compare una finestra con delle opzioni come "Apri cartella per visualizzare file", "riproduci con..." robe del genere:  ...
ciò che voglio sapere, è come poter aggiungere un'applicazione, nella maggior parte dei sistemi operativi windows...
girando per la rete ho trovato una soluzione (riguarda Microsoft Security Essential), il problema e che non riesco a diciamo "capire" il codice per adattarlo alle mie esigenze.
vi posto qui sotto i file:
msescan.vbs
Codice:
'Script that launches Microsoft Security Essentials scan...
'... on a specific drive via AutoPlay dialog.
'May 08, 2010 - Ramesh Srinivasan
'Website: http://www.winhelponline.com/blog
'Published at http://www.howtogeek.com
If Trim((WScript.Arguments(0))) = "" Then WScript.Quit
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(&H11&)
Set objFolderItem = objFolder.ParseName(WScript.Arguments(0))
Set objVerbs = objFolderItem.Verbs
iMenuItem = 1000
i = 0
For Each vrb In objVerbs
i = i + 1
If vrb = "Scan with Microsoft Security Essentials..." Then
iMenuItem = i - 1
objVerbs.Item(iMenuItem).DoIt
Exit For
End If
Next
If iMenuItem = 1000 Then
MsgBox "Sorry! Microsoft Security Essentials scan could not be launched."
End If
mseautoplay.reg
Codice:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\AutorunINFLegacyArrival]
"ScanUsingMSE"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\MixedContentOnArrival]
"ScanUsingMSE"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival]
"ScanUsingMSE"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\ShowPicturesOnArrival]
"ScanUsingMSE"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\UnknownContentOnArrival]
"ScanUsingMSE"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\ScanUsingMSE]
"Action"="Scan For Viruses & Malware"
"InvokeProgID"="MSE_AutoPlay_Scan"
"InvokeVerb"="launchscanner"
"Provider"="Microsoft Security Essentials"
"DefaultIcon"=hex(2):25,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,\
00,6c,00,65,00,73,00,25,00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,\
66,00,74,00,20,00,53,00,65,00,63,00,75,00,72,00,69,00,74,00,79,00,20,00,45,\
00,73,00,73,00,65,00,6e,00,74,00,69,00,61,00,6c,00,73,00,5c,00,6d,00,73,00,\
73,00,65,00,63,00,65,00,73,00,2e,00,65,00,78,00,65,00,2c,00,30,00,00,00
[HKEY_CLASSES_ROOT\MSE_AutoPlay_Scan\shell\launchscanner\command]
@=hex(2):77,00,73,00,63,00,72,00,69,00,70,00,74,00,2e,00,65,00,78,00,65,00,20,\
00,22,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,6d,00,73,00,\
65,00,73,00,63,00,61,00,6e,00,2e,00,76,00,62,00,73,00,22,00,20,00,22,00,25,\
00,31,00,22,00,00,00
|