Beej126 / SingleInstanceAccumulator

Useful for multi-file shell context menu actions
10 stars 2 forks source link

How to use "SingleInstanceAccumulator"? #6

Closed Graph-Man closed 1 year ago

Graph-Man commented 1 year ago

Where to specify the name of the exe-file, where to pass the selected files as arguments?

Beej126 commented 1 year ago

Where to specify the name of the exe-file, where to pass the selected files as arguments?

i can try to help if you give some examples you're having trouble with but those things are definitely what i'm elaborating on in all the readme page examples.

for instance, "example 1 - put selected files onto clipboard" ... the "exe" in this case is just an echo statement that pipes to the clipboard device... and the "$files" placeholder (as in all the examples) is where the actual files you've selected in explorer are passed

please pick one of the examples closest to your use case and try to frame your question around that.

here at the intersection of the registry and cmd/powershell the toughest part is getting all the various quoting and escaping to pan out... otherwise it would look a lot less busy and i wish i could think of a way to hide all that noise even for myself.

i can say, once you get some working, it starts to come into focus and you can make more by copy/pasting what works.

Graph-Man commented 1 year ago

There is a program myprogram.exe I need to pass selected files into it as parameters. Unfortunately, in your examples, I did not find anything close to this case.

i can try to help if you give some examples you're having trouble with but those things are definitely what i'm elaborating on in all the readme https://github.com/Beej126/SingleInstanceAccumulator#readme page examples.

for instance, "example 1 - put selected files onto clipboard https://github.com/Beej126/SingleInstanceAccumulator#example-1---put-selected-files-onto-clipboard" ... the "exe" in this case is just an echo statement that pipes to the clipboard device... and the "$files" placeholder (as in all the examples) is where the actual files you've selected in explorer are passed

please pick one of the examples closest to your use case and try to frame your question around that.

Beej126 commented 1 year ago

There is a program myprogram.exe I need to pass selected files into it as parameters. Unfortunately, in your examples, I did not find anything close to this case.

the basic usage help text "-c:command line" is all you need... just put your exe name in instead of command line... the examples were for more complex scenarios... i added a simple example to cover this now...

remember to use the -v arg to see what will execute for fine tuning.

Graph-Man commented 1 year ago

Thank you so much.

Graph-Man commented 1 year ago

Sorry to bother you, but where can I download the compiled file SingleInstanceAccumulator.exe ?

Graph-Man commented 1 year ago

-w "-c:myprogram.exe $files" "%1"

what if I need to use a long path with spaces? с:\program files\my program\myprogram.exe

Beej126 commented 1 year ago

try it out with -v flag and try a few things like -w \"-c:\\"my spaced path/myprogram.exe\\"\" $files" "%1" and let me know what you find

Beej126 commented 1 year ago

Sorry to bother you, but where can I download the compiled file SingleInstanceAccumulator.exe ?

i've created a release

Graph-Man commented 1 year ago

i've created a [release] (https://github.com/Beej126/SingleInstanceAccumulator/releases)

146 MB ???

Beej126 commented 1 year ago

read up on standalone exe's compiled from .net, especially where windows forms is involved... everybody is pressing msft to improve the situation but that's where we're at, everybody's exe's are this large... the gist is it is linking in large swaths of the framework libs

fyi this is coming from the lastest .net 7 sdk so it's probably the best it can be. and virustotal will report 1 false positive, nothing you can do about it without purchasing commercial signing certs.

also, are you familiar with the phrase "Beggers can't be choosers" =)

On Fri, Apr 28, 2023 at 2:45 AM Graph-Man @.***> wrote:

i've created a [release] ( https://github.com/Beej126/SingleInstanceAccumulator/releases)

146 MB ???

— Reply to this email directly, view it on GitHub https://github.com/Beej126/SingleInstanceAccumulator/issues/6#issuecomment-1527285439, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQCMLEURIMASNFHSAY34Q3XDOGURANCNFSM6AAAAAAXM545HU . You are receiving this because you commented.Message ID: @.***>