I have FASM on my Flash and when I plug it in on a different a computer. The drive path changes and I get this error
So I just made this little program to fix the ini file every time the drive changes.
format pe gui 4.0
entry start
include 'win32ax.inc'
section '.blob' code readable executable writeable
path rb 100h
ini db 'INCLUDE'
buff rb 110h
iniFile rb 100h
key db 'Include',0
env db 'Environment',0
start:
push path
push 100h
call [GetCurrentDirectory]
;ini file section
cinvoke wsprintf,buff,'%s\INCLUDE',path ;OK
;ini file location
cinvoke wsprintf,iniFile,'%s\FASMW.INI',path ;OK
;Attempt a fix
invoke WritePrivateProfileString,env,key,buff,iniFile
ret
section '.idata' import data readable
library user32,'user32.dll',\
kernel32,'kernel32.dll'
include 'api/kernel32.inc'
include 'api/user32.inc'
In case some one runs into the same thing.