perl -MWin32::TieRegistry -E "say for keys %{$Registry->Open('\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run')}"
OptionalComponents\
\Cmaudio
\Google IME Autoupdater
\QuickTime Task
\Adobe Reader Speed Launcher
\360Safebox
\360Safetray
\VMware hqtray
perl -MWin32::TieRegistry -E "say for values %{$Registry->Open('\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run')}"
Win32::TieRegistry=HASH(0x1a4addc)
RunDll32 cmicnfg.cpl,CMICtrlWnd
"C:\Program Files\Google\Google Pinyin\GooglePinyinDaemon.exe"
"C:\Program Files\QuickTime\QTTask.exe" -atboottime
"C:\Program Files\Adobe\Reader 8.0\Reader\Reader_sl.exe"
"C:\Program Files\360Safebox\safeboxTray.exe" /r
C:\Program Files\360safe\safemon\360tray.exe /start
"C:\Program Files\VMware\VMware Player\hqtray.exe"
2009/1/9 Beckheng Lam <bi.ken.lam@gmail.com>
应该需要递归遍历吧。
shandaw wrote:
> 可能是我没表达清楚,我说的值不是hash表里的value,我是说注册表的值(注册表有:项,值,数据。三种类型),比如:
> \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
> \360Safebox,这个值的value可能等于"C:\Program Files\360Safebox\safeboxTray.exe".
> 如果我的$sub_key=$Registry->Open("\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
> \Windows\CurrentVersion\Run\"),那我
> foreach my $key ( keys %{$sub_key})
> {
> print "\n$key";
>
> }
>
> 结果只显示Run下面的子项,却没有360Safebox等值,但我如果print $sub_key->{"360Safebox"},却又能显
> 示"C:\Program Files\360Safebox\safeboxTray.exe".
>
>
--
没有评论:
发表评论