View Full Version : How to add an empty file to [PersonalFolder]
geo68
11-13-2008, 08:02 AM
Hi,
I have been trying to add a folder and an empty file to [PersonalFolder]. When I add an empty folder then everything works fine. However, when I try to add a file to it I get an error saying that the path must be set in the registry.
My question is:
How do I add a folder and an empty file to the [PersonalFolder] (which is suppose to be "My documents" in the users PC)?
I have used wise for that in the past without any problems, I'm evaluating MSI Factory in order to get a better tool, but it must do what I have been doing in the past.
I'm 100% certain that you know how to do it, it would be nice to know how.
Regards,
Natalia
jassing
11-13-2008, 04:57 PM
if by empty you mean zero size: I was able to create a zero size file; add it to the projcet, build the project and run the resulting .msi -- no errors.
can you be more specific on what / when you get the error and how to reproduce?
geo68
11-17-2008, 03:56 AM
if by empty you mean zero size: I was able to create a zero size file; add it to the projcet, build the project and run the resulting .msi -- no errors.
Yes, I can do that as well, but it only works if you choose a folder other than [PersonalFolder] or "My documents" as I understand. It works fine for [ApplicationData] or any other folder, when I try to insert the file into the [PersonalFolder] I get a the following errors:
error LGHT0204 : ICE38: Component empty.txt installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file.
error LGHT0204 : ICE64: The directory MyDocFolder is in the user profile but is not listed in the RemoveFile table
I don't understand whath the KeyPath means, or how do I alter the RemoveFile table and where do I find that.
I hope I was able to explain myself better this time.
Thanks for your help.
Natalia
venky
11-23-2008, 05:59 PM
Regarding ICE64: I don't know why you are getting ICE64 error because if you created a folder in PersonalFolder then it should automatically be configured to be removed on uninstallation. ICE64 means that a folder in PersonalFolder will be left on users system uninstallation. I guess to fix it add a RemoveFolder action and set timing to OnUninstall.
Regarding ICE38: ICE38 ensures that a component installed under users profile also has specifies a registry key in HCKU.
To fix these errors: Under Build settings -> Options, check Continue building after validation errors.
I was able to create a folder in MyDocuments and add an empty text file to it and upon uninstallation the empty file and folder were removed from MyDocuments folder.
Venky.
Lorne
11-24-2008, 11:19 AM
Be careful with ICE38. I would never personally bypass that, unless you are fine with your install breaking on a multi-user system.
I'm not sure why the registry key path isn't being set up automatically in that case...it should be. But you can set that up manually by using the component properties. Create a component, set its key path to a registry key in HKCU, then add the file to that component.
Lorne
01-08-2009, 09:42 AM
To clarify: you must set a registry value item as the key path, you can't designate a registry key as a key path in MSI.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.