I recently wrote some batch scripts to uninstall software and delete registry keys for my work.
I used the command in the script of:
wmic product where name="Software Name" call uninstall /nointeractive
This command did what it was supposed to as far as removing the software, but it still left the Add/Remove program entries. I did not think anything of it until I went to re-install.
The problem came up that I was unable to run the software installer again. I received a feature transfer error 1603 when trying to uninstall through Add/Remove programs and a error code of 1628 installation error
The only thing that I could think of on why the installer wouldn't complete was due to existing registry keys left over from install shield. I created a virtual machine, installed the software that was trying to install and launched the WMIC console.
In the WMIC console I types "product" to bring up a list of everything that has a MSI installer attached to it. This takes a bit to run if you have a lot installed on your PC. After the product command has completed you can scroll to the right and you will see the install shield reg value.
I used the REG DELETE command to remove that registry entry. Now I can uninstall the software from the command line with a batch file and re-install like normal.
Double check the installer code with the WMIC console to ensure the software install code did not change.
Hopefully this helps anyone that comes across this issue.
Labels
- android (1)
- Drupal (3)
- IP Cameras (4)
- IT Information Technology HTML Java Security (1)
- Linux (1)
- Windows (2)
Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts
Windows Command Prompt Batch Scripting
I was thinking about a way to automate some of the more things that support techs need to do at times and thought this would be a good time to do some batch scripting. I have done Unix/Linux shell scripting in the past for school and briefly on power shell but have not done it in a while.
The eventual goal of this script is have a single option run all of the options in the script and then output them to a text file. This is something that would help the support techs at my work automate network related tasks without having to remember a ton of commands and have the ability to gather all of the data that they need at once. This could also be sent out to our customers that could then run a menu-less version of this and email the text file back to for troubleshooting. Scripting is fun!!!!!!!!!!!!!!!!!!!!!!!
The eventual goal of this script is have a single option run all of the options in the script and then output them to a text file. This is something that would help the support techs at my work automate network related tasks without having to remember a ton of commands and have the ability to gather all of the data that they need at once. This could also be sent out to our customers that could then run a menu-less version of this and email the text file back to for troubleshooting. Scripting is fun!!!!!!!!!!!!!!!!!!!!!!!