/build/static/layout/Breadcrumb_cap_w.png

Removing a hidden file on msi uninstall

Hi Guys,

Part 2 of my mission of creating a mst from a vendor provided msi from hell.

Upon uninstall testing of the app I've noticed that a hidden file gets left behind, obviously this is due to the app generating the file after installation. Easy I say lets just add a remove file entry on unistall except that it didnt get removed after re-testing.

Would I be correct in thinking that if a file had the hidden attribute set it would not be removed as instructed? If so, how would I go about removing the hidden file using WPS 7 as part of the uninstall process?

Thanks again

0 Comments   [ + ] Show comments

Answers (7)

Posted by: anonymous_9363 14 years ago
Red Belt
0
A Custom Action to call "ATTRIB -H [whatever.file]" perchance? :)
Posted by: Tyrelever 14 years ago
Senior Yellow Belt
0
most likely, thanks im still very new to all this.

Cheers.
Posted by: suchi.jigar 14 years ago
Purple Belt
0
This scenario, i have faced when, we launch help files. After launching help files, gid files get created, which are hidden and which does not get removed after uninstallation.
I used to create, REMOVEFILE entry for it. It gets removed, in your case if it is not getting removed, then
1) may be any application related process is running. so kill that process 1st.
2) may be your removefile entry is wrong, validate your msi/mst with orca, then you will get to know the problem, with related ice error.

if you want scripts you can take help from following scripts.

'this script will check the file exists, and then it will delete it.
Option Explicit
'On Error Resume NExt
Dim Objshell
Dim Objfso
Dim strprogramfiles
Dim strpath
Dim strpath1
Dim strpath2
Dim objfolder


Set objshell = Createobject("Wscript.shell")
Set Objfso = Createobject("scripting.filesystemobject")
strprogramfiles = objshell.expandenvironmentstrings("%Programfiles%")

'Wscript.echo strprogramfiles

strpath = strprogramfiles & "\Suchikant.txt"

'Wscript.echo strpath


If objfso.fileexists (strpath) Then
'wscript.echo ("test")
objfso.deletefile (strpath)

End If
Posted by: anonymous_9363 14 years ago
Red Belt
0
this script will check the file exists, and then it will delete it. Not if the file still retains its 'Hidden' attribute it won't!
Posted by: suchi.jigar 14 years ago
Purple Belt
0
check if any process is running...
Posted by: anonymous_9363 14 years ago
Red Belt
0
What?!? Whether a process running or not is irrelevant. If a file has its 'Hidden' attribute set, your script won't delete it.
Posted by: suchi.jigar 14 years ago
Purple Belt
0
It will delete.....i created that file, and made it hidden, and then i run the same script. It deletes that file.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