flat assembler
Message board for the users of flat assembler.

Index > Windows > How to find name of default program

Author
Thread Post new topic Reply to topic
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 27 Dec 2011, 02:48
Does anyone know away to find the name of default image viewer etc, in code.
Like if you click on a jpg the default program will open and show image.

Thanks advance.
Post 27 Dec 2011, 02:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20454
Location: In your JS exploiting you and your system
revolution 27 Dec 2011, 03:14
If you use explorer.exe as the program then it uses the registry to store the file extension mappings. Something like this:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithList



edit: For double click (to run) it goes like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.jpg\(default)=jpegfile

leads to:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\jpegfile\shell\Open\command\(default)=<some program name>
Post 27 Dec 2011, 03:14
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 27 Dec 2011, 05:12
Check also File Types and File Associations for more info.
Post 27 Dec 2011, 05:12
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 27 Dec 2011, 17:07
Thanks, for both your inputs i will look into them.
Post 27 Dec 2011, 17:07
View user's profile Send private message Reply with quote
Gunner



Joined: 28 Jul 2003
Posts: 17
Location: In my head
Gunner 28 Dec 2011, 01:02
You can use AssocQueryString to get a plethora of information about what opens what file.

_________________
~Rob (Gunner)
Forum Spam List Checker
Window Error Lookup Tool
and MORE!
Post 28 Dec 2011, 01:02
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.