flat assembler
Message board for the users of flat assembler.

Index > Windows > FASMW.INI File not found quick fix proggy

Thread Post new topic Reply to topic

Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 01 Sep 2011, 18:25
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

        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

section '.idata' import data readable

library user32,'user32.dll',\

include 'api/kernel32.inc'
include 'api/user32.inc'

In case some one runs into the same thing.
Post 01 Sep 2011, 18:25
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.