News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

File association

Started by Force, January 19, 2015, 08:52:49 AM

Previous topic - Next topic

Force

Hello how can i open asm and inc files with qeditor.exe ?
i found an example code in old forum http://www.masmforum.com/board/index.php?topic=6561.0
but it does not worrk on win 7 32 bit ... Is there another example about it ?

Thanks

Force

sinsi

Right-click file, open with, choose default program, browse for qeditor.
🍺🍺🍺

Gunther

What a mess: A new spam bot.

Go away, leave your garbage elsewhere.

Gunther
You have to know the facts before you can distort them.

Force

Huh !...

bot ?   :icon_eek:


i didn't ask about virus codes or hacking tools.It was just a normal question
i asked same question in c forum .They replied with code kindly
i don't know what's wrong here ?
i think leaving this forum is better ....

fearless

There was a spam post by a bot, but its deleted now. He wasnt referring to your original post.

Gunther

Hi Force,

my reply had nothing to do with your original post. There was a spam producer in your thread, but Hutch did clean the mess. Go forward and best greatings.

Gunther
You have to know the facts before you can distort them.

Force

Sorry friends    i did not see it  so i missunderstood

jj2007

Hi Force,

You wanted code - here is what I hacked together tonight, see attachment (pure Masm32):

include \masm32\include\masm32rt.inc
include Associate.asm
uselib advapi32
.code
start:
  Associate "asmsrc", "C:\Masm32\qEditor.exe"      ; you must supply a valid drive letter
  mov ebx, fcreate("test.AsmSrc")
  .if ebx!=INVALID_HANDLE_VALUE
      fprintc ebx, "Just a test\nMasm32 is great"
      fclose ebx
      .if rv(ShellExecute, 0, 0, "test.AsmSrc", 0, 0, SW_RESTORE)<=32
            MsgBox 0, LastError$(), "No luck:", MB_OK
      .endif
  .endif
  exit
end start

Tested on Win7-64 and Win XP. You might need admin rights, but test yourself.
EDIT: Please download again - the stack was not balanced. Associate.zip is the correct version.

Force

Thank you jj2007

i think i need  to include  manifest xml file for admin right

i found this but i didnt test yet

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>