keyongtech


  keyongtech > outlook.* > outlook.general > 09/2003

 #1  
09-09-03, 11:53 PM
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,
 #2  
09-10-03, 01:03 AM
Bill Blanton
"LuckyStrike" <LS> wrote in message news:2176
> 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.
 #3  
09-10-03, 03:37 AM
Lee
"LuckyStrike" <LS> wrote in message news:2176
[..]
> 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.
 #4  
09-10-03, 04:12 AM
LuckyStrike
"Bill Blanton" <bblanton> wrote in message
news:1884

> "LuckyStrike" <LS> wrote

in message news:2176
> > <snipped>
> > 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.


> > I then created a second Macro to run the Shell extension (AVGSE.exe.) of

AVG
> > AV
> > 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.


> > <snipped for brevity>

----------------------------------------------------------------------------
--------------------------------------
> 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-
 #5  
09-10-03, 04:34 AM
LuckyStrike
"Lee" <melee5> wrote in message
news:3b44
> "LuckyStrike" <LS> wrote

in message news:2176
> > <Snipped>
> > > >

> > 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,
 #6  
09-10-03, 05:35 AM
Bill Blanton
"LuckyStrike" <LS> wrote in message news:1632

> 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 ?
 #7  
09-10-03, 05:57 AM
LuckyStrike
"LuckyStrike" <LS> wrote in
message news:3260
[..]
 #8  
09-10-03, 06:06 AM
LuckyStrike
"Bill Blanton" <bblanton> wrote in message
news:2816
>
> "LuckyStrike" <LS> wrote

in message news:1632
>
> > 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
[..]
> 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,
 #9  
09-10-03, 07:15 AM
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.
 #10  
09-10-03, 08:00 AM
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.
 #11  
09-10-03, 06:11 PM
Stefan Berglund
On Tue, 9 Sep 2003 22:57:29 -0600, "LuckyStrike"
<LS> wrote:
in <e6A1Mg1dDHA.3676>
[..]
>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\"
 #12  
09-10-03, 07:00 PM
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
-----------------------------------

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.
 #13  
09-10-03, 09:08 PM
Stefan Berglund
On Wed, 10 Sep 2003 12:00:33 -0600, "LuckyStrike"
<LS> wrote:
in <#JQswV8dDHA.1656>

[..]
>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.
 #14  
09-10-03, 09:53 PM
George \(Bindar Dundat\)
You are most welcome LS. Glad it helped.
 #15  
09-10-03, 10:45 PM
LuckyStrike
"Stefan Berglund" <keepit> wrote in message
news:6iml
> On Wed, 10 Sep 2003 12:00:33 -0600, "LuckyStrike"
>wrote:
> in <#JQswV8dDHA.1656>
> <snipped for brevity>
> >I have tried various permutations of your suggestion. My results are

varied
> >but similar.The result is the same however, in that the application runs,

but
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
> >

------------------------------------------------------
> Stefan wrote:


> 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,

Similar Threads
vc++ 6.0 shell extension - get selected file names

Hi! I write application, that must get from explorer selected file names and put this to listview on my dialog application listview. I've created dialog based application and...

file extension for korn shell script

If I write korn shell script, then the official file extension should be .ksh. correct? I read some scripts that don't have file extension at all. I jsut want to know the...

Shell Extension for any file type

Greetings, I'd like to write a shell extension so that a user can right-click on any file, regardless of its extension, and my extension will appear as one of the choices on...

Shell Extension -adding file name/command extension

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...

Get shell icon from file extension

Hi, I am writing a program that have some filenames collected in a List View. Then I need to display the correct icon for each of them according to the extension of the...


All times are GMT. The time now is 01:37 AM. | Privacy Policy