Jump to content

Here's some shell extensions...


Recommended Posts

I tested it Ok on 2 machines

Are you meaning that these 3 lines do something on your machines : :blink:

[Strings]
toto="This string is the default language"

[Strings.040c]
toto="Les français de france verront cette ligne mais pas ceux du canada ou de suisse"

[Strings.000c]
toto="Les français pas de france verront cette ligne mais pas les français de france parce que les français de france ont une section rien que pour eux"

[Strings.0409]
toto="This string is seen only by american english and not by british"

The "magic numbers" i used in this example are the standard "LANG_ID", in hexadecimal.

(note that this trick works with non-ANSI langs, east-asian or arabic for example, providing you save your INF in unicode)

Link to comment
Share on other sites


Well, my bad.

And not only those but the inf file did not get copied correctly to the inf directory...So uninstall was anyway impossible (install works fine, btw).

Dumb me, I changed something after the test... and that test was poorly done: only checking if the entry disapeared from 'Add/remove prog' control panel.

I'm currently investigating that 'flag in [CopyAllFiles]' issue. Did not know about that before. Noob!

If I use the [strings.localID] thing, I need to repeat ALL the strings (not only the localized ones) in ALL the localized sections.

I though it would be clearer and easier to maintain by using different files. But this can be discussed.

well, wait for my second try !

Edited by Djé
Link to comment
Share on other sites

Well, I went back to my textbooks.

Almost all(!) my knowledge of inf file originate in the inf file inside JDOE's CABTOOL installer, (of course, later I went to gosh's, msdn and so on) so thanks to him.

And indeed, he uses succesfully the copyfiles section with no flag and the very DelDir stuff I used to delete the dir.

I just copied on him. :whistle:

But for this, he does NOT use setupapi as an inf engine (or whatever it's called) for uninstalling.

He uses advpack.dll which does the job fine with this syntax.

I did not know the difference and replaced the later by the former, which broke the uninstaller.

Well, it would have broke it if it was not already broken by the inf copying error :blushing: and by something else which I am requesting help for solving:

I can't manage to register/unregister the dlls using advpack.dll.

I tried the normal (documented) syntax and a hacked one copied on the DelDirs section syntax.

But with no result.

Anyone knows something or a good documentation source about advpack.dll inf syntax?

You may ask 'why not just use setupapi, then?'

Well, uninstalling wise, I found a couple of issues (again, any help to solve them is welcome):

-when unregistering the dll, it did not 'release' them so I couldn't delete them before next reboot.

-no such directive to delete the installation dir (I guess that's what Delprat is talkin' about).

Link to comment
Share on other sites

If I use the [strings.localID] thing, I need to repeat ALL the strings (not only the localized ones) in ALL the localized sections.

I though it would be clearer and easier to maintain by using different files. But this can be discussed.

An alternative would be to use only localizable strings ; 'coz different files makes more code to maintain :lol:

(egg or chicken ? well both are ill now...)

I can't manage to register/unregister the dlls using advpack.dll.

I tried the normal (documented) syntax and a hacked one copied on the DelDirs section syntax.

But with no result.

Anyone knows something or a good documentation source about advpack.dll inf syntax?

You may ask 'why not just use setupapi, then?'

Well, uninstalling wise, I found a couple of issues (again, any help to solve them is welcome):

-when unregistering the dll, it did not 'release' them so I couldn't delete them before next reboot.

-no such directive to delete the installation dir (I guess that's what Delprat is talkin' about).

I'm interested about advpack.dll inf syntax too... Even about Setupapi documentation.

About your last questions :

-> I presume that shell extensions are always in use by explorer.exe ? (try this : register your SHX, use it once, unregister it, log off, log on, try to delete the DLL with an INF and sometimes it works :wacko: )

-> there's a workaround to delete a directory with setupapi, under two conditions :

1/ the directory must be empty (no files nor subfolders) (it can be emptied by the INF file)

2/ it must reside on the same drive as the "All Users" profile ; or on the same drive as the "current user" profile (which is the same drive most times)

3/ you must know the real name of the folder (no variables)

See the attached zip file for an example : "install" setupapi.inf ; look at your "program files" dir ; then remove it with ARP control panel :thumbup

SetupAPI.zip

Edited by Delprat
Link to comment
Share on other sites

See the attached zip file for an example : "install" setupapi.inf
Very nice trick indeed. :thumbup

But due to the 'unregistering' problem, the whole thing is still unpractical.

What is strange is that when uregistering by hand (regsvr32 /u), there is no such file locking. You can delete the dll right after.

For now I'm just frustrated :( with this whole INF thing and I think it would be easier to have just a .cmd installer/uninstaller.

An enhanced version of spiritpyre's Install.cmd with regs and files addition and deletion integrated.

Right now, I'm busy on something else, but I may try to do it later if it's not done by someone else before. :whistle:

Link to comment
Share on other sites

Ousted at the .inf door, let's come back through the .cmd window! :P

Same features:

- copy the dlls in a folder inside 'Program Files'

- register the dlls

- install custom settings for the toggle extensions

- add ability to register/unregister any dll (right-click)

- add a full uninstaller for the above features in the add/delete progs control panel.

- Easy customization (language, install location, unattended or not, installed features, etc.)

@SpiritPyre: this is meant to replace your Install.cmd, but only if you think it is worth replacing ;).

Usage:

-Edit it to your needs

-put it (with the dlls you want to use) in a folder on your cd (or anywhere) and simply run it.

-no need for any other .reg file.

this time, I've been a little more serious testing it on my computers :blushing:

FullInstall.cmd

Edited by Djé
Link to comment
Share on other sites

Hi Spiritpyre,

Just thought about something. Maybe you want one day to make one single shellex out of the two toggle ones, using a submenu. And maybe you could also add a third a third item to toggle system files view.

I'd see it like that :

Toggle - Extensions

--------- Hidden files

--------- System files

Edited by eidenk
Link to comment
Share on other sites

I'm interested about advpack.dll inf syntax too...

Here you are! I just grabbed jdoe on another thread and he posted back a zip full of documentation about advanced inf syntax. Invaluable.

With a nice trick to register/unregisterr dlls. Incredible.

With many new items available. Marvelous.

Thanks god.

OK. Now, that said, I don't have so much time to write again the inf, and the batch is working fine. B)

Link to comment
Share on other sites

  • 2 weeks later...
what happened to Spiritpyre? where is he?

yeah... sorry i hvaen't been on in awhile. I've been in over my head at school and trying to make a comeback before it affects my gpa. Unfortunately, I still have a few weeks left but I do have some good news. slimzky, Djé. I finally got around to reinstalling VisStudio again and have the basic code for the two extensions ready -- BUT I'm almost finished on a big update that will affect all of my extensions, so I'm just gonna finish up and then I'll post everything at the same time. If there aren't any nasty surprises at school, hopefully it'll only take a few days. I'll try to check out the new cmd & inf when i finish up with that.

eidenk good news for you too. If you look back a few pages somewhere in this thread I was planning on just such an idea. I was calling it my 'SubMenu Project' but was trying to add support for parsing the info from a text file (as unfortunately the simplest c++ read technique wasn't working... :angry: ). anyway with all i've had going on I've decided I'm gonna drop that support-- at least for the time being, and just use the registry based part of the code. A config utility still needs to be written and I need to either find an old build or weed out the incomplete file-parsing code from the current build... sorry don't have any kind of ETA yet though... I would also like to release standalone exes for all of my extensions with SubMenu Pack (most of these are already finished except the newer extensions). The standalones would also come in nice if someone wanted to use them in apps such as DropBar (see 2nd post) if someone wanted to use them from the Windows Explorer Toolbar. Again no ETA, but hopefully I'll be able to at least get started on it by the weekend.

Edited by spiritpyre
Link to comment
Share on other sites

Posted new versions of everything in the first post [here]. I tested the links and extensions from school and everything worked fine. Added ability to install on Nonadmin accounts and use custom captions on all of them (as opposed to just some). Also released UpOneLevel and CmdPromptHere.

The only problem I noticed was that, as of right now, Cmd Prompt Here (actually cmd.exe) won't work with UNC paths so you have to map them to a drive letter and work only through the mapping. But it works great for all local paths and mapped network paths. If I get ambitous I may try to find some kind of workaround for this, but I have finals and end of semester tests coming up so I'm going to be pretty preoccupied for the next couple of weeks. I tried to test everything pretty thoroughly but if anyone has problems, suggestions, or ideas please let me know (I'll might some details too). and FYI - if you install to a Nonadmin account you'll have to change the default path to somewhere where you will have write access to. Enjoy.

Edited by spiritpyre
Link to comment
Share on other sites

Anyone know where I can get an extension that will let me open a folder in a new window from the context menu?

You don't need an extension for doing this. Editing the registry is enough :

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\New Window]
@="Open in New &Window"

[HKEY_CLASSES_ROOT\Directory\shell\New Window\Command]
@="explorer.exe %1"

Nice tweak, but it doesn't show up on desktop icons. Is there a way to do this?

BTW I added a line that you seem to have missed (@="Open in New &Window").

Edited by HyperHacker
Link to comment
Share on other sites

@spiritpyre, thank you very much dude!!!! :thumbup

u know the "uponelevel" shellext will be very useful for those who are trying to mimic the looks of Woindows Vista like me. because i only use back & forward button in explorer. its pain in the a** without up one level.. but now its easier :D

Link to comment
Share on other sites

Anyone know where I can get an extension that will let me open a folder in a new window from the context menu?

You don't need an extension for doing this. Editing the registry is enough :

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\New Window]
@="Open in New &Window"

[HKEY_CLASSES_ROOT\Directory\shell\New Window\Command]
@="explorer.exe %1"

Nice tweak, but it doesn't show up on desktop icons. Is there a way to do this?

BTW I added a line that you seem to have missed (@="Open in New &Window").

the only thing I can see is that you might need to put the path in quotes like so:

[HKEY_CLASSES_ROOT\Directory\shell\New Window\Command]

@="explorer.exe \"%1\""

don't know if that's the problem, but since the default desktop path contains spaces it might make sense.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...