L
L
LearnOne2022-04-16 11:34:56
assembler
LearnOne, 2022-04-16 11:34:56

Copying to fasm with path?

format pe gui
include 'win32ax.inc'
;//----------
.data
path db ?
oldFile   db   'C:\Users\%username%\AppData\Local\BlueStacks\log.txt',0
newFile   db   'C:\Testing\info',0
;//----------
.code
start:
invoke  CopyFile,oldFile,newFile,0
invoke  ExitProcess,0

;//------------
.end start

%username% and other variables don't work.
I suppose somehow through ExpandEnvironmentString.
But I can't figure it out. Please help.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2022-04-16
@LearnOne

I suppose somehow through ExpandEnvironmentString.
But I can't figure it out.

What to understand, in ExpandEnvironmentStrings ? Give her a line with variables as input, a buffer where she will write a line with substituted values ​​and its size. Then give this buffer to the CopyFile input.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question