flat assembler
Message board for the users of flat assembler.

Index > Windows > [solved]How to open Applet via ShellExecute?

Author
Thread Post new topic Reply to topic
Overclick



Joined: 11 Jul 2020
Posts: 466
Location: Ukraine
Overclick
Hi
I need to open Win settings applet by shortest way.

rundll32.exe Shell32.dll,Control_RunDLL Mmsys.cpl,,0
rundll32.exe Shell32.dll,Control_RunDLL Mmsys.cpl,,1

I'm trying to do
Code:
invoke ShellExecute,0,0,'rundll32.exe','Shell32.dll,Control_RunDLL Mmsys.cpl,,1',0,SW_SHOW
    


Last edited by Overclick on 12 Apr 2021, 13:51; edited 1 time in total
Post 10 Apr 2021, 21:06
View user's profile Send private message Visit poster's website Reply with quote
FlierMate



Joined: 21 Jan 2021
Posts: 219
FlierMate
Overclick wrote:
Hi
I need to open Win settings applet by shortest way.

rundll32.exe Shell32.dll,Control_RunDLL Mmsys.cpl,,0
rundll32.exe Shell32.dll,Control_RunDLL Mmsys.cpl,,1

I'm trying to do
Code:
invoke ShellExecute,0,0,'rundll32.exe','Shell32.dll,Control_RunDLL Mmsys.cpl,,1',0,SW_SHOW
    


This works....

Code:
format PE GUI 4.0
entry start

include 'win32a.inc'

section '.data' readable writable
       _caption  db 'SHELL',0
       _message  db 'Open Windows Settings?',0
       _param    db 'shell32.dll,Control_RunDLL mmsys.cpl,,0',0
       _file     db 'rundll32.exe',0

section '.code' code readable writable executable

start:
       invoke  MessageBox, 0, _message, _caption, MB_ICONQUESTION + MB_YESNO
       cmp     eax,IDYES
       jne     .exit

       invoke ShellExecute, 0, 0, _file, _param, 0, SW_SHOW

.exit:
       push eax
       call [ExitProcess]

section '.idata' import readable writable

       library kernel, 'KERNEL32.DLL',\
               user, 'USER32.DLL', \
               shell, 'SHELL32.DLL'

       import kernel,\
              ExitProcess, 'ExitProcess'

       import user,\
              MessageBox, 'MessageBoxA'

       import shell,\
              ShellExecute, 'ShellExecuteA'      
Post 12 Apr 2021, 12:29
View user's profile Send private message Reply with quote
Overclick



Joined: 11 Jul 2020
Posts: 466
Location: Ukraine
Overclick
Today my own example works for me too. It's quite strange Shocked

Thanks for force me to retry Smile
Post 12 Apr 2021, 13:47
View user's profile Send private message Visit poster's website 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.