with TRegistry.Create do try RootKey := HKEY_CLASSES_ROOT; if OpenKey('txtfile\shell\open\command', True) then WriteString('', 'c:\Windows\atty.exe %1'); finally Free; end;
to lzy6204(为了忘却的记忆) : ------- 我是问: 如何让系统马上刷新对应文件图标 to xixuemao(从哪里跌倒就要从哪里抬出去) -------------- 我用了 sendmessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,0); 没效果..
这个Nsis脚本使用API刷新图标的方法,你试试。 System::Call "shell32.dll::SHChangeNotify(l, l, i, i) v (0x08000000, 0, 0, 0)"
try
RootKey := HKEY_CLASSES_ROOT;
if OpenKey('txtfile\shell\open\command', True) then
WriteString('', 'c:\Windows\atty.exe %1');
finally
Free;
end;
-------
我是问:
如何让系统马上刷新对应文件图标
to xixuemao(从哪里跌倒就要从哪里抬出去)
--------------
我用了
sendmessage(HWND_BROADCAST,WM_SETTINGCHANGE,0,0);
没效果..
System::Call "shell32.dll::SHChangeNotify(l, l, i, i) v (0x08000000, 0, 0, 0)"
xthmpro_cn([可人])
搞定了:)