I checked the folder and I noticed that in the second path there is a designerlauncher.exe file.
I wanna ask if in newer version has changed something about the paths or If I'm doing something wrong. I'm working in Perspective but the script file is in the Scripting folder.
Are you sure you are running this in the correct scope? the screen shot suggests its the script console, this will not work in the script console, but will (might) run on a button/ gateway scope
What I did was place it in a function and call it from the scripting console. I need to be able to get the correct path to my schemas folder. C:\Program Files\Inductive Automation\Ignition\data\projects\.files\schemas
Hard-coding it will work, but I need it to work for Linux and Windows, that's why I need to be able to get to the project folder independent of the OS.
The project script library has no inherent scope. It's a library. What matters is where you invoke it from.
In a Perspective context, even in the designer, your code will be running on the gateway. In the script console, your code will be running on the local machine you're running the designer on.