@echo off
set "APPDATA=%~dp0_data\User\AppData\Roaming"
set "ALLUSERSPROFILE=%~dp0_data\ProgramData"
set "HOMEPATH=%~dp0_data\User"
set "LOCALAPPDATA=%~dp0_data\User\AppData\Local"
set "ProgramData=%~dp0_data\ProgramData"
set "USERPROFILE=%~dp0_data\User"
set "PUBLIC=%~dp0_data\Public"
if not exist "%APPDATA%" ( md "%APPDATA%")
if not exist "%ALLUSERSPROFILE%" ( md "%ALLUSERSPROFILE%")
if not exist "%HOMEPATH%" ( md "%HOMEPATH%")
if not exist "%LOCALAPPDATA%" ( md "%LOCALAPPDATA%")
if not exist "%USERPROFILE%" ( md "%USERPROFILE%")
if not exist "%PUBLIC%" ( md "%PUBLIC%")
if not exist "%USERPROFILE%\Desktop" (
md "%USERPROFILE%\Desktop"
)
if not exist "%USERPROFILE%\Documents" (
md "%USERPROFILE%\Documents"
)
if not exist "%PUBLIC%\Documents" (
md "%PUBLIC%\Documents"
)
start "" "%~dp0Ace7Game.exe"
It works in Windows but not in wine. The game does not use the env var.
Can this be fixed to have the same behaviour like in windows?
Do you mean the batch script doesn't work or the program doesn't use the changed variables?
You can check the functionality of the batch script with set.
wine cmd
# Change to the batch script directory if necessary
# c:
# cd path\to\batch\file\directory
# Check the current variables
set
# run the batch file
batch_file.bat
# Check if the variables have changed
set
The program does not use the changes variables. I also have checked the variables with "set".
They changed, but the programm doesn't use them.
Also did this with a AutoHotKey script. Doesn't work either.
The apps write in the usual AppData directories.
C:\test>test.bat
Appdata at the start: C:\users\floris\AppData\Roaming
Appdata after set: C:\test\_data\User\AppData\Roaming
011c:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
AppData is: C:\users\floris\AppData\Roaming
C:\test>test.bat
Appdata at the start: C:\Users\floris\AppData\Roaming
Appdata after set: C:\test\_data\User\AppData\Roaming
AppData is: C:\test\_data\User\AppData\Roaming
@echo off
echo Appdata at the start: %APPDATA%
set "APPDATA=%~dp0_data\User\AppData\Roaming"
set "ALLUSERSPROFILE=%~dp0_data\ProgramData"
set "HOMEPATH=%~dp0_data\User"
set "LOCALAPPDATA=%~dp0_data\User\AppData\Local"
set "ProgramData=%~dp0_data\ProgramData"
set "USERPROFILE=%~dp0_data\User"
set "PUBLIC=%~dp0_data\Public"
if not exist "%APPDATA%" ( md "%APPDATA%")
if not exist "%ALLUSERSPROFILE%" ( md "%ALLUSERSPROFILE%")
if not exist "%HOMEPATH%" ( md "%HOMEPATH%")
if not exist "%LOCALAPPDATA%" ( md "%LOCALAPPDATA%")
if not exist "%USERPROFILE%" ( md "%USERPROFILE%")
if not exist "%PUBLIC%" ( md "%PUBLIC%")
if not exist "%USERPROFILE%\Desktop" (
md "%USERPROFILE%\Desktop"
)
if not exist "%USERPROFILE%\Documents" (
md "%USERPROFILE%\Documents"
)
if not exist "%PUBLIC%\Documents" (
md "%PUBLIC%\Documents"
)
echo Appdata after set: %APPDATA%
"%~dp0test.exe"