TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Combine two commands

    Scheduled Pinned Locked Moved Windows
    4 Posts 4 Posters 2.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mark kreger
      last edited by mark kreger

      Is there a way to combine delete browser history and the clean up commands? Possibly clearing Chromes history as well as internet explorer?

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @mark kreger
        last edited by

        @mark-kreger, you could create a c:\tools folder, and in it, create a ClearHistory.bat file in it with these contents:

        REM Clear IE history:
        rundll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
        
        REM Clear Chrome history:
        cd /d C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data
        del /s History*
        

        Then create a TRIGGERcmd command that runs c:\tools\ClearHistory.bat

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • S Offline
          StartServer
          last edited by

          I have the issue that the cmd window stays open after executing the bat file.
          Usually cmd.exe /c or start /c would close the window. Here adding /c would not work at all. 😢
          Thoughts?

          1 Reply Last reply Reply Quote 0
          • XanderX Offline
            Xander
            last edited by

            You should just be able to add an "Exit" command at the end of your batch.

            Or, you can 'pipeline' your commands by putting the | command in between them:

             cd /d C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data | del /s History*
            
            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post