Installshield Script刷新桌面
2009-11-20 16:57
169 查看
Installshield Script刷新桌面
在使用Installshield制作打包安装工具的时候,桌面的图标有时候会Create错误(*下面会讲个亲身Experience)。这时候往往是只要刷新一下桌面,就能恢复想要的图标。所以,Here介绍一个在安装结束后,用Installshield Script来刷新桌面的方法。
首先,Refresh Desktop有两种:
1)调用API函数,如::InvalidateRect( 0, NULL,TRUE);
2)F5键刷新。
其次,Installshield Script调用API函数,就需要做Dll,然后调用。这个Script调用Dll的方法我会另篇说明。这里我说明下在Script中如何模拟F5键,刷新桌面。
/////////////// installation declarations ////////////////
// ---- script function prototypes -----
//声明User32.dll的函数
prototype HWND user32.GetDesktopWindow ();
prototype HWND user32.FindWindowExA (HWND, HWND, BYREF STRING, INT);
...
//安装函数
function OnFirstUIAfter()
HWND hWnd;
…
Begin
.
.
.
hWnd = GetDesktopWindow(); hWnd = FindWindowExA(hWnd, 0, "Progman", NULL);
// WM_KEYDOWN = 256, WM_KEYUP = 257, VK_F5 = 116 PostMessage(hWnd,256,116,0);
PostMessage(hWnd,257,116,0);
end;
亲身Experience:我们公司在做对日外包软件的时候,软件名称和HuaWei的软件名称一样,所以安装好以后桌面图标会生成和较早安装的一样。桌面刷新可解决这个问题。
在使用Installshield制作打包安装工具的时候,桌面的图标有时候会Create错误(*下面会讲个亲身Experience)。这时候往往是只要刷新一下桌面,就能恢复想要的图标。所以,Here介绍一个在安装结束后,用Installshield Script来刷新桌面的方法。
首先,Refresh Desktop有两种:
1)调用API函数,如::InvalidateRect( 0, NULL,TRUE);
2)F5键刷新。
其次,Installshield Script调用API函数,就需要做Dll,然后调用。这个Script调用Dll的方法我会另篇说明。这里我说明下在Script中如何模拟F5键,刷新桌面。
/////////////// installation declarations ////////////////
// ---- script function prototypes -----
//声明User32.dll的函数
prototype HWND user32.GetDesktopWindow ();
prototype HWND user32.FindWindowExA (HWND, HWND, BYREF STRING, INT);
...
//安装函数
function OnFirstUIAfter()
HWND hWnd;
…
Begin
.
.
.
hWnd = GetDesktopWindow(); hWnd = FindWindowExA(hWnd, 0, "Progman", NULL);
// WM_KEYDOWN = 256, WM_KEYUP = 257, VK_F5 = 116 PostMessage(hWnd,256,116,0);
PostMessage(hWnd,257,116,0);
end;
亲身Experience:我们公司在做对日外包软件的时候,软件名称和HuaWei的软件名称一样,所以安装好以后桌面图标会生成和较早安装的一样。桌面刷新可解决这个问题。
相关文章推荐
- Installshield 总结系列之Installshield Script Project
- Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'
- 打包软件 --InstallShield Express 5.0 的一些使用方法
- 使用vs2012中(Installshield limited edition)制作升级包
- InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序)
- 桌面'刷新',今天你点了没有?
- InstallShield Premier支持的35种语言
- InstallMySql (InstallShield script)
- 如何修改注册表禁止F5和鼠标右键刷新桌面
- 清除右键图形属性和图形选项 提高桌面右键刷新很慢的问题
- Powershell script to install Windows Updates (msu) from folder
- InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.NET程序)
- InstallShield Limited Edition for Visual Studio 2013 图文教程(教你如何打包.N
- 怎样设置windows桌面自动刷新
- 实现无刷新(script访问)
- InstallShield Developer 8 使用手记之《创建卸载应用的快捷方式》
- InstallShield X制作安装程序杂记(5.System Configuration节点)
- 初次使用InstallShield的笔记
- http://www.imagemagick.org/script/install-source.php#windows
- installshield SdSetupTypeEx 排序