Shell Extension -adding file name/command extension

L

LuckyStrike

If these are the wrong NG's for this issue, would someone be so kind as to
direct me to the proper one?

I have created a couple of Macros for Outlook 2002 (a part of Office XP).
The first Macro is to enable the direct one click running of my AV scanner;
a new tool button was created for this purpose. It Works beautifully. The
only shortcoming was it scans *everything*; this is way too lengthy a
process.

I then created a second Macro to run the Shell extension (AVGSE.exe.) of AVG
AV, the purpose of which is to simply scan the one item in question. It's
not quite done yet as a problem arose.

Here is the problem: When I attempt to run it, a small message box appears
which states the following information - AVG Simple Checker. Add Filename to
the command line.

What is meant by this exactly and how/where do I perform this?

Thanks,
 
B

Bill Blanton

LuckyStrike said:
If these are the wrong NG's for this issue, would someone be so kind as to
direct me to the proper one?

I have created a couple of Macros for Outlook 2002 (a part of Office XP).
The first Macro is to enable the direct one click running of my AV scanner;
a new tool button was created for this purpose. It Works beautifully. The
only shortcoming was it scans *everything*; this is way too lengthy a
process.

I then created a second Macro to run the Shell extension (AVGSE.exe.) of AVG
AV, the purpose of which is to simply scan the one item in question. It's
not quite done yet as a problem arose.

Here is the problem: When I attempt to run it, a small message box appears
which states the following information - AVG Simple Checker. Add Filename to
the command line.

What is meant by this exactly and how/where do I perform this?

I don't know anything about Outlook macros, but you need to pass it
the filename in the macro call to avgse.exe. Example to scan autoexec.bat
from a dos prompt you would type-

avgse c:\autoexec.bat
(heh, it works! ;)

You need to figure out how to pass a variable filename that Outlook will
replace with the actual name. Windows Explorer uses %1 or %L. Look up
"variable" in help.
 
L

Lee

LuckyStrike said:
If these are the wrong NG's for this issue, would someone be so kind as to
direct me to the proper one?

I have created a couple of Macros for Outlook 2002 (a part of Office XP).
The first Macro is to enable the direct one click running of my AV scanner;
a new tool button was created for this purpose. It Works beautifully. The
only shortcoming was it scans *everything*; this is way too lengthy a
process.

I then created a second Macro to run the Shell extension (AVGSE.exe.) of AVG
AV, the purpose of which is to simply scan the one item in question. It's
not quite done yet as a problem arose.

Here is the problem: When I attempt to run it, a small message box appears
which states the following information - AVG Simple Checker. Add Filename to
the command line.

What is meant by this exactly and how/where do I perform this?

Thanks,

REGEDIT4

[HKEY_CLASSES_ROOT\File\shell\AVGSCk]
@="AVG &Simple Check"

[HKEY_CLASSES_ROOT\File\shell\AVGSCk\command]
@="proper full path with double slash marks\\AVGSE.exe "%1\""

In this example of the right click entry I would try, the
"%1\" is the part that supplies the filename to AVGSE.exe.
I assume you left it out or it's not configured correctly
for AVGSE.exe so AVGSE.exe is running but complaining that
it has no file to work on? If so, then double clicking on
AVGSE.exe should result in the same message.
 
L

LuckyStrike

"LuckyStrike" <[email protected]> wrote
in message news:#[email protected]...
----------------------------------------------------------------------------
--------------------------------------
I don't know anything about Outlook macros, but you need to pass it
the filename in the macro call to avgse.exe. Example to scan autoexec.bat
from a dos prompt you would type-

avgse c:\autoexec.bat
(heh, it works! ;)

You need to figure out how to pass a variable filename that Outlook will
replace with the actual name. Windows Explorer uses %1 or %L. Look up
"variable" in help.
----------------------------------------------------------------------------
--------------------------
Hi Bill,

