none
Strange issue with my Scrip (install an app) Newbie trying to learn RRS feed

  • Question

  • Hello 

    I have been asked to put together a script to uninstall an application and install another application (this will be deployed through SCCM). Pleased to report I managed to get the script working. 

    Basically, the script needs to stop two processers before uninstalling the application -

    Needs to temporary stop explorer (application needs to remove a folder from the user's library)

    We then uninstall the application, then installs the new application 

    This all works (amazingly) 

    the issue I have is when I restart explorer.exe - I get a command prompt called explorer.exe 

    I have checked my Shell environment and it points to explorer (in the registry) 

    Same on any computer I run the script on 

    @echo off
    setlocal
    set Installpath=%~dp0
    
    :start
    tasklist|find "BoxSync.exe"
    goto found
    :found
    taskkill /f /im BoxSync.exe
    
    goto BoxMonitor
    
    :BoxMonitor
    tasklist|find "BoxSyncMonitor.exe"
    goto found
    
    :found
    taskkill /f /im BoxSyncMonitor.exe
    
    goto explorer
    
    :explorer
    taskkill /F /IM "explorer.exe"
    MsiExec.exe /X{CD5CB679-159B-4E4C-B847-B29B492D106E} /quiet
    
    %Installpath%BoxSyncSetup.exe /uninstall /quiet
    del C:\Users\%userProfile%\Box Sync
    
    %Box-x64.msi /quiet
    
    start "explorer.exe"
    start "BOX.exe"



    • Edited by ThomasBlackNewcastle Thursday, February 21, 2019 9:52 AM updated
    • Moved by Bill_Stewart Wednesday, September 4, 2019 5:56 PM This is not "fix/debug/rewrite script for me" forum
    Wednesday, February 20, 2019 9:56 AM

All replies

  • Please DO NOT post colorized code in this forum.  Use the code posting tool provided on the edit bar.

    Please fix all of your post.  It is unreadable and has random HTML strings. Turn off Grammarly when using these forums.


    \_(ツ)_/

    Wednesday, February 20, 2019 10:29 AM
  • You code is mostly HTML with some hard to read batch commands.  Please take the time to post code and text that is readable and formatted properly.  If you make it hard to read or understand no one will answer your request.


    \_(ツ)_/

    Thursday, February 21, 2019 12:54 AM