Uninstall problem
Hi,
There is a package already deployed in the company, it's about a plugin to access a bank's website. This package install several files into installation folder, the problem is during unistallation process; there is a file taken by the system so it remains installed on his folder; even after restart the computer.
So far, it never was a problem but now I've received a demand to build another package about a plugin to access a bank's website. This package has a file with the same name and the same location that the file included in the old package, so the new package is not changing this file, because the old one is still there.
So, how can I do to put a CA or something like that, to delete the file before copy the new one?
If you don't understand anything, please let me know and I'll try to explain it better.
There is a package already deployed in the company, it's about a plugin to access a bank's website. This package install several files into installation folder, the problem is during unistallation process; there is a file taken by the system so it remains installed on his folder; even after restart the computer.
So far, it never was a problem but now I've received a demand to build another package about a plugin to access a bank's website. This package has a file with the same name and the same location that the file included in the old package, so the new package is not changing this file, because the old one is still there.
So, how can I do to put a CA or something like that, to delete the file before copy the new one?
If you don't understand anything, please let me know and I'll try to explain it better.
0 Comments
[ + ] Show comments
Answers (25)
Please log in to answer
Posted by:
jmaclaurin
13 years ago
Posted by:
SandeepPanat
13 years ago
Posted by:
kpremchander
13 years ago
Hello CMI2000,
If you exactly want to remove the file through custom action means. include the below script to remove the file while uninstalling. and don't forget to give condition REMOVE~=ALL and it should be immediate custom action and you ve to place after InstallFinalise ,in the Execution sequence.
'File deletion Script.. save as File_Delete.vbs
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("<full path with file name> ") Then
filesys.DeleteFile "<full path with file name> "
End If
If you exactly want to remove the file through custom action means. include the below script to remove the file while uninstalling. and don't forget to give condition REMOVE~=ALL and it should be immediate custom action and you ve to place after InstallFinalise ,in the Execution sequence.
'File deletion Script.. save as File_Delete.vbs
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("
filesys.DeleteFile "
End If
Posted by:
blacklisted_packager
13 years ago
Posted by:
navnathz
13 years ago
Posted by:
kanthsri87
13 years ago
Posted by:
cmi2000
13 years ago
OK, I'll try to use your script but I can't change the package already deployed, I have to do a new package with the new plugin. It isn't an upgrade because it's about a different bank's website. I'll put this script at the beginning of the install sequence to remove the file before to install the new one.
But... are you sure that this script could delete the file even if it's taken by the system??
But... are you sure that this script could delete the file even if it's taken by the system??
Posted by:
naveen.packager
13 years ago
I dint get your point 'taken by the system'.
I think during uninstallation of the application some process regarding your application is running behind which uses that file.
Are you installing the new app by uninstalling the old app? If so find that process which is using that file and kill that before deleting the file or the whole folder.
Use these two scripts (killing process and deleting folder) in the new application with condition NOT REMOVE~="ALL"
EDIT:Adding true in vbscript will remove the file or folder forcebully
Eg:- fso.deletefolder(s),True
I think during uninstallation of the application some process regarding your application is running behind which uses that file.
Are you installing the new app by uninstalling the old app? If so find that process which is using that file and kill that before deleting the file or the whole folder.
Use these two scripts (killing process and deleting folder) in the new application with condition NOT REMOVE~="ALL"
EDIT:Adding true in vbscript will remove the file or folder forcebully
Eg:- fso.deletefolder(s),True
Posted by:
cmi2000
13 years ago
no, the uninstallation process try to delete the file, but it remains in its location even after restart the system. I can't to install the new package because it has a file with the same name and the same location that the old one, so I have to put something in the new package to delete the old files.
with 'taken by the system' I mean 'the file is being used by a process. The processes that are using this file are explorer.exe and winlogon.exe, so I can't kill these processes. I have to 'unlock' it.
Manually, I've installed a software called unlocker and it can to unlock the file and I can delete it later; but I need to do that through my new package, not manually...
do you understand?
with 'taken by the system' I mean 'the file is being used by a process. The processes that are using this file are explorer.exe and winlogon.exe, so I can't kill these processes. I have to 'unlock' it.
Manually, I've installed a software called unlocker and it can to unlock the file and I can delete it later; but I need to do that through my new package, not manually...
do you understand?
Posted by:
cmi2000
13 years ago
ORIGINAL: naveen.packager
Use these two scripts (killing process and deleting folder) in the new application with condition NOT REMOVE~="ALL"
EDIT:Adding true in vbscript will remove the file or folder forcebully
Eg:- fso.deletefolder(s),True
Where have I to put this condition? I think at the beginning of the install sequence...
You mean
IF NOT REMOVE~="ALL" then
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("
filesys.DeleteFile "
End If
????
Posted by:
naveen.packager
13 years ago
Posted by:
anonymous_9363
13 years ago
If you get that script to work as it is, I'll send you 48 million US dollars. Besides, what makes anyone think that a script has magic powers to delete files that the standard actions can't? Holy cow...
Look, the file is probably in use by the system (most likely the browser) and consequently can't be deleted. It's simple enough to determine what process has a file locked. You can then build your package so that it tests to see if that process is running and, if it is, uses some logic to proceed. Some people just outright kill the offending process (they clearly love to antagonise their users). Others failt the install and log the "problem" and/or display an appropriate message.
Look, the file is probably in use by the system (most likely the browser) and consequently can't be deleted. It's simple enough to determine what process has a file locked. You can then build your package so that it tests to see if that process is running and, if it is, uses some logic to proceed. Some people just outright kill the offending process (they clearly love to antagonise their users). Others failt the install and log the "problem" and/or display an appropriate message.
Posted by:
cmi2000
13 years ago
ORIGINAL: VBScab
If you get that script to work as it is, I'll send you 48 million US dollars. Bsides, what makes anyone think that a script has magic powers to delete files that the standard actions can't? Holy cow...
As always... you're right... I'm not the best in the scripting business, may be the worst. I thought that adding 'True' in the vbscrict could force to delete the file.
I know what processes are using these files, they're explorer.exe and winlogon.exe... how can I kill the processes ? or how can I unlock the files to delete them?
Posted by:
timmsie
13 years ago
Posted by:
naveen.packager
13 years ago
If you get that script to work as it is, I'll send you 48 million US dollars. Bsides, what makes anyone think that a script has magic powers to delete files that the standard actions can't?
I mean't to say that adding true will force remove the file or folder and it may work for him. But i dint assure that.
Posted by:
anonymous_9363
13 years ago
...and *I* meant if you could make this
I'm trying hard to think of a file that might be held open by EXPLORER.EXE and/or WINLOGON.EXE that would be replaced by an ActiveX control (for that is surely what the bank software is installing, right?)...
So, out of curiosity, what's the file name and whose file is it, i.e. which company?
IF NOT REMOVE~="ALL" thenwork LOL
I'm trying hard to think of a file that might be held open by EXPLORER.EXE and/or WINLOGON.EXE that would be replaced by an ActiveX control (for that is surely what the bank software is installing, right?)...
So, out of curiosity, what's the file name and whose file is it, i.e. which company?
Posted by:
cmi2000
13 years ago
Posted by:
naveen.packager
13 years ago
Posted by:
cmi2000
13 years ago
Posted by:
anonymous_9363
13 years ago
I'm willing to bet that GBPSV.EXE is running as a service.
Start 'SERVICES.MSC' and see if there's a service with a name like 'GB[something]'. Or, quicker, see if you can find 'GBPSV.EXE' in the 'Services' list in the registry, beneath 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services'. The EXE name will appear in the 'ImagePath' value. You'll find all the service details there, enabling you to control the service in your package, i.e. stopping it before continuing the uninstall.
Start 'SERVICES.MSC' and see if there's a service with a name like 'GB[something]'. Or, quicker, see if you can find 'GBPSV.EXE' in the 'Services' list in the registry, beneath 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services'. The EXE name will appear in the 'ImagePath' value. You'll find all the service details there, enabling you to control the service in your package, i.e. stopping it before continuing the uninstall.
Posted by:
cmi2000
13 years ago
Nothing works, read this:
"G-Buster fights spyware acting like a spyware. It installs a service with no warning about that. It cannot be removed. It consumes system resources. It pools the registry to make sure nobody is going to remove it (nobody or other spywares). But if Process Monitor can kill the thread (allowing you to remove the registry keys), any software would be able to do that"
It has been written in a forum about this application, so I have no solution to this problem. This problem came with the software, it seems to be without solution.
Thank you anyway
"G-Buster fights spyware acting like a spyware. It installs a service with no warning about that. It cannot be removed. It consumes system resources. It pools the registry to make sure nobody is going to remove it (nobody or other spywares). But if Process Monitor can kill the thread (allowing you to remove the registry keys), any software would be able to do that"
It has been written in a forum about this application, so I have no solution to this problem. This problem came with the software, it seems to be without solution.
Thank you anyway
Posted by:
naveen.packager
13 years ago
Posted by:
cmi2000
13 years ago
Posted by:
admaai
13 years ago
Posted by:
cmi2000
13 years ago
No, I've tried with psfile (it was just for try, because it's for other application), with other tool called "DelLater" that mark a file to remove during the next restart, and other tools like that... but nothing work. Finally, we've decided to delete these files manually on each computer, using WinPE, later release the new package.
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.