简体   繁体   English

Installshield 2010清洁卸载

[英]Installshield 2010 Clean Uninstall

During Install I create a Folder (Covers) in {INSTALLDIR} that ends up with a few images. 在安装过程中,我在{INSTALLDIR}中创建一个文件夹(封面),该文件夹最终包含一些图像。 On uninstall I would like to Delete this folder and [ALLCONTENT]. 卸载时,我想删除此文件夹和[ALLCONTENT]。

After 2 days I managed to Delete (DeleteDir) a folder if I have the exact path("C:\\Whatever") 2天后,如果我有确切的路径(“ C:\\ Whatever”),我设法删除(DeleteDir)文件夹

Since I have no idea where the app will be installed - how can I refer to this path in the script? 由于我不知道应用程序的安装位置,因此如何在脚本中引用此路径? In Components its labled [INSTALLDIR]Covers. 在组件中,其标签为[INSTALLDIR]。 Tried every possible "string value" for that with no luck. 为此,尝试了所有可能的“字符串值”,但没有运气。

There is no example for this (for 2010) anywhere. 没有针对此的示例(针对2010年)。 This is an UNinstaller right? 这是一个UNinstaller对吗? How could this be so difficult? 这怎么可能这么困难?

Update1: I created an Environment Variable pointing to the folder and use ExFn_GetEnvVar to get the full path value. Update1:​​我创建了一个指向该文件夹的环境变量,并使用ExFn_GetEnvVar获取完整的路径值。 Only works if the Folder is empty. 仅在文件夹为空时有效。

Solved by using RemoveFile Table. 通过使用RemoveFile表解决。 The trick is to remove all files from the directory (*) before you attempt to Delete the directory.The directory can be deleted by leaving the FileName entry blank. 技巧是在尝试删除目录之前从目录(*)中删除所有文件。可以通过将FileName条目保留为空白来删除目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM