6

I have the following folder structure for one of my tools:

  • Original
  • Scripts

In my scripts folder I have a .bat-script which runs a .exe-file in my Original-folder. This .exe requires a few compatibility modes like:

  • run with Windows 98
  • run at 640x480
  • run 265bit mode
  • disable fullscreen optimizations

Therefore my question is - how do you set all these compatibility options with in a script when you not know the whole path (just that you have to go one directory up and into the specified path) ?

Thank you for your help Greetings

Reg Edit
  • 4,886
AlphaInc.
  • 189

1 Answers1

5

I've figured it out how to do so. In case somebody wants to do the same here's how it goes:

REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v \""C:\Path\to\exe.exe\" /t REG_SZ /d "WIN95" /f

If you want to add more than one attribute you have to change the part after /d, for example:

/d "WINXPSP3 256COLOR 640X480"

And last but not least if you want to do it from the directory you're currently into you change the path according to this:

/v "%CD%\exe.exe"

  • Other compatibility options:

enter image description here

Io-oI
  • 9,237
AlphaInc.
  • 189