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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
New version of LazMapView...
by
Dzandaa
[
Today
at 12:55:49 pm]
Forum slow for others as ...
by
PascalDragon
[
Today
at 11:58:48 am]
accessing array members i...
by
cdbc
[
Today
at 10:16:05 am]
WebP images and BGRABitma...
by
paweld
[
Today
at 09:43:16 am]
Avaiable instruction set
by
LemonParty
[
Today
at 09:26:31 am]
RGB Plasma
by
Gigatron
[
Today
at 08:47:37 am]
Amigo programming languag...
by
paxscript
[
Today
at 07:56:57 am]
2d "platform" game sugges...
by
Roland57
[
Today
at 07:52:39 am]
Knob Finger Spinner Graph...
by
SandyG
[
Today
at 06:45:22 am]
This is me back in Lazaru...
by
Weiss
[
Today
at 06:34:41 am]
How to DIY a filerec reco...
by
TYDQ
[
Today
at 05:59:45 am]
GTK3 still alpha
by
regs
[
Today
at 01:46:35 am]
looping direction control...
by
440bx
[April 19, 2025, 08:08:37 pm]
ppaslink.sh: line 9: 6262...
by
Thaddy
[April 19, 2025, 07:58:29 pm]
JSON parser handler
by
cdbc
[April 19, 2025, 07:01:19 pm]
[SOLVED] Converting psd f...
by
TRon
[April 19, 2025, 06:58:36 pm]
Best way to exchange data...
by
Hansvb
[April 19, 2025, 06:24:07 pm]
[Solved] How to call a cl...
by
nikel
[April 19, 2025, 05:09:22 pm]
Announcing TRURL RPN Engi...
by
jwdietrich
[April 19, 2025, 05:07:49 pm]
TRURL's segmitator availa...
by
jwdietrich
[April 19, 2025, 05:05:36 pm]
TRURL G released
by
jwdietrich
[April 19, 2025, 05:03:40 pm]
Animated Sine Flower
by
Thaddy
[April 19, 2025, 04:33:52 pm]
Compile Error on Assign f...
by
Thaddy
[April 19, 2025, 04:27:02 pm]
making types totally inco...
by
Thaddy
[April 19, 2025, 03:13:24 pm]
Why VirtualDBTreeEx not c...
by
wp
[April 19, 2025, 01:08:42 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved] (Read 961 times)
zxandris
Full Member
Posts: 152
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: 663
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