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
To DebugLn or not to Debu...
by
CM630
[
Today
at 03:03:53 pm]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 02:20:26 pm]
Trayslate 1.5.0 - Free tr...
by
AlexanderT
[
Today
at 02:18:28 pm]
TlsLib4Pascal
by
Xor-el
[
Today
at 02:16:41 pm]
Strangely - Not a questio...
by
J-G
[
Today
at 02:15:12 pm]
'ReadStr' ?
by
Thaddy
[
Today
at 02:08:25 pm]
enable easy marker moveme...
by
Paolo
[
Today
at 01:30:39 pm]
Why does Free Pascal use ...
by
marcov
[
Today
at 01:11:48 pm]
[UNSOLVED] Splitting an i...
by
paweld
[
Today
at 09:58:08 am]
Error installing EyeCandy...
by
JuhaManninen
[
Today
at 08:46:00 am]
var vs out
by
creaothceann
[
Today
at 06:38:45 am]
Lazarus undead repository...
by
CM630
[August 11, 2026, 11:40:09 pm]
LRS Explorer
by
CM630
[August 11, 2026, 11:33:24 pm]
Identify network devices
by
Warfley
[August 11, 2026, 10:55:13 pm]
The best name for procedu...
by
J-G
[August 11, 2026, 07:49:19 pm]
Lazarus Bugfix Release 4....
by
geraldholdsworth
[August 11, 2026, 04:55:42 pm]
[Solved[ How to define th...
by
Mike.Cornflake
[August 11, 2026, 03:42:11 pm]
Dataset EnableControls/Di...
by
Mike.Cornflake
[August 11, 2026, 03:37:42 pm]
Debugging in a real termi...
by
Martin_fr
[August 11, 2026, 02:59:09 pm]
how to bring in view the ...
by
Aruna
[August 11, 2026, 02:33:55 pm]
Is it possible to communi...
by
dbannon
[August 11, 2026, 02:15:44 pm]
TFPHTTPServer DDoS protec...
by
LemonParty
[August 11, 2026, 12:54:23 pm]
Unleashed Pascal (async/a...
by
creaothceann
[August 11, 2026, 12:09:09 pm]
MOVED: soucis scrollbars ...
by
Martin_fr
[August 11, 2026, 11:09:38 am]
soucis scrollbars V4.8 ?
by
Martin_fr
[August 11, 2026, 11:08:13 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved] (Read 1554 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: 1079
Behold, I bring salvation - Unleashed Pascal
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
Unleashed Pascal
: async/await, parallel for, match, tuples, string interpolation, inline vars, autofree, no-RTTI & tons more.
Star on GitHub
⭐
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