Miscellaneous > Miscellaneous Projects

Help! Questions on opening files withing an Assembly IDE

(1/3) > >>

Mike Anum:
Hi, I have a question, first time in this community BTW. So I want to know how I can execute, load or open a file, or call a file withing a parent process. I'm not sure what terms I'm supposed to use, so please excuse me if I sound confusing. But if anyone can direct me to finding more on how to do something similar to that, I'd appreciate it


Hi Mike,

There are many ways to do that from assembler. What exactly do you need it for?

Mike, tell us bit more of what you are trying to do, it will give us some idea of how to respond to your question.

Mike Anum:
I'm was trying to figure out how I could execute a program from the cmd line. I learned a little more on how to do that which is to use CREATE PROCESS which requres windows.inc, or masm32rt.inc but I now have linker error from executing it. I think it has to do with with my framework.c file because it executes correctly without it. I looked up the errors 2019 and 2001. It says either my _MainPROC doesn't exist or is duplicated somewhere else. However I my header needs framework.c to create a message box. If you have a work around I'd appreciate it
 see attached files

This will build, I annotated what the changes were.

    .MODEL FLAT, stdcall
    option casemap:none

    include \masm32\include\windows.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib

;;; INCLUDE io.h


    PrcName db 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe',0
    CmdLine db '/k "echo.&&'
            db 'echo Recover - Recover C:&&'
            db 'echo Wiz [?] - MBRWizard&&'
            db 'echo Exit    - Reboot"',0




start:              ; <<<<<<<<<< You need a start label

_main   proc

        INVOKE  CreateProcess,ADDR PrcName,ADDR CmdLine,NULL, NULL,NULL,

        INVOKE  ExitProcess,0

_main   endp

        end start   ; <<<<<<<<<< terminate the same label as the start label


[0] Message Index

[#] Next page

Go to full version