From: Norm on
Hi,
I have added an entry to the explorer right context menu, which allows
me to secure clean a file, through my own program, by right clicking on
it and selecting Erase With FileClean. This works fine, but how can I
add multiple files to the list.

Code used to add context menu option:

fWriteValue "HKCU", "Software\Classes\*\shell\Erase With FileClean",
"icon", "S", App.Path & "\FileClean.exe"
fWriteValue "HKCU", "Software\Classes\*\shell\Erase With
FileClean\command", "", "S", App.Path & "\FileClean.exe %1"

This works great and will add one file to the registry and then my
program reads the file path and cleans it. I have tried adding %1,%1 to
test, but get the same file twice. Then I tried %1, %2 and just got one
file followed by a coma. I knew it could not be that easy. ^^

I tried searching google for %1, but just got a lot of pages of things
with the number one in them. Is there some way of adding multiple file
paths, separated by some delimiter to the end of the registry entry
above?

Any and all help appreciated.

Norm


From: Larry Serflaten on

"Norm" <NormF4(a)Spoof.com> wrote

> Code used to add context menu option:
>
> fWriteValue "HKCU", "Software\Classes\*\shell\Erase With FileClean",
> "icon", "S", App.Path & "\FileClean.exe"
> fWriteValue "HKCU", "Software\Classes\*\shell\Erase With
> FileClean\command", "", "S", App.Path & "\FileClean.exe %1"
>
> This works great and will add one file to the registry and then my
> program reads the file path and cleans it. I have tried adding %1,%1 to
> test, but get the same file twice. Then I tried %1, %2 and just got one
> file followed by a coma. I knew it could not be that easy. ^^
>
> I tried searching google for %1, but just got a lot of pages of things
> with the number one in them. Is there some way of adding multiple file
> paths, separated by some delimiter to the end of the registry entry
> above?
>
> Any and all help appreciated.


Try "%L" in place of %1 and see if that helps...

LFS


From: Norm on
Larry Serflaten explained on 5/22/2010 :
> "Norm" <NormF4(a)Spoof.com> wrote
>
>> Code used to add context menu option:
>>
>> fWriteValue "HKCU", "Software\Classes\*\shell\Erase With FileClean",
>> "icon", "S", App.Path & "\FileClean.exe"
>> fWriteValue "HKCU", "Software\Classes\*\shell\Erase With
>> FileClean\command", "", "S", App.Path & "\FileClean.exe %1"
>>
>> This works great and will add one file to the registry and then my
>> program reads the file path and cleans it. I have tried adding %1,%1 to
>> test, but get the same file twice. Then I tried %1, %2 and just got one
>> file followed by a coma. I knew it could not be that easy. ^^
>>
>> I tried searching google for %1, but just got a lot of pages of things
>> with the number one in them. Is there some way of adding multiple file
>> paths, separated by some delimiter to the end of the registry entry
>> above?
>>
>> Any and all help appreciated.
>
>
> Try "%L" in place of %1 and see if that helps...
>
> LFS

Hi Larry,
Glad to see everyone here. I tried %L and got the same results. Just %L
gave me one entry. If I tried %L;%L I got two entries, but both the
same one.
Norm


From: Larry Serflaten on

"Norm" <NormF4(a)Spoof.com> wrote

> >> I tried searching google for %1, but just got a lot of pages of things
> >> with the number one in them. Is there some way of adding multiple file
> >> paths, separated by some delimiter to the end of the registry entry
> >> above?
> >>
> >> Any and all help appreciated.
> >
> >
> > Try "%L" in place of %1 and see if that helps...
>
> Hi Larry,
> Glad to see everyone here. I tried %L and got the same results. Just %L
> gave me one entry. If I tried %L;%L I got two entries, but both the
> same one.

Not having gotten it to work myself, I can only suggest you look at
a few Windows examples (check out the shell>open>command lines
in the Registry) and see what they use. In particular, note what they use
for HKCR/batfile/shell/open/command, likewise for cmdfile, comfile,
exefile, and a few others.

They all show an ending like: "%1" %*

But as I said, I've never gotten that to work and seem to recall having
difficulty with it. Post back if you make any headway....

LFS


From: Norm on
Larry Serflaten laid this down on his screen :
> "Norm" <NormF4(a)Spoof.com> wrote
>
>>>> I tried searching google for %1, but just got a lot of pages of things
>>>> with the number one in them. Is there some way of adding multiple file
>>>> paths, separated by some delimiter to the end of the registry entry
>>>> above?
>>>>
>>>> Any and all help appreciated.
>>>
>>>
>>> Try "%L" in place of %1 and see if that helps...
>>
>> Hi Larry,
>> Glad to see everyone here. I tried %L and got the same results. Just %L
>> gave me one entry. If I tried %L;%L I got two entries, but both the
>> same one.
>
> Not having gotten it to work myself, I can only suggest you look at
> a few Windows examples (check out the shell>open>command lines
> in the Registry) and see what they use. In particular, note what they use
> for HKCR/batfile/shell/open/command, likewise for cmdfile, comfile,
> exefile, and a few others.
>
> They all show an ending like: "%1" %*
>
> But as I said, I've never gotten that to work and seem to recall having
> difficulty with it. Post back if you make any headway....
>
> LFS

Larry,
Further testing shows that the value is there, but I am unable to read
it in correctly.

The right click context is sending the information to my program as a
commanc line, which I am then writing into the registry. The problem
appears to be in reading it.

The following code will trigger a msgbox for each entry in the command
line,
If Len(Command$) > 0 then
MsgBox = Command$
End If
This will print and entry for each entry included in the right click
followed by a ;. But trying to write the code to the registry will only
write the first entry of the group. Hope this makes sense. ^^

When using the following code and inputing 2 files
If Len(Command$) > 0 Then
Dim strSplit() As String
strSplit = Split(Command$, ";")
MsgBox UBound(strSplit)
For i = 0 To UBound(strSplit)
MsgBox strSplit(i)
If i = UBound(strSplit) Then Exit For
Next i
End If

I get UBound(strSplit) = 1, but I get it twice
I then get one MsgBox list each entry, but I also get one blank MsgBox
with each entry.

There is apparently something going on here that I do not understand.
^^

Norm