Share via

How to create permanent environment variable but only for a single .exe file

Anonymous
2020-11-26T14:20:18+00:00

To resolve an issue on my high-resolution screen when using a particular board game app, I have been correctly advised to use a workaround KIVY_METRICS_FONTSCALE=2 instruction in the CMD screen, which enlarges fonts. Its a GitHub developer's app and he will release permanent adjustments in due course.

For now, he has helpfully suggested that, instead of always having to resolve the issue by keying in 'set KIVY_... ' then starting his app, both within the CMD screen every time, I could add the KIVY variable to my User Environmental Variables (not the System Variables). That way, I could just click to start the app in the normal way, with having to use the CMD screen steps each time.

What exactly should I type in the Advanced Settings EV NEW dialogue boxes to establish the variable, so that it only affects this particular app? Reason: there may be other apps in my PC using Kivy stuff which do not require this font scaling adjustment and a global variation might wrongly interfere with them.

Thank you!

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

Answer accepted by question author

Anonymous
2020-11-26T17:45:31+00:00

You could create your own shortcut to launch your application. It would look like so:

cmd.exe /c set KIVY_METRICS_FONTSCALE=2 & "C:\Program Files\YourAppFolder\YourApp.exe"

Please remember to mark my reply by clicking "Did this solve your problem?". It's your way of saying "Thank you".

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-11-27T13:03:56+00:00

    By the way, I think /k was required in my particular case, rather than /c, because the app in question was downloaded in Phython source code. I hadn't explained that. This means the CMD prompt needs to stay open to run the app. Apparently /c closes CMD, whereas /k keeps it open.

    This is correct.

    Thanks for the feedback.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2020-11-27T11:49:17+00:00

    By the way, I think /k was required in my particular case, rather than /c, because the app in question was downloaded in Phython source code. I hadn't explained that. This means the CMD prompt needs to stay open to run the app. Apparently /c closes CMD, whereas /k keeps it open.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2020-11-27T11:17:09+00:00

    Frederik,

    After a couple of unsuccessful attempts, I included the file path for the cmd.exe itself and used /k rather than /c. (I didn't work this out myself: just opened up Properties in a CMD shortcut to unearth its details ... followed by some Googling about /c etc.)

    Then perfection!!

    Thanks so much for your help on this. Much appreciated. Couldn't have done it without you.

    Was this answer helpful?

    0 comments No comments