Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Returning Windows Environment Variables?

Engaged ,
Apr 10, 2018 Apr 10, 2018

I'm trying to access my windows user variables on the machine but when I use `getenv()` or `getenv_s()` it's not returning any data....

Looking at scripting you acess them with `$.getenv()` so what would be the correct function in the C++ api?

For either Automation or Filter.

TOPICS
SDK
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 11, 2018 Apr 11, 2018

The Windows API function is GetEnvironmentVariable or GetEnvironmentVariableW for Unicode. I would expect getenv to work too, unless you are setting the environment variable after Photoshop starts. Discussion: When What You Set is Not What You Get: SetEnvironmentVariable and getenv - CodeProject

Translate
Adobe
LEGEND ,
Apr 11, 2018 Apr 11, 2018

The Windows API function is GetEnvironmentVariable or GetEnvironmentVariableW for Unicode. I would expect getenv to work too, unless you are setting the environment variable after Photoshop starts. Discussion: When What You Set is Not What You Get: SetEnvironmentVariable and getenv - CodeProject

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 11, 2018 Apr 11, 2018
LATEST

Thanks TestScreen! Didn't even think of that library. No, getenv for some reason won't work with either the Automation or Listener...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines