Hi all. Couldn’t find what I was looking for in search.<\/p>\n
I need to modify a script to where when the UNINSTALL is called it will uninstall 2 things. First is Keeper and the second being Keeper for IE<\/p>\n
I have tried -and, “;” , different combos of stuff. Instead of throwing out my laptop I came here.<\/p>\n
switch ($strType){ } THIS WORKS BY ITSELF ^^^^^<\/p>\n THIS DOESNT WORK WHEN ADDED. NEED BOTH TO RUN WHEN UNINSTALL IS RAN<\/p>\n MSI -varType 1 -strName “Keeper for Internet Explorer 11.0.5” -strExe “msiexec.exe” -strArguments “/X{054F80F5-E204-4675-8C61-98D27B5A9082}”,“/qn”,“/l*v “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{054F80F5-E204-4675-8C61-98D27B5A9082}” -strRegValue “DisplayName” Hi all. Couldn’t find what I was looking for in search.<\/p>\n I need to modify a script to where when the UNINSTALL is called it will uninstall 2 things. First is Keeper and the second being Keeper for IE<\/p>\n I have tried -and, “;” , different combos of stuff. Instead of throwing out my laptop I came here.<\/p>\n switch ($strType){ } THIS WORKS BY ITSELF ^^^^^<\/p>\n THIS DOESNT WORK WHEN ADDED. NEED BOTH TO RUN WHEN UNINSTALL IS RAN<\/p>\n MSI -varType 1 -strName “Keeper for Internet Explorer 11.0.5” -strExe “msiexec.exe” -strArguments “/X{054F80F5-E204-4675-8C61-98D27B5A9082}”,“/qn”,“/l*v “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{054F80F5-E204-4675-8C61-98D27B5A9082}” -strRegValue “DisplayName” Welcome!<\/p>\n If you post code, please use the ‘Insert Code’ button. Please and thank you!<\/p>
\n“install” {
\nMSI -varType 0 -strName “Keeper Password Manager 12.0.0” -strExe “msiexec.exe” -strArguments “/i \"$PSScriptRoot\\KeeperPasswordManager12.0.0.msi<\/code>”“,”/qn\",“ALLUSERS=1”,“/l*v
\"$strLogPath\\MSIInstall.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{FAACF639-1338-4145-90DA-D95C90DEFC0B}” -strRegValue “DisplayName”<\/p>\n
\n“uninstall” {
\nMSI -varType 1 -strName “Keeper Password Manager 12.0.0” -strExe “msiexec.exe” -strArguments “/X{FAACF639-1338-4145-90DA-D95C90DEFC0B}”,“/qn”,“/l*v \"$strLogPath\\MSIUninstall.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{FAACF639-1338-4145-90DA-D95C90DEFC0B}” -strRegValue “DisplayName”<\/p>\n
\n\"$strLogPath\\MSIUninstallIE.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey<\/p>\n
\n}
\n}<\/p>","upvoteCount":3,"answerCount":4,"datePublished":"2018-07-06T15:04:22.000Z","author":{"@type":"Person","name":"bobbyjive88","url":"https://community.spiceworks.com/u/bobbyjive88"},"suggestedAnswer":[{"@type":"Answer","text":"
\n“install” {
\nMSI -varType 0 -strName “Keeper Password Manager 12.0.0” -strExe “msiexec.exe” -strArguments “/i \"$PSScriptRoot\\KeeperPasswordManager12.0.0.msi<\/code>”“,”/qn\",“ALLUSERS=1”,“/l*v
\"$strLogPath\\MSIInstall.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{FAACF639-1338-4145-90DA-D95C90DEFC0B}” -strRegValue “DisplayName”<\/p>\n
\n“uninstall” {
\nMSI -varType 1 -strName “Keeper Password Manager 12.0.0” -strExe “msiexec.exe” -strArguments “/X{FAACF639-1338-4145-90DA-D95C90DEFC0B}”,“/qn”,“/l*v \"$strLogPath\\MSIUninstall.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey “HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall{FAACF639-1338-4145-90DA-D95C90DEFC0B}” -strRegValue “DisplayName”<\/p>\n
\n\"$strLogPath\\MSIUninstallIE.log<\/code>”\",“REBOOT=ReallySuppress” -strRegKey<\/p>\n
\n}
\n}<\/p>","upvoteCount":3,"datePublished":"2018-07-06T15:04:23.000Z","url":"https://community.spiceworks.com/t/string-together-two-uninstall-commands-in-powershell/660610/1","author":{"@type":"Person","name":"bobbyjive88","url":"https://community.spiceworks.com/u/bobbyjive88"}},{"@type":"Answer","text":"