As you know I'm am still at the beginners level on so much, therefore I will
show you by copy and paste that command which I entered: The one immediately
below suffices to get AVG to run by a Macro Toolbutton on the toolbar. No
problem.

Sub RunAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgw.exe")
End Sub

This one below is the Macro that I am having trouble with. I have added a
tool button, but it then asks for the filename to be added to the command
line.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
End Sub

Does the initial command make sense? I am not entirely sure of the
instructions that you have provided me with; I apologize for my lack of
expertise on this.

Thanks-
 
L

LuckyStrike

Lee said:
"LuckyStrike" <[email protected]> wrote
in message news: said:
I then created a second Macro to run the Shell extension (AVGSE.exe.) of AVG
AV, the purpose of which is to simply scan the one item in question. It's
not quite done yet as a problem arose.

Here is the problem: When I attempt to run it, a small message box appears
which states the following information - AVG Simple Checker. Add Filename to
the command line.

What is meant by this exactly and how/where do I perform this?

Thanks,
----------------------------------------------------------------------------
--------------------------------------
REGEDIT4

[HKEY_CLASSES_ROOT\File\shell\AVGSCk]
@="AVG &Simple Check"

[HKEY_CLASSES_ROOT\File\shell\AVGSCk\command]
@="proper full path with double slash marks\\AVGSE.exe "%1\""

In this example of the right click entry I would try, the
"%1\" is the part that supplies the filename to AVGSE.exe.
I assume you left it out or it's not configured correctly
for AVGSE.exe so AVGSE.exe is running but complaining that
it has no file to work on? If so, then double clicking on
AVGSE.exe should result in the same message.
----------------------------------------------------------------------------
------------------
Lee,

This may astound you that I was capable of creating the first Macro (with
some help from someone quite a while ago) but am incapable of truly
deciphering the instructions you've so kindly provided regarding the present
one.

Yes, you are absolutely correct in that a double click also brings up the
same "request" from the message box.

I must have left something out (not by design, I assure you, but more a
matter of be unskilled in this.) as you've stated, so by default it must be
incorrect in the configuration of the command.

Below is a C/P of the two macro entries that were created using the VBE.

The one immediately below suffices to get AVG to run by a Macro Toolbutton
on the toolbar. No
problem.

Sub RunAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgw.exe")
End Sub

This one below is the Macro that I am having trouble with. I have added a
tool button, but it then asks for the filename to be added to the command
line.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
End Sub

Lastly I would like to say thanks for your reply, sorry I am not of high
understanding in such matters. I had trouble right away with understanding
the REGEDIT4 part. *<;-P

Thanks,
 
B

Bill Blanton

LuckyStrike said:
This one below is the Macro that I am having trouble with. I have added a
tool button, but it then asks for the filename to be added to the command
line.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
End Sub

The above code calls avgse.exe but you also need to pass a filename
to the program. How else would the program know what file you
want to scan?

This might show you how to pass a parameter through the command line
to the program.

Sub ScanItemAVG()
dim myfile
set myfile=c:\msdos.sys
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe" myfile)
End Sub

Like I said though, I don't know anything about Outlook (or VB).
Where is this file you are trying to scan? I guess your code is
contained in the "button object"?

Basically, you need to "get" the file object first, and then pass off the
the file's name property to AVG. The question I think, is, how to get the
file.name ?
 
L

LuckyStrike

LuckyStrike said:
"Lee" <[email protected]> wrote in message news:[email protected]...
wrote
in message news: said:
--------------------------------------------------------------------------
--
Lee wrote:
REGEDIT4

[HKEY_CLASSES_ROOT\File\shell\AVGSCk]
@="AVG &Simple Check"

[HKEY_CLASSES_ROOT\File\shell\AVGSCk\command]
@="proper full path with double slash marks\\AVGSE.exe "%1\""

In this example of the right click entry I would try, the
"%1\" is the part that supplies the filename to AVGSE.exe.
I assume you left it out or it's not configured correctly
for AVGSE.exe so AVGSE.exe is running but complaining that
it has no file to work on? If so, then double clicking on
AVGSE.exe should result in the same message.

