Since people are working from home now, and not on the network, I have been trying to write a script to uninstall programs over the internet. I have done this before for laptops on the network, and set it as a login script for a user with admin privs. Then we just login to the laptop with that user, and the script launches and does the uninstall.<\/p>\n
Now, I can use our MDM to push out the script, and then click to run it, but it will ask for admin user and password. It works when I put in the credentials, but I can’t do that for every laptop. Is there some way to embed the admin username and password into the script so that it runs quietly and uninstalls the program?<\/p>\n
Here is the script. I have seen variations of the script that uses psiexec but that is not installed on the laptop. There’s also one that uses wmic, but I don’t know how to use that, and I don’t think it works locally on the PC.<\/p>\n
@ECHO<\/span> OFF Since people are working from home now, and not on the network, I have been trying to write a script to uninstall programs over the internet. I have done this before for laptops on the network, and set it as a login script for a user with admin privs. Then we just login to the laptop with that user, and the script launches and does the uninstall.<\/p>\n Now, I can use our MDM to push out the script, and then click to run it, but it will ask for admin user and password. It works when I put in the credentials, but I can’t do that for every laptop. Is there some way to embed the admin username and password into the script so that it runs quietly and uninstalls the program?<\/p>\n Here is the script. I have seen variations of the script that uses psiexec but that is not installed on the laptop. There’s also one that uses wmic, but I don’t know how to use that, and I don’t think it works locally on the PC.<\/p>\n @ECHO<\/span> OFF
\nREM — Uninstall Classroom Windows
\nMsiExec /X{10356733-7D4D-4007-9427-37BD1CB7D646} /quiet
\nREM — Uninstall NWEA Secure Testing Browser
\nMsiExec /I{8d32f6ed-a95e-44e2-af74-a66fd1f260b8} /quiet
\nREM — Uninstall Teams Machine-Wide Installer
\nMsiExec /I{731F6BAA-A986-45A4-8936-7C3AAAAA760B} /quiet<\/p>","upvoteCount":6,"answerCount":3,"datePublished":"2020-04-10T21:49:14.000Z","author":{"@type":"Person","name":"joshclinard2","url":"https://community.spiceworks.com/u/joshclinard2"},"suggestedAnswer":[{"@type":"Answer","text":"
\nREM — Uninstall Classroom Windows
\nMsiExec /X{10356733-7D4D-4007-9427-37BD1CB7D646} /quiet
\nREM — Uninstall NWEA Secure Testing Browser
\nMsiExec /I{8d32f6ed-a95e-44e2-af74-a66fd1f260b8} /quiet
\nREM — Uninstall Teams Machine-Wide Installer
\nMsiExec /I{731F6BAA-A986-45A4-8936-7C3AAAAA760B} /quiet<\/p>","upvoteCount":6,"datePublished":"2020-04-10T21:49:14.000Z","url":"https://community.spiceworks.com/t/uninstall-script/758713/1","author":{"@type":"Person","name":"joshclinard2","url":"https://community.spiceworks.com/u/joshclinard2"}},{"@type":"Answer","text":"