Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Windows
»
How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved]
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Status of FPC 3.4.0 or FP...
by
robert rozee
[
Today
at 11:23:59 am]
We are starting to use La...
by
440bx
[
Today
at 11:22:33 am]
lazarus information aand ...
by
LeP
[
Today
at 11:19:12 am]
Free Pascal for a small e...
by
dbannon
[
Today
at 10:36:13 am]
Howto : Double buffer wit...
by
biologic
[
Today
at 09:22:37 am]
How to determine the unkn...
by
LV
[
Today
at 08:28:40 am]
[ANN] fpGUI Toolkit v2.0....
by
Seenkao
[
Today
at 07:40:58 am]
How to start LAMW emulato...
by
Seenkao
[
Today
at 07:34:17 am]
My AGGPas examples
by
Graeme
[
Today
at 02:52:48 am]
Reporting a Bug? in Strin...
by
Bart
[
Today
at 01:48:34 am]
QuestionDlg does strange ...
by
Martin_fr
[
Today
at 01:16:29 am]
SoundTracker Player Libra...
by
hukka
[
Today
at 01:01:39 am]
it2play - IT/S3M module r...
by
hukka
[
Today
at 12:47:05 am]
Reflection and Review in ...
by
jwdietrich
[February 14, 2026, 09:53:31 pm]
fpGUI Toolkit v2.0.1 has ...
by
cdbc
[February 14, 2026, 09:32:46 pm]
LazReport
by
dseligo
[February 14, 2026, 08:51:08 pm]
how to enable multihelper...
by
PascalDragon
[February 14, 2026, 06:30:05 pm]
Fast Canvas Library V1.05...
by
backprop
[February 14, 2026, 05:46:10 pm]
Are the source files for ...
by
Derz
[February 14, 2026, 05:12:27 pm]
[ANN] PasBuild 1.3.0 rele...
by
Graeme
[February 14, 2026, 05:02:32 pm]
Frustrating Error When us...
by
jamie
[February 14, 2026, 04:22:29 pm]
; after then
by
Curt Carpenter
[February 14, 2026, 04:09:29 pm]
Help needed compiling
by
jamie
[February 14, 2026, 03:58:08 pm]
Does not go out of functi...
by
Martin_fr
[February 14, 2026, 03:43:52 pm]
ThorVG - test (lightweigh...
by
Antek
[February 14, 2026, 12:35:09 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved] (Read 1472 times)
zxandris
Full Member
Posts: 170
How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved]
«
on:
December 18, 2024, 05:28:26 pm »
Would anyone know how to invoke this?
I've seen it on some applications that are able to invoke the default "control panel" app for setting default apps for files. I was wondering if anyone knows how to do this.
Any help would be appreciated
CJ
«
Last Edit: December 18, 2024, 05:53:45 pm by zxandris
»
Logged
Fibonacci
Hero Member
Posts: 788
Internal Error Hunter
Re: How To: How to Invoke Default File Assocation Settings in Windows 10/11
«
Reply #1 on:
December 18, 2024, 05:39:29 pm »
Code: Pascal
[Select]
[+]
[-]
uses
Windows
;
procedure
OpenDefaultAppsSettings
;
begin
ShellExecute
(
0
,
'open'
,
'ms-settings:defaultapps'
,
nil
,
nil
,
SW_SHOWNORMAL
)
;
end
;
procedure
OpenWith
(
path
:
string
)
;
begin
ShellExecute
(
0
,
'open'
,
'rundll32.exe'
,
PChar
(
'shell32.dll,OpenAs_RunDLL '
+
path
)
,
nil
,
SW_SHOWNORMAL
)
;
end
;
begin
// default apps settings
OpenDefaultAppsSettings
;
// "open with..." dialog
OpenWith
(
'C:\yourfile.txt'
)
;
end
.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Operating Systems
»
Windows
»
How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved]
TinyPortal
© 2005-2018