我用installshield做的安装程序,在安装时会写入注册表Run键下几个值实现自启动,在windowXP下一切正常,但在vista跟Win7下(均为64位)安装时未报任何错误,但安装结束后查看注册表却发现并没有写入。对于这个问题大家是怎么看的呢?
下面是的我的相关脚本:
if(RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE)=0)then
if(RegDBCreateKeyEx( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "example1")<0)then
MessageBox("exampl1 eregistration failed,installation will be terminated ",SEVERE);
abort;
endif;
RegDBSetKeyValueEx( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "example1", REGDB_STRING, TARGETDIR^"example1.exe", -1 );
else
MessageBox("HKEY_LOCAL_MACHINE is not existed,installation will be terminated",SEVERE) ;
abort;
endif;
下面是的我的相关脚本:
if(RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE)=0)then
if(RegDBCreateKeyEx( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "example1")<0)then
MessageBox("exampl1 eregistration failed,installation will be terminated ",SEVERE);
abort;
endif;
RegDBSetKeyValueEx( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "example1", REGDB_STRING, TARGETDIR^"example1.exe", -1 );
else
MessageBox("HKEY_LOCAL_MACHINE is not existed,installation will be terminated",SEVERE) ;
abort;
endif;
还有,我发觉安装完重启后再注册表里Run键下并没有写入任何信息,但我想让他自启动的部分程序却自启动了,会不会是实际上已经写入了但是操作系统隐藏了不显示出来呢?