Author Topic: ENVIRONMENT VARIABLES NOT WORKING  (Read 3636 times)

Firefoxian

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
ENVIRONMENT VARIABLES NOT WORKING
« on: June 21, 2021, 06:15:45 PM »
Please list examples where %USERPROFILE% and other variables work.
I use mine in retroarch appendconfig but it's not working and I don't thing the log file shows the final result.

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #1 on: June 21, 2021, 09:38:32 PM »
AM is case sensitive.
see readme, that AM supports environment variables

>this works/tested:
%SYSTEMROOT%\test.exe
%PROGRAMFILES%\test.exe
%APPDATA%\test.exe

>not working/can't get working:
%PROGRAMFILES%(X86)\test.exe
%USERPROFILE%\test.exe
%HOMEPATH%\test.exe
%ALLUSERSPROFILE%\test.exe
%PROGRAMDATA%\test.exe
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

Firefoxian

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #2 on: June 22, 2021, 12:00:32 AM »
like this
executable           $PROGDIR\..\RetroArch\retroarch.exe
args                 -L ..\RetroArch\cores\picodrive_libretro.dll "[romfilename]" --appendconfig "%USERPROFILE%\.RetroArch\config\sega 32x.cfg"

will this not work because it doesn't pass my line to an interpreter?

hermine.potter

  • Hero Member
  • *****
  • Posts: 767
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #3 on: June 23, 2021, 01:08:25 PM »
Sorry I don't know.
These all the environment variables i've quickly tested.
I'm using full paths and avoid any configuration in userprofile-folder. So I don't have these problems.
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #4 on: June 24, 2021, 09:02:03 PM »
Out of curiosity can you open the folder to the config file you want to use..and then copy the path give in the path bar?

People want life easy..then complain about it

Firefoxian

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #5 on: July 02, 2021, 11:02:50 PM »
show me an example of that.

akafox

  • Moderator
  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: ENVIRONMENT VARIABLES NOT WORKING
« Reply #6 on: July 04, 2021, 10:20:48 AM »
For the args
A. The core

1. Open your file manager
2. Click Local Disk C: on the left
3. Open the folder Users
4. Open your user's folder
4. Open AppData folder
5. Open Roaming
6. Open RetroArch
7. Open cores folder
8. Click the path bar (the thing that has "This PC > Local Disk (C:) > Users > [your user name] > AppData > RetroArch > cores )
9. (once clicked it will be highlighted) Right Click and copy the path (ex. C:\Users\username\AppData\Roaming\RetroArch\cores)
10. copy that into your AM system config file so you get -L C:\Users\username\AppData\Roaming\RetroArch\cores\[insert core here].dll

B. The config file
1. Follow steps above to step six.
2. Open the config folder
3. go to the system folder you want
4. Copy the path as you did above
5 paste the path in your args line to append your config file
6. at the end of that path enter the config file that you want to use

So you end up with:

executable           C:\Users\yourusername\AppData\Roaming\RetroArch\retroarch.exe
args                 -L  C:\Users\username\AppData\Roaming\RetroArch\cores\picodrive_libretro.dll "[romfilename]" --appendconfig "C:\Users\yourusername\AppData\Roaming\RetroArch\config\Sega 32x\sega 32x.cfg"


Note that my config files have the extension .opt NOT .cfg That should work. Yeah I know there are more elegant ways..but first let's try to find out why it is not working then we can mess around with path names and be clean about it.
People want life easy..then complain about it