Page 1 of 1

Posted: Mon Apr 01, 2002 12:27 pm
by BackupUser
Restored from previous forum. Originally posted by webmatze.

Does anybody know how to add a progam to the Explorer context menu?

I wrote a program that can rename the extensions of all selected files of a folder into a specified extension. Now I want to use that program from within my Explorer's conext menu.

Registered Purebasic User.
Using Windows XP on an AMD System...

Posted: Wed Apr 03, 2002 9:28 am
by BackupUser
Restored from previous forum. Originally posted by webmatze.

As nobody seems to know how to do it i searched by myself and one thing I find out is, that you have to edit the registry to add an entry to the Windows Explorer context menu. Also known as a shell extension.

I think that can be done with the registry library. But I didn't tried this yet.

Registered Purebasic User.
Using Windows XP on an AMD System...

Posted: Wed Apr 03, 2002 8:30 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.

Its not only some simple Registry stuff.

Its Registry + COM/OOP + GUID-stuff
and not easy to do.
Not possible with PB 2.9x...


("A shell extension is a COM object that
adds some kind of functionality to the
windows shell (Explorer). There are all
kinds of extensions out there, but very
little easy-to-follow documentation
about what they are, and how to write
your own.")

cya,
...Danilo
(registered PureBasic user)

Edited by - Danilo on 03 April 2002 21:38:16

Posted: Thu Apr 04, 2002 9:56 am
by BackupUser
Restored from previous forum. Originally posted by webmatze.

I think it can be done with PB.

You only have to create two new keys and two new String values.

Example for Win 2000 Registry:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\run prog]
@="run prog"

[HKEY_CLASSES_ROOT\*\shell\run prog\command]
@="c:\myprog.exe %1"
This will run my program with any selected file as parameters!

Now I only have to convert this for the PB registry library and that's it.

Registered Purebasic User.
Using Windows XP on an AMD System...

Posted: Thu Apr 04, 2002 3:45 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.

Your right, webmaze - thats simple.

I was thinking about more advanced things -
something like PicaView, which adds an image
to the rightclick menu.
( http://www.acdsystems.com/English/Produ ... AN=English )

I think the Registry Library is broken, so we
definitely need a Registry Library which works
for all Windows (Win9x + WinNT/2k/XP) correctly
and without crash.

cya,
...Danilo

(registered PureBasic user)

Posted: Thu Apr 04, 2002 5:59 pm
by BackupUser
Restored from previous forum. Originally posted by Paul.

There are simple, easy to use read/write procedures on the PB Resources Site :)

Posted: Thu Apr 04, 2002 6:42 pm
by BackupUser
Restored from previous forum. Originally posted by webmatze.

That is what I was searching for. Thank you Paul!


Registered Purebasic User.
Using Windows XP on an AMD System...