Windows 10: Need help with batch file

Discus and support Need help with batch file in Windows 10 Support to solve the problem; No serious Batch file or scripting experience, so bear with me. We use a site for our business that has to run on IE and has to have the cache cleared... Discussion in 'Windows 10 Support' started by mike6623, Jan 18, 2017.

  1. mike6623 Win User

    Need help with batch file


    No serious Batch file or scripting experience, so bear with me. We use a site for our business that has to run on IE and has to have the cache cleared a certain way sometimes for it to function.

    We have to go IE options, uncheck delete history on exit - go to delete browsing hisotry and
    uncheck preserve favorites
    check the rest
    delete/apply

    Then we have to go in the IE settings and go to delete browsing hisotry and
    Check preserve favorites
    Uncheck Temp files
    Uncheck cookies
    Delete/apply

    Having end users attempt to follow these directions has been a nightmare and so has manually doing this, either in person or remotely to over 290 pc's.

    All are on Windows 7 pro

    What can I create 2 shortcuts that, when double clicked, will execute those commands?
    I will push the shortcuts via gpo so that part I am good with

    Any help or advice would be great.

    :)
     
    mike6623, Jan 18, 2017
    #1

  2. microsoft should make a store app for just batch files or vbs scripts and software

    so I was thinking people could make help full batch files that will help people so they do not have to do a lot of typing to fix their pc .

    We all know that batch files are very powerful scripts. SO if you can use the batch files and vbs to help others all the batch files should be free. This could help millions of people or get people to start making batch files to . I want this to happen .and
    apply the new store app so it comes through an update not get it from the store.
     
    PeterTjapkes, Jan 18, 2017
    #2
  3. How to set an Ethernet Connection as Metered to control Updates, Drivers, Store and others

    so you cant run the batch file without taking ownership of that reg key, but this program changes your Ethernet to metered with a simple click.. unbelievable.

    Downloads / Software / Winaero Tweaker

    this still doesn't help me. I need to automate this and make it metered for all desktops on my network.

    any idea why the batch wouldn't work. The commands in the batch file are supposed to change ownership. Did i miss something?
     
    Kenneth Santiago, Jan 18, 2017
    #3
  4. Samuria Win User

    Need help with batch file

    The best is to use a free program called autoit which is a programing language AutoIt its free and makes writing complex scripts simple you can then compile to an exe and run like any windows app. You will find you can create all sorts of apps very simply see tutor Tutorial - WinZip what makes it so good is can download a macro recorder so you record what you want it then produces the code for you as simple as that lots of video tutors for it Autoit Tutorials Part 2 Record and Play back using AU3Recorder - YouTube
     
    Samuria, Jan 18, 2017
    #4
  5. mike6623 Win User
    Thanks, much appreciated, but I am more into learning how to complete these task instead of a program doing it for me.
     
    mike6623, Jan 18, 2017
    #5
  6. Samuria Win User
    You can use both write the code or use the macro using the macro ois a quick way to learn there are lots of forums and help for it its been about for years and very powerful offering a lot more than cmd files
     
    Samuria, Jan 18, 2017
    #6
  7. Pyprohly Win User
    Hi,

    Try this,
    Code: @echo off RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess Flags:8389627 reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "ClearBrowsingHistoryOnExit" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "UseAllowList" /t REG_DWORD /d 1 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanTIF" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanCookies" /t REG_DWORD /d 0 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanHistory" /t REG_DWORD /d 1 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanDownloadHistory" /t REG_DWORD /d 1 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanForms" /t REG_DWORD /d 1 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanPassword" /t REG_DWORD /d 1 /f reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "CleanTrackingProtection" /t REG_DWORD /d 1 /f[/quote] Or perhaps a little more complex:
    Code: @echo off RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess Flags:8389627 for %%I in ( ClearBrowsingHistoryOnExit:0 UseAllowList:1 CleanTIF:0 CleanCookies:0 CleanHistory:1 CleanDownloadHistory:1 CleanForms:1 CleanPassword:1 CleanTrackingProtection:1 ) do ( for /f "tokens=1,2 delims=:" %%I in ("%%~I") do ( reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "%%~I" /t REG_DWORD /d "%%~J" /f ) )[/quote]
     
    Pyprohly, Jan 18, 2017
    #7
  8. mike6623 Win User

    Need help with batch file

    Or perhaps a little more complex:
    Code: @echo off RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess Flags:8389627 for %%I in ( ClearBrowsingHistoryOnExit:0 UseAllowList:1 CleanTIF:0 CleanCookies:0 CleanHistory:1 CleanDownloadHistory:1 CleanForms:1 CleanPassword:1 CleanTrackingProtection:1 ) do ( for /f "tokens=1,2 delims=:" %%I in ("%%~I") do ( reg add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Privacy" /v "%%~I" /t REG_DWORD /d "%%~J" /f ) )[/quote] [/quote] Thanks man! I will give that a shot and report back! Thanks a lot! Not being familiar with this, does this include the "unchecking" of preserve favorites, then rechecking it? I just am not sure how to read them in full and I know we are to keep the "delete browsing history on exit" UNCHECKED. This is just for when they experience a certain issue
     
    mike6623, Jan 18, 2017
    #8
  9. Pyprohly Win User
    It just checks it. Because the checks are only a visual thing, only the final state matters. The registry edits handle the checking. If you need a different arrangement of checks, you can change what is to be checked or not by swapping zeros for ones or vice versa according to your needs. A ‘1’ means checked, ‘0’ unchecked.

    The actual clean up operation happens with the RunDll32 command which will clean up browsing history as if all options were checked except “Preserve Favorites website data”. What is actually cleaned up is not configureable. Did you need this to be?
     
    Pyprohly, Apr 4, 2018
    #9
Thema:

Need help with batch file

Loading...
  1. Need help with batch file - Similar Threads - Need help batch

  2. Help with a batch file

    in Windows 10 Network and Sharing
    Help with a batch file: I got the batch file to delete Skype-Setup.exe in the specified folder, but then it keeps repeating. Apparently I am missing something in the command.I didn't see anything relevant in forfiles /?C:\WINDOWS\system32>forfiles /P "C:\Users\Robert Allen...
  3. Help with a batch file

    in Windows 10 Gaming
    Help with a batch file: I got the batch file to delete Skype-Setup.exe in the specified folder, but then it keeps repeating. Apparently I am missing something in the command.I didn't see anything relevant in forfiles /?C:\WINDOWS\system32>forfiles /P "C:\Users\Robert Allen...
  4. Help with a batch file

    in Windows 10 Software and Apps
    Help with a batch file: I got the batch file to delete Skype-Setup.exe in the specified folder, but then it keeps repeating. Apparently I am missing something in the command.I didn't see anything relevant in forfiles /?C:\WINDOWS\system32>forfiles /P "C:\Users\Robert Allen...
  5. Need help with batch file

    in Windows 10 Support
    Need help with batch file: Hi all, I need a batch file to do the following: If this is the first time the batch is run: Do command one If this is the second, third or fourth time the batch is run: Do command two If this is the fifth time the batch is run: Do command three Start all over again as if the...
  6. Need help to create a batch file

    in Windows 10 Support
    Need help to create a batch file: Hi Folks, I need to create a batch file that automatically takes permissions & delete the following file & folders File:- C:\Windows\System32\SecurityHealthSystray.exe Folders:-...
  7. Batch File Help

    in Windows 10 Support
    Batch File Help: I'll be the first to say that I have never made a batch file. I've seen them and even ran them, but never made one. What I would like to do is at 9:00 P.M. copy files from one drive to another drive. And have this process repeat it's self daily. I know that I can put this...
  8. Batch File help!

    in Windows 10 Ask Insider
    Batch File help!: I'm trying to run a batch file that scans the network for a set IP range. When I run the commands individually through command prompt they work just fine. I've saved the txt file as both a .cmd, and .bat. I've also ran both as administrator, as well as navigating to the...
  9. Need batch file help

    in Windows 10 Support
    Need batch file help: I want to create a script to start a game at E:\Grand Theft Auto V\PlayGTAV.exe and wait one minute and then open an existing batch file at E:\Grand Theft Auto V\GTAV Hardcore.bat What do I have to add to the following? start /b "" "E:\Grand Theft Auto V\PlayGTAV.exe" start...
  10. Batch File Help

    in Windows 10 Software and Apps
    Batch File Help: I've never dabbled much in batch files, as I've usually been able to find pre-made ones to do what I wanted. We have an application that handles user data backups. It has three services, and at times, one or two of the three don't start automatically. If you stop and start...