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
Martin_fr
[
Today
at 11:30:27 pm]
GridPrinter requirements ...
by
sfeinst
[
Today
at 10:53:22 pm]
LCL Web Native with D2Bri...
by
xinyiman
[
Today
at 10:43:41 pm]
Recommendations for wasm3...
by
PascalDragon
[
Today
at 10:38:15 pm]
Lazarus for Windows on aa...
by
PascalDragon
[
Today
at 10:33:34 pm]
Rolling releases Lazarus[...
by
PascalDragon
[
Today
at 10:29:45 pm]
Debian removes FPC/Lazaru...
by
PascalDragon
[
Today
at 10:12:10 pm]
Migrating SK1 Project to ...
by
jamie
[
Today
at 09:13:45 pm]
[SOLVED] The main screen ...
by
Hansvb
[
Today
at 06:50:52 pm]
Transparent Form: Some Th...
by
LV
[
Today
at 05:53:43 pm]
[SOLVED] Don't find the U...
by
Hartmut
[
Today
at 05:23:36 pm]
[Closed]FPC error when us...
by
marcov
[
Today
at 04:19:50 pm]
Sidmon Player Library
by
Gigatron
[
Today
at 02:56:58 pm]
Lazaris IDE v4.4 - extrem...
by
backprop
[
Today
at 02:16:58 pm]
Who is absent from year 2...
by
backprop
[
Today
at 01:52:41 pm]
[RESOLVED] Log in to web ...
by
rvk
[
Today
at 01:26:35 pm]
Help with diabetes projec...
by
slicke
[
Today
at 12:13:28 pm]
it2play - IT/S3M module r...
by
Lulu
[
Today
at 10:00:59 am]
FPC and Lazarus coding st...
by
Martin_fr
[
Today
at 09:21:46 am]
Free Pascal for a small e...
by
cdbc
[
Today
at 07:06:42 am]
FPCUnit returns 2 error l...
by
n7800
[
Today
at 02:43:55 am]
Defaults for features
by
Martin_fr
[
Today
at 02:07:48 am]
TLazSerial : serial port ...
by
CM630
[February 06, 2026, 11:02:03 pm]
function intersect in laz...
by
wp
[February 06, 2026, 08:30:39 pm]
Notetask 1.1.0 - Free cro...
by
AlexanderT
[February 06, 2026, 02:33:56 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How To: How to Invoke Default File Assocation Settings in Windows 10/11 [Solved] (Read 1460 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