I am new to this InstallShield code. I am trying to delete a key with
我是这个InstallShield代码的新手。我想删除一个密钥
RegDBDeleteKey("Nrs_Log");
RegDBDeleteKey( “Nrs_Log”);
But was not able to delete and setup is running fine. Could anyone suggest any other way to delete a registry key.
但是无法删除和设置运行正常。任何人都可以建议删除注册表项的任何其他方法。
1 个解决方案
#1
0
There are many reasons why a RegDBDeleteKey() might fail. There is not enough info in your post to determine the problem, so I can't even speculate without more information. So here is how to get more information - You need to get the return value of the RegDBDeleteKey() call, so you can find out what is going on.
The below code gets the return value, converts it to a text error, and displays the result.
RegDBDeleteKey()可能失败的原因有很多。您的帖子中没有足够的信息来确定问题,因此我甚至无法在没有更多信息的情况下进行推测。所以这里是如何获取更多信息 - 您需要获取RegDBDeleteKey()调用的返回值,以便您可以找到正在发生的事情。下面的代码获取返回值,将其转换为文本错误,并显示结果。
result = RegDBDeleteKey("Nrs_Log");
if(result < 0) then
SprintfBox(WARNING, "RegDBDelete...", "Failed to delete registry key.\n Error number: %d \n %s", result, FormatMessage(result) );
endif;
Once you know the actual error, you should be able to fix the problem or Google it for more info.
一旦你知道实际的错误,你应该能够解决问题或谷歌它以获取更多信息。
#1
0
There are many reasons why a RegDBDeleteKey() might fail. There is not enough info in your post to determine the problem, so I can't even speculate without more information. So here is how to get more information - You need to get the return value of the RegDBDeleteKey() call, so you can find out what is going on.
The below code gets the return value, converts it to a text error, and displays the result.
RegDBDeleteKey()可能失败的原因有很多。您的帖子中没有足够的信息来确定问题,因此我甚至无法在没有更多信息的情况下进行推测。所以这里是如何获取更多信息 - 您需要获取RegDBDeleteKey()调用的返回值,以便您可以找到正在发生的事情。下面的代码获取返回值,将其转换为文本错误,并显示结果。
result = RegDBDeleteKey("Nrs_Log");
if(result < 0) then
SprintfBox(WARNING, "RegDBDelete...", "Failed to delete registry key.\n Error number: %d \n %s", result, FormatMessage(result) );
endif;
Once you know the actual error, you should be able to fix the problem or Google it for more info.
一旦你知道实际的错误,你应该能够解决问题或谷歌它以获取更多信息。