1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to write a command prompt command to uninstall program?

Discussion in 'Windows - Software discussion' started by DVD7227, Mar 28, 2012.

  1. DVD7227

    DVD7227 Regular member

    Joined:
    Dec 3, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    26
    Hi guys,

    I need some quick help with finishing this batch file.

    My batch file includes commands with quickly removing directories and files but it needs one thing I can't get to work properly.

    My question is how to write a command prompt command to uninstall a program?

    Here is my current batch file setup -

    echo off
    color 2
    pause
    TASKKILL /IM NetClient.exe
    TASKKILL /IM cellularplugincontroller.exe
    TASKKILL /IM netcfgsvr.exe
    TASKKILL /IM netclientsvc.exe
    TASKKILL /IM netlogsvc.exe
    TASKKILL /IM netmsg.exe
    TASKKILL /IM comsmithmicrosdkserver.exe
    call "C:\Program Files\SOTI\MobiControl\Uninstall.bat"
    net user student /del
    net user username ""
    rd /s /q "C:\Users\UserName\Desktop\Software - Be Careful"
    del /s /q "C:\Users\UserName\Desktop\Help_LION_Audio_Issues.pdf"
    rd /s /q "C:\Program Files\SOTI"
    del /s /q "C:\Users\UserName\Desktop\Connect to At&T Network"
    DISM /online /enable-feature /featurename:Internet-Explorer-Optional-x86
    wmic
    product where name="AT&T Global Network Client LaptopConnect Edition" call uninstall
    Y
    exit
    shutdown -s

    Hope you guys can help, still having trouble with the AT&T part as I see it.

    Still new to this but I'll manage with instructions.

    Thanks again
     
  2. ps355528

    ps355528 Active member

    Joined:
    Aug 17, 2010
    Messages:
    1,059
    Likes Received:
    26
    Trophy Points:
    78
    Ffirst check for typos.. and don't you need to be a lot more specific when you call the uninstall routine?

    These primitive dos things look very strange to my eyes these days.. what dos version is it for anyhow? I don't remember "uninstall" being a batch file command.. $uninstall" could be, calling a pre determined subroutine from a specified location set in a variables array or loaded with a get $="uninstall".. that looks far too much like C++ for my liking tho.. too many years scripting for linux and perl :)

    This should help..

    http://www.dostips.com/DtTutoFunctions.php
     
  3. DVD7227

    DVD7227 Regular member

    Joined:
    Dec 3, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    26
    Thanks man I got it to work.
     
  4. ddp

    ddp Moderator Staff Member

    Joined:
    Oct 15, 2004
    Messages:
    39,153
    Likes Received:
    134
    Trophy Points:
    143
    ps355528 is a she not a he.
     
  5. DVD7227

    DVD7227 Regular member

    Joined:
    Dec 3, 2004
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    26
    oh sorry ps355528, thanks for helping out again.
     

Share This Page