Beginner questions about file associations and command line parameters from opening a file

Just starting out? Need help? Post your questions and find answers here.
jn2002dk
New User
New User
Posts: 3
Joined: Sat Oct 09, 2021 11:45 am

Beginner questions about file associations and command line parameters from opening a file

Post by jn2002dk »

Hello

In order to get to know PB, i started making various small utilities. My latest is an archiver using packer
It all works but now i'd like to expand it a little. Specifically, i'd like to set file associations for support archives and to be able to open my program by double clicking an archive or right clicking a file or folder in Explorer

As far as the file associations go, it's easily solved using Inno setup but just for my own curiosity i'd like to know how to do it in PB. The command line issue has me stomped though. I have very little idea where to look. I'm not asking for someone to solve my problem for me, just gently nudge me in the right direction if possible

Thanks!
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Beginner questions about file associations and command line parameters from opening a file

Post by Marc56us »

jn2002dk wrote: Sat Oct 09, 2021 11:50 am ... i'd like to set file associations for support archives and to be able to open my program by double clicking an archive or right clicking a file or folder in Explorer...
In Windows there is Assoc and Ftype, but this is command line tools. (RunProgram)
:wink:
jn2002dk
New User
New User
Posts: 3
Joined: Sat Oct 09, 2021 11:45 am

Re: Beginner questions about file associations and command line parameters from opening a file

Post by jn2002dk »

Marc56us wrote: Sat Oct 09, 2021 4:07 pm
jn2002dk wrote: Sat Oct 09, 2021 11:50 am ... i'd like to set file associations for support archives and to be able to open my program by double clicking an archive or right clicking a file or folder in Explorer...
In Windows there is Assoc and Ftype, but this is command line tools. (RunProgram)
:wink:
Yea, i saw another post where you mentioned those during my search. So i could simply call those from within my PB program, right? How about adding it to the right click context menu in Explorer? I suspect that's registry only
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Beginner questions about file associations and command line parameters from opening a file

Post by Marc56us »

jn2002dk wrote: Sat Oct 09, 2021 5:03 pm
Marc56us wrote: Sat Oct 09, 2021 4:07 pm
jn2002dk wrote: Sat Oct 09, 2021 11:50 am ... i'd like to set file associations for support archives and to be able to open my program by double clicking an archive or right clicking a file or folder in Explorer...
In Windows there is Assoc and Ftype, but this is command line tools. (RunProgram)
:wink:
Yea, i saw another post where you mentioned those during my search. So i could simply call those from within my PB program, right? How about adding it to the right click context menu in Explorer? I suspect that's registry only
Found with google, but not tested:
How to add a prog to explorer context menu?
http://forums.purebasic.com/english/vie ... php?t=4138
:wink:
jn2002dk
New User
New User
Posts: 3
Joined: Sat Oct 09, 2021 11:45 am

Re: Beginner questions about file associations and command line parameters from opening a file

Post by jn2002dk »

Marc56us wrote: Sat Oct 09, 2021 5:30 pm
jn2002dk wrote: Sat Oct 09, 2021 5:03 pm
Marc56us wrote: Sat Oct 09, 2021 4:07 pm
jn2002dk wrote: Sat Oct 09, 2021 11:50 am ... i'd like to set file associations for support archives and to be able to open my program by double clicking an archive or right clicking a file or folder in Explorer...
In Windows there is Assoc and Ftype, but this is command line tools. (RunProgram)
:wink:
Yea, i saw another post where you mentioned those during my search. So i could simply call those from within my PB program, right? How about adding it to the right click context menu in Explorer? I suspect that's registry only
Found with google, but not tested:
How to add a prog to explorer context menu?
http://forums.purebasic.com/english/vie ... php?t=4138
:wink:
Awesome, thank you :D
Post Reply