The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: UtillMasm on April 21, 2009, 08:53:08 AM

Title: ShellExecuteA problem?
Post by: UtillMasm on April 21, 2009, 08:53:08 AM
ShellExecuteA problem?

I'm leaning Windows API ShellExecuteA in RadASM Version 2.2.1.2 Source, and now have one question as below:

     invoke ShellExecute,hWnd,NULL,addr buffer3,addr buffer1,addr buffer2,SW_SHOWDEFAULT
      ;004139F5
       ;push 0A
        ;IsShown
       ;lea eax,dword ptr ss:[ebp-300]
       ;push eax
        ;DefDir
         ;"C:\china"
          ;00h byte terminated
       ;lea eax,dword ptr ss:[ebp-200]
       ;push eax
        ;Parameters
         ;/subsystem:windows /libpath:C:\GeneSys\lib "C:\china\AddSection.obj" "C:\china\AddSection.res"
          ;00h byte terminated
       ;lea eax,dword ptr ss:[ebp-400]
       ;push eax
        ;FileName
         ;"C:\GeneSys\bin\link.exe"
          ;00h byte terminated
       ;push 0
        ;Operation
       ;push dword ptr ds:[4516A0]
        ;hWnd
       ;call <jmp.&shell32.ShellExecuteA>

the ShellExecuteA success, but the result FILE AddSection.exe in C:\masm32 folder!
not in C:\china folder!

why? :eek
Title: Re: ShellExecuteA problem?
Post by: Vortex on April 21, 2009, 06:31:38 PM
Try is this one :

/subsystem:windows /OUT:C:\China\AddSection.exe /libpath:C:\GeneSys\lib "C:\china\AddSection.obj" "C:\china\AddSection.res"