--------------------------------------------------------------------------
------------
LuckyStrike said:
Lee,

This may astound you that I was capable of creating the first Macro (with
some help from someone quite a while ago) but am incapable of truly
deciphering the instructions you've so kindly provided regarding the present
one.

Yes, you are absolutely correct in that a double click also brings up the
same "request" from the message box.

I must have left something out (not by design, I assure you, but more a
matter of be unskilled in this.) as you've stated, so by default it must be
incorrect in the configuration of the command.

Below is a C/P of the two macro entries that were created using the VBE.

The one immediately below suffices to get AVG to run by a Macro Toolbutton
on the toolbar. No
problem.

Sub RunAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgw.exe")
End Sub

This one below is the Macro that I am having trouble with. I have added a
tool button, but it then asks for the filename to be added to the command
line.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
End Sub

Lastly I would like to say thanks for your reply, sorry I am not of high
understanding in such matters. I had trouble right away with understanding
the REGEDIT4 part. *<;-P

Thanks,
--

OK, the latest development is that by a series of trials and errors, I have
gotten the Macro to "work". I have placed the word work in quotes as I'm not
sure it's really working. <G>

To clarify: The command path I have made is as follows -

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub

This command has eliminated the appearance of the message box with it's
accompanying "complaint". I no longer get the "Add filename to the command
line", nor are there any "compile" or "syntax" errors either.

Now when I single click upon the toolbutton(s), which are located both on
the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
open E-mail message, the AVG Shell Extension Box appears virtually
instantaneously stating "Test Finished". No Virus or suspicious files were
detected...". So far, so good.

BUT, there is an absence of any name in the "last file tested" field.
Because it is blank, without any name in that field I am doubting that it
has actually scanned anything.

What might anyone make of this?

Thanks yet again,
 
L

LuckyStrike

Bill Blanton said:
"LuckyStrike" <[email protected]> wrote
in message news:[email protected]...
The above code calls avgse.exe but you also need to pass a filename
to the program. How else would the program know what file you
want to scan?

This might show you how to pass a parameter through the command line
to the program.

Sub ScanItemAVG()
dim myfile
set myfile=c:\msdos.sys
Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe" myfile)
End Sub

Like I said though, I don't know anything about Outlook (or VB).
Where is this file you are trying to scan? I guess your code is
contained in the "button object"?

Basically, you need to "get" the file object first, and then pass off the
the file's name property to AVG. The question I think, is, how to get the
file.name ?
----------------------------------------------------------------------------
--------------------

Hi Bill-

The "file" I am trying to scan is an E-mail message with attachments that is
in my Outlook 2002 inbox. The reason for this desire to create a simple
basic "Scan this Item, Now" toolbutton is to eliminate the need to click
upon the attachment, sending it to a folder named "Scan for Virus" and then
R-Clicking the "Scan with AVG" command. I have found a way to correctly
enter the command without errors, thus eliminating the problem of my initial
query.

The command path I have made is as follows -

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub

This command has eliminated the appearance of the message box with it's
accompanying "complaint". I no longer get the "Add filename to the command
line", nor are there any "compile" or "syntax" errors either.

Now when I single click upon the toolbutton(s), which are located both on
the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
open E-mail message, the AVG Shell Extension Box appears virtually
instantaneously stating "Test Finished". No Virus or suspicious files were
detected...". So far, so good.

BUT, there is an absence of any name in the "last file tested" field.
Because it is blank, without any name in that field I am doubting that it
has actually scanned anything.

That's the latest development in this "simple" <G> saga.

Regards,
 
G

George \(Bindar Dundat\)

If you search the net you can find some files for testing AV apps. (PCR might
remember the site) These are simulated viruses only. You could attach one to a
message to yourself and see if AVG picks it up. Actually I just found the page
again.
http://www.eicar.org/anti_virus_test_file.htm
Downloads are near the bottom.

--
George (Bindar Dundat)
This information is provided "AS IS"
It may even be wrong!
http://www.microsoft.com/security/articles/spam.asp
message |
| | >
| in message | >
| > > This one below is the Macro that I am having trouble with. I have added
| a
| > > tool button, but it then asks for the filename to be added to the
| command
| > > line.
| > >
| > > Sub ScanItemAVG()
| > > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
| > > End Sub
| >
| > The above code calls avgse.exe but you also need to pass a filename
| > to the program. How else would the program know what file you
| > want to scan?
| >
| > This might show you how to pass a parameter through the command line
| > to the program.
| >
| > Sub ScanItemAVG()
| > dim myfile
| > set myfile=c:\msdos.sys
| > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe" myfile)
| > End Sub
| >
| > Like I said though, I don't know anything about Outlook (or VB).
| > Where is this file you are trying to scan? I guess your code is
| > contained in the "button object"?
| >
| > Basically, you need to "get" the file object first, and then pass off the
| > the file's name property to AVG. The question I think, is, how to get the
| > file.name ?
| >
| ----------------------------------------------------------------------------
| --------------------
|
| Hi Bill-
|
| The "file" I am trying to scan is an E-mail message with attachments that is
| in my Outlook 2002 inbox. The reason for this desire to create a simple
| basic "Scan this Item, Now" toolbutton is to eliminate the need to click
| upon the attachment, sending it to a folder named "Scan for Virus" and then
| R-Clicking the "Scan with AVG" command. I have found a way to correctly
| enter the command without errors, thus eliminating the problem of my initial
| query.
|
| The command path I have made is as follows -
|
| Sub ScanItemAVG()
| Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
| End Sub
|
| This command has eliminated the appearance of the message box with it's
| accompanying "complaint". I no longer get the "Add filename to the command
| line", nor are there any "compile" or "syntax" errors either.
|
| Now when I single click upon the toolbutton(s), which are located both on
| the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
| open E-mail message, the AVG Shell Extension Box appears virtually
| instantaneously stating "Test Finished". No Virus or suspicious files were
| detected...". So far, so good.
|
| BUT, there is an absence of any name in the "last file tested" field.
| Because it is blank, without any name in that field I am doubting that it
| has actually scanned anything.
|
| That's the latest development in this "simple" <G> saga.
|
| Regards,
| --
| LuckyStrike
| (e-mail address removed)
| ----------------------------------------------------------------------------
| --------
|
|
|
 
L

LuckyStrike

This site was just thing I needed to do the test. AVG did detect both the
eicar.com and the eicar .text with alarming and satisfying rapidity. I was
not enabled by MS Word to attach a copy of the Eicar.com.to my Outlook
E-mail message to myself; " I am not authorized...." something to that
effect, so that failed . I was able to attach the text version to my self
addressed message but am unable to send it though. When I do a test of it in
my drafts folder with the macro, it does not detect anything, so I guess the
application will not work as I had hoped.

Thanks as usual George, I appreciate it.
--
LuckyStrike
(e-mail address removed)

George (Bindar Dundat) said:
If you search the net you can find some files for testing AV apps. (PCR might
remember the site) These are simulated viruses only. You could attach one to a
message to yourself and see if AVG picks it up. Actually I just found the page
again.
http://www.eicar.org/anti_virus_test_file.htm
Downloads are near the bottom.

