Exclude an exe from superfetch/prefetch

Anonymous
2020-09-02T19:08:46+00:00

Hi!

As I know it prefetch/superfetch creates .pf files for all executables that were previously runned.

As such I don't want windows to make a specific executable's .pf file through prefetch because I don't want to disable  prefetch entirely for this.

Any help would be gratefull.Including registry edits if an entry could be successfully made that excludes the exe.

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

50 answers

Sort by: Most helpful
  1. Anonymous
    2020-09-04T16:31:26+00:00

    If that path works for you, great, but I am not sure what the extra set of quotes is for in the path.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-09-04T16:24:09+00:00

    So basically this was modified to make the game run properly

    START /D "E:\Games\Dark Souls III\Game" "" "DarkSoulsIII.exe"

    So is this code well and good?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2020-09-04T16:06:12+00:00

    So for timeout, that is simply wait operation so that we do not try to immediately delete the file from prefetch before it is created. 5 seconds was an arbitrary value, but I cannot tell you if it could be shorter or needs to be longer. You would need to monitor the prefetch folder to see how soon the exe is created in that folder before it can be deleted. Either way, because of that, you will have a command prompt open for x number of seconds.

    As for closing, you could add EXIT, but that should not be necessary. CLS is clear screen and would serve no purpose.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2020-09-04T14:49:53+00:00

    Just did it but unfortunately game didn't run.

    Also I saw two cmd window opening.One opens and closes while other points me to The location where I ran the .bat file and that window remains open.

    DarkSoulsIII.exe has some modified properties which are-

    Run as Admin

    Disable Fullscreen Optimisations

    Override High DPI Scaling Performed by Application

    So I did My Version And this is working but wanna confirm is this correct or something else has to be done in order to make this work much more properly(or is their a better way to launch game like for example using START /NORMAL /D ''E:\GamesXXX..." "" "DarkSoulsIII.exe")


    @ECHO OFF

    START /D "E:\Games\Dark Souls III\Game" "" "DarkSoulsIII.exe"

    TIMEOUT 10 > NUL

    DEL %windir%\Prefetch\DarkSoulsIII.*.pf

    ==========================================-

    And is it necessary to use words at the end like

    exit

    cls

    echo done.

    (I really dunno how this works just using my own brain here so please if there is any slightest problem in this script please tell.Wanna make it to successfully run and then properly bat script gets exited)

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2020-09-03T18:50:13+00:00

    In that case, change the path to: "E:\Program Files (x86)\Steam\steamapps\common\DARK SOULS III\Game\DarkSoulsIII.exe" or whatever the shortcut points to.

    As for the wildcard *, no that is part of command syntax.

    Was this answer helpful?

    0 comments No comments