RemoveFile FileName syntax, for removing .InstallState and .InstallLog
I have <assemblyname>.InstallLog and <assemblyname>.InstallState after my installation (includes installutil CAs)
How can I delete exactly these both files (please no wildcards) on uninstall without using another CA (like cmd del)?
I tried RemoveFile for hours now, but it didn't work. my last try was
somebody have the correct syntax for me?
How can I delete exactly these both files (please no wildcards) on uninstall without using another CA (like cmd del)?
I tried RemoveFile for hours now, but it didn't work. my last try was
RemoveFile table:
<assemblyname>.InstallLog <assemblyname>.dll ASSEMB~1.INS|<assemblyname>.InstallLog INSTALLDIR 2
<assemblyname>.InstallState <assemblyname>.dll ASSEMB~2.INS|<assemblyname>.InstallState INSTALLDIR 2
somebody have the correct syntax for me?
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
MSIPackager
14 years ago
I don't get it - you don't know the names of the .dll files but you don't want to use wildcards either?!
Based on what you've said I can only suggest using a vbscript with session.property to identify the file names and pass them back to Windows installer a public property - you should then be able to use these properties in the removefile table - but I've never tried this so don't know for sure it would work!
Good luck!
Cheers,
Rob.
Based on what you've said I can only suggest using a vbscript with session.property to identify the file names and pass them back to Windows installer a public property - you should then be able to use these properties in the removefile table - but I've never tried this so don't know for sure it would work!
Good luck!
Cheers,
Rob.
Posted by:
rattata
14 years ago
Posted by:
MSIPackager
14 years ago
MYASSEMB~1.INS|MyAssembly.InstallLog and MYASSEMB~2.INS|MyAssembly.InstallState didn't work
Well this should work - did you put the relevant entry into the DirProperty column too? And have the right install mode value, valid associated component etc?
http://msdn.microsoft.com/en-us/library/aa371201%28VS.85%29.aspx
Cheers,
Rob.
Posted by:
pjgeutjens
14 years ago
It looks to me like there's some entries missing in your table data in the first post. I'd say you can just use the desired filename, as in MyAssembly.InstallState.
What component did you link the RemoveFile operation to, and is this component being uninstalled at the moment when you want your files removed?
PJ
EDIT: So close... Hey Rob [:)]
What component did you link the RemoveFile operation to, and is this component being uninstalled at the moment when you want your files removed?
PJ
EDIT: So close... Hey Rob [:)]
Posted by:
MSIPackager
14 years ago
Posted by:
rattata
14 years ago
Rob,
dir property = INSTALLDIR
right install mode value = 2 (on uninstall)
valid component = MyAssembly.dll
It should work, and I knew the MSDN article, but it doesn't work :-)
PJ,
MyAssembly.dll component request state = 2 (uninstall)
whole uninstallation works fine, just the two files .InstallLog .InstallState are left
You cannot use long filenames, or you will get ICE03 -> needs 8.3|longfilename (without wildcard)
This didn't work for me, as described above.
dir property = INSTALLDIR
right install mode value = 2 (on uninstall)
valid component = MyAssembly.dll
It should work, and I knew the MSDN article, but it doesn't work :-)
PJ,
MyAssembly.dll component request state = 2 (uninstall)
whole uninstallation works fine, just the two files .InstallLog .InstallState are left
You cannot use long filenames, or you will get ICE03 -> needs 8.3|longfilename (without wildcard)
This didn't work for me, as described above.
Posted by:
rattata
14 years ago
Posted by:
pjgeutjens
14 years ago
have you tried opening a command shell, going to the directory containing the files and using dir /x ? This should give you the short filenames...
also, reading up on 8.3 filename notation on Wikipedia, my eye fell on the following:
Beginning with Windows 2000, if at least 4 files or folders already exist with the same initial 6 characters in their short names, the stripped LFN is instead truncated to the first 2 letters of the basename (or 1 if the basename has only 1 letter), followed by 4 hexadecimal digits derived from an undocumented hash of the filename, followed by a tilde, followed by a single digit, followed by a period ".", followed by the first 3 characters of the extension.
Example: "TextFile.Mine.txt" becomes "TE021F~1.TXT".1
perhaps, perhaps, perhaps...
also, reading up on 8.3 filename notation on Wikipedia, my eye fell on the following:
Beginning with Windows 2000, if at least 4 files or folders already exist with the same initial 6 characters in their short names, the stripped LFN is instead truncated to the first 2 letters of the basename (or 1 if the basename has only 1 letter), followed by 4 hexadecimal digits derived from an undocumented hash of the filename, followed by a tilde, followed by a single digit, followed by a period ".", followed by the first 3 characters of the extension.
Example: "TextFile.Mine.txt" becomes "TE021F~1.TXT".1
perhaps, perhaps, perhaps...
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.