--
George (Bindar Dundat)
This information is provided "AS IS"
It may even be wrong!
http://www.microsoft.com/security/articles/spam.asp
message |
| | >
| in message | >
| > > This one below is the Macro that I am having trouble with. I have added
| a
| > > tool button, but it then asks for the filename to be added to the
| command
| > > line.
| > >
| > > Sub ScanItemAVG()
| > > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
| > > End Sub
| >
| > The above code calls avgse.exe but you also need to pass a filename
| > to the program. How else would the program know what file you
| > want to scan?
| >
| > This might show you how to pass a parameter through the command line
| > to the program.
| >
| > Sub ScanItemAVG()
| > dim myfile
| > set myfile=c:\msdos.sys
| > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe" myfile)
| > End Sub
| >
| > Like I said though, I don't know anything about Outlook (or VB).
| > Where is this file you are trying to scan? I guess your code is
| > contained in the "button object"?
| >
| > Basically, you need to "get" the file object first, and then pass off the
| > the file's name property to AVG. The question I think, is, how to get the
| > file.name ?
| >
| --------------------------------------------------------------------------
--
| --------------------
|
| Hi Bill-
|
| The "file" I am trying to scan is an E-mail message with attachments that is
| in my Outlook 2002 inbox. The reason for this desire to create a simple
| basic "Scan this Item, Now" toolbutton is to eliminate the need to click
| upon the attachment, sending it to a folder named "Scan for Virus" and then
| R-Clicking the "Scan with AVG" command. I have found a way to correctly
| enter the command without errors, thus eliminating the problem of my initial
| query.
|
| The command path I have made is as follows -
|
| Sub ScanItemAVG()
| Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
| End Sub
|
| This command has eliminated the appearance of the message box with it's
| accompanying "complaint". I no longer get the "Add filename to the command
| line", nor are there any "compile" or "syntax" errors either.
|
| Now when I single click upon the toolbutton(s), which are located both on
| the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
| open E-mail message, the AVG Shell Extension Box appears virtually
| instantaneously stating "Test Finished". No Virus or suspicious files were
| detected...". So far, so good.
|
| BUT, there is an absence of any name in the "last file tested" field.
| Because it is blank, without any name in that field I am doubting that it
| has actually scanned anything.
|
| That's the latest development in this "simple" <G> saga.
|
| Regards,
| --
| LuckyStrike
| (e-mail address removed)
| --------------------------------------------------------------------------
--
 
S

Stefan Berglund

On Tue, 9 Sep 2003 22:57:29 -0600, "LuckyStrike"
OK, the latest development is that by a series of trials and errors, I have
gotten the Macro to "work". I have placed the word work in quotes as I'm not
sure it's really working. <G>

To clarify: The command path I have made is as follows -

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub

This command has eliminated the appearance of the message box with it's
accompanying "complaint". I no longer get the "Add filename to the command
line", nor are there any "compile" or "syntax" errors either.

Now when I single click upon the toolbutton(s), which are located both on
the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
open E-mail message, the AVG Shell Extension Box appears virtually
instantaneously stating "Test Finished". No Virus or suspicious files were
detected...". So far, so good.

BUT, there is an absence of any name in the "last file tested" field.
Because it is blank, without any name in that field I am doubting that it
has actually scanned anything.

What might anyone make of this?

Thanks yet again,

Insert a space between the two double quotes. Not sure about
that trailing backslash.

Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe" "%1\"
 
L

LuckyStrike

Hi Stefan,

I have tried various permutations of your suggestion. My results are varied
but similar. If I insert a space between the two double quotes as below I
get a Compile: Syntax error. It doesn't seem to want to run at all with the
double space. If I remove the trailing backslash, the compile/syntax error
isn't any longer showing as long as I remove the double space between the
quotes. The result is the same however, in that the application runs, but
there isn't a last file tested name in the field.

double space = syntax error

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe" "%\1")
End Sub
-----------------------------------
double space - no trailing backslash = syntax error

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe" "%1")
End Sub
------------------------------------
single space - no trailing backslash = no error, but the result is an empty
last tested file field

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1")
End Sub
------------------------------------
as originally done = no errors, but results are identical to the one
immediately preceding this one.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub
 
S

Stefan Berglund

On Wed, 10 Sep 2003 12:00:33 -0600, "LuckyStrike"
in said:
Hi Stefan,

I have tried various permutations of your suggestion. My results are varied
but similar. If I insert a space between the two double quotes as below I
get a Compile: Syntax error. It doesn't seem to want to run at all with the
double space. If I remove the trailing backslash, the compile/syntax error
isn't any longer showing as long as I remove the double space between the
quotes. The result is the same however, in that the application runs, but
there isn't a last file tested name in the field.

double space = syntax error

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe" "%\1")
End Sub
-----------------------------------
double space - no trailing backslash = syntax error

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe" "%1")
End Sub
------------------------------------
single space - no trailing backslash = no error, but the result is an empty
last tested file field

Sub ScanItem2AVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1")
End Sub
------------------------------------
as originally done = no errors, but results are identical to the one
immediately preceding this one.

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub
-----------------------------------

Thanks for your suggestions, but as yet doubtful to ever get it to work as I
had hoped. Even did an "Eicar" test with it, and the scan found nothing!!!
Something is not right with that, this is for certain.

The only other thing I can offer is that I missed the double
backslash preceding the exe which I don't think would ever be
valid. Use only a single backslash. Also remove the surrounding
parentheses which are no doubt the source of your syntax error.
 
G

George \(Bindar Dundat\)

You are most welcome LS. Glad it helped.

--
George (Bindar Dundat)
This information is provided "AS IS"
It may even be wrong!
http://www.microsoft.com/security/articles/spam.asp
message | This site was just thing I needed to do the test. AVG did detect both the
| eicar.com and the eicar .text with alarming and satisfying rapidity. I was
| not enabled by MS Word to attach a copy of the Eicar.com.to my Outlook
| E-mail message to myself; " I am not authorized...." something to that
| effect, so that failed . I was able to attach the text version to my self
| addressed message but am unable to send it though. When I do a test of it in
| my drafts folder with the macro, it does not detect anything, so I guess the
| application will not work as I had hoped.
|
| Thanks as usual George, I appreciate it.
| --
| LuckyStrike
| (e-mail address removed)
|
| | > If you search the net you can find some files for testing AV apps. (PCR
| might
| > remember the site) These are simulated viruses only. You could attach
| one to a
| > message to yourself and see if AVG picks it up. Actually I just found the
| page
| > again.
| > http://www.eicar.org/anti_virus_test_file.htm
| > Downloads are near the bottom.
| >
| > --
| > George (Bindar Dundat)
| > This information is provided "AS IS"
| > It may even be wrong!
| > http://www.microsoft.com/security/articles/spam.asp
| in
| > message | > |
| > | | > | >
| > | > "LuckyStrike" <[email protected]>
| wrote
| > | in message | > | >
| > | > > This one below is the Macro that I am having trouble with. I have
| added
| > | a
| > | > > tool button, but it then asks for the filename to be added to the
| > | command
| > | > > line.
| > | > >
| > | > > Sub ScanItemAVG()
| > | > > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe")
| > | > > End Sub
| > | >
| > | > The above code calls avgse.exe but you also need to pass a filename
| > | > to the program. How else would the program know what file you
| > | > want to scan?
| > | >
| > | > This might show you how to pass a parameter through the command line
| > | > to the program.
| > | >
| > | > Sub ScanItemAVG()
| > | > dim myfile
| > | > set myfile=c:\msdos.sys
| > | > Shell ("C:\Program Files\Grisoft\AVG6\avgse.exe" myfile)
| > | > End Sub
| > | >
| > | > Like I said though, I don't know anything about Outlook (or VB).
| > | > Where is this file you are trying to scan? I guess your code is
| > | > contained in the "button object"?
| > | >
| > | > Basically, you need to "get" the file object first, and then pass off
| the
| > | > the file's name property to AVG. The question I think, is, how to get
| the
| > | > file.name ?
| > | >
| >
| | --------------------------------------------------------------------------
| --
| > | --------------------
| > |
| > | Hi Bill-
| > |
| > | The "file" I am trying to scan is an E-mail message with attachments
| that is
| > | in my Outlook 2002 inbox. The reason for this desire to create a simple
| > | basic "Scan this Item, Now" toolbutton is to eliminate the need to click
| > | upon the attachment, sending it to a folder named "Scan for Virus" and
| then
| > | R-Clicking the "Scan with AVG" command. I have found a way to correctly
| > | enter the command without errors, thus eliminating the problem of my
| initial
| > | query.
| > |
| > | The command path I have made is as follows -
| > |
| > | Sub ScanItemAVG()
| > | Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
| > | End Sub
| > |
| > | This command has eliminated the appearance of the message box with it's
| > | accompanying "complaint". I no longer get the "Add filename to the
| command
| > | line", nor are there any "compile" or "syntax" errors either.
| > |
| > | Now when I single click upon the toolbutton(s), which are located both
| on
| > | the inbox of Outlook 2002, as well as upon the actual toolbutton area of
| an
| > | open E-mail message, the AVG Shell Extension Box appears virtually
| > | instantaneously stating "Test Finished". No Virus or suspicious files
| were
| > | detected...". So far, so good.
| > |
| > | BUT, there is an absence of any name in the "last file tested" field.
| > | Because it is blank, without any name in that field I am doubting that
| it
| > | has actually scanned anything.
| > |
| > | That's the latest development in this "simple" <G> saga.
| > |
| > | Regards,
| > | --
| > | LuckyStrike
| > | (e-mail address removed)
| >
| | --------------------------------------------------------------------------
| --
| > | --------
| > |
| > |
| > |
| >
|
|
 
L

LuckyStrike

The only other thing I can offer is that I missed the double
backslash preceding the exe which I don't think would ever be
valid. Use only a single backslash. Also remove the surrounding
parentheses which are no doubt the source of your syntax error.

---------------------------------------------------------
Stefan,

OK, I've tried all the remaining possibilities and results are the same; No
syntax, compile, add filename errors, but the D****** thing still is unable
to truly indicate that it scanned any file. Sure, it says it tested and
found nothing, but I really wonder.

Oh well, back to the drawing board yet again. Thanks Stefan, for so doggedly
pursuing this; I am deeply appreciative of your attempts to help me.

Regards,
 
L

Lee

LuckyStrike said:
OK, the latest development is that by a series of trials and errors, I have
gotten the Macro to "work". I have placed the word work in quotes as I'm not
sure it's really working. <G>

To clarify: The command path I have made is as follows -

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
End Sub

This command has eliminated the appearance of the message box with it's
accompanying "complaint". I no longer get the "Add filename to the command
line", nor are there any "compile" or "syntax" errors either.

Now when I single click upon the toolbutton(s), which are located both on
the inbox of Outlook 2002, as well as upon the actual toolbutton area of an
open E-mail message, the AVG Shell Extension Box appears virtually
instantaneously stating "Test Finished". No Virus or suspicious files were
detected...". So far, so good.

BUT, there is an absence of any name in the "last file tested" field.
Because it is blank, without any name in that field I am doubting that it
has actually scanned anything.

What might anyone make of this?

Thanks yet again,

Did you try it as below?
Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe %1\")
End Sub

I know nothing of Macros and wouldn't have commented except
for where you said you wanted a right click run of AVG on
file 'whatever'. My reg file, if imported, should give you
that. My attempt above at writing Macros(?) is only based on
the syntax that I have learned to expect as found in the
registry - it may or may not work when compiled(?) by
whatever process you are using. I don't understand the
need for the single double backslash just for starters.
Perhaps you need to also try

Sub ScanItemAVG()
Shell ("C:\Program Files\Grisoft\AVG6\AVGSE.exe %1\")
End Sub

Best of luck as I'm no more help.
 
L

LuckyStrike

Lee,

I'm going to give this a looking into when I return a little later today.
Thanks a lot.
 
C

cquirke

On Tue, 9 Sep 2003 23:06:31 -0600, "LuckyStrike"
The "file" I am trying to scan is an E-mail message with attachments that is
in my Outlook 2002 inbox. The reason for this desire to create a simple
basic "Scan this Item, Now" toolbutton is to eliminate the need to click
upon the attachment, sending it to a folder named "Scan for Virus" and then
R-Clicking the "Scan with AVG" command.

Give up now, because the way most email apps store data make this
impossible - what you want to scan is hidden within the mailbox file.

See http://users.iafrica.com/c/cq/cquirke/empath.htm

--------------- ----- ---- --- -- - - -
Error Messages Are Your Friends
 
G

George \(Bindar Dundat\)

Not to mention that if you have Email scanning enabled *AND* the OE plug-in
enabled, you won't get a chance to open the attachment before AVG catches it.
However it is probably a good exercise in VBA.

--
George (Bindar Dundat)
This information is provided "AS IS"
It may even be wrong!
http://www.microsoft.com/security
message | Lee,
|
| I'm going to give this a looking into when I return a little later today.
| Thanks a lot.
| --
| LuckyStrike
| (e-mail address removed)
| ------------------------------------------------------------------------
| | in message | > >
| > > OK, the latest development is that by a series of trials and errors, I
| have
| > > gotten the Macro to "work". I have placed the word work in quotes as I'm
| not
| > > sure it's really working. <G>
| > >
| > > To clarify: The command path I have made is as follows -
| > >
| > > Sub ScanItemAVG()
| > > Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe""%1\")
| > > End Sub
| > >
| > > This command has eliminated the appearance of the message box with it's
| > > accompanying "complaint". I no longer get the "Add filename to the
| command
| > > line", nor are there any "compile" or "syntax" errors either.
| > >
| > > Now when I single click upon the toolbutton(s), which are located both
| on
| > > the inbox of Outlook 2002, as well as upon the actual toolbutton area of
| an
| > > open E-mail message, the AVG Shell Extension Box appears virtually
| > > instantaneously stating "Test Finished". No Virus or suspicious files
| were
| > > detected...". So far, so good.
| > >
| > > BUT, there is an absence of any name in the "last file tested" field.
| > > Because it is blank, without any name in that field I am doubting that
| it
| > > has actually scanned anything.
| > >
| > > What might anyone make of this?
| > >
| > > Thanks yet again,
| >
| > Did you try it as below?
| > Sub ScanItemAVG()
| > Shell ("C:\Program Files\Grisoft\AVG6\\AVGSE.exe %1\")
| > End Sub
| >
| > I know nothing of Macros and wouldn't have commented except
| > for where you said you wanted a right click run of AVG on
| > file 'whatever'. My reg file, if imported, should give you
| > that. My attempt above at writing Macros(?) is only based on
| > the syntax that I have learned to expect as found in the
| > registry - it may or may not work when compiled(?) by
| > whatever process you are using. I don't understand the
| > need for the single double backslash just for starters.
| > Perhaps you need to also try
| >
| > Sub ScanItemAVG()
| > Shell ("C:\Program Files\Grisoft\AVG6\AVGSE.exe %1\")
| > End Sub
| >
| > Best of luck as I'm no more help.
|
|
 
G

George \(Bindar Dundat\)

You may want to try the microsoft.public.outlook.program_vba group

--
George (Bindar Dundat)
This information is provided "AS IS"
It may even be wrong!
http://www.microsoft.com/security
message | If these are the wrong NG's for this issue, would someone be so kind as to
| direct me to the proper one?
|
| I have created a couple of Macros for Outlook 2002 (a part of Office XP).
| The first Macro is to enable the direct one click running of my AV scanner;
| a new tool button was created for this purpose. It Works beautifully. The
| only shortcoming was it scans *everything*; this is way too lengthy a
| process.
|
| I then created a second Macro to run the Shell extension (AVGSE.exe.) of AVG
| AV, the purpose of which is to simply scan the one item in question. It's
| not quite done yet as a problem arose.
|
| Here is the problem: When I attempt to run it, a small message box appears
| which states the following information - AVG Simple Checker. Add Filename to
| the command line.
|
| What is meant by this exactly and how/where do I perform this?
|
| Thanks,
| --
| LuckyStrike
| (e-mail address removed)
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top