Yes, IMail definitely has some issues, and it's almost certainly due to
the context. It will successfully use a BAT file to call another
program, but not a VBS script to call another program, however VBS
scripts will execute other sorts of code.
I figured out a workaround for this though, without having to go the
executable route. I'm using a BAT file as the program alias and it
calls the VBS program which does some stuff and then calls the other
program. This works. Here's the BAT code that I'm using:
copy %1 c:\IMail\Declude\Sniffer\UpdateNotification.txt
cd c:\Imail\Declude\Sniffer
sniffer_update.vbs %1
It's a kludge, and almost certainly an IMail thing where it doesn't use
the correct context, but this works and it's not all that messy. Geesh.
Thanks for your offer,
Matt
Kevin Bilbee wrote:
I missed that for some reason. I beleive that
imail has issues with running scripts. If you look in tha archives this
has been covered you need to run an executable with an imail program
alias.
Can you just create a quick vb program to do
the same thing and put that in your alias???? If not I can create a
.net exe for you.
Kevin Bilbee
Kevin,
It works both ways if you call the script from the command line, but it
won't run the script from within a VBS file when called from IMail's
program alias. The problem seems to be the context from which IMail is
running these scripts.
I wrote a batch file that gets called from the program alias, and this
works, but not a VBS script as shown in my example. This is some sort
of environment issue I believe, and not related to the code. Any ideas
about what sort of environment things could be affecting this when
called from IMail?
Thanks,
Matt
Kevin Bilbee wrote:
You need to do a
Shell.Run "cmd /C c:\imail\declude\sniffer\autoSNF.cmd"
cmd is the exe you want to run .cmd files require an interperter to run them
which just happens to be cmd.exe and the /C switch tells CMD.exe to execute
your auto.SNF.cmd script.
do a cmd /? and you will see many options for cmd.exe.
Kevin Bilbee
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matt
Sent: Friday, January 23, 2004 9:49 AM
To: [EMAIL PROTECTED]
Subject: [IMail Forum] Problems with Program Alias
I've tested this program alias with a BAT file that just simply copies
the TMP file to a new location, and that works, however I am not finding
it possible to do something not that entirely different.
I have a program alias that points to a VBS script, and while I have
verified that this VBS script will run, it will not execute the
following command when called by IMail:
Set Shell = CreateObject("wscript.shell")
Shell.Run "c:\imail\declude\sniffer\autoSNF.cmd"
I've emptied the script so that this is all that it contains. If I run
it from a command line, it works perfectly, however if I try to call it
from a program alias, it does not run the embedded command. I have
verified that other segments of the script (when used) will run
correctly, just not the line that calls this other script.
I got this code from the Message Sniffer Web site, something that
another user submitted. I have to assume that in other IMail
installations, this works. On my IMail 8 server, program aliases do
work, but in this case, it just refuses to call this other program...
Any thoughts?
Thanks,
Matt
--
=====================================================
MailPure custom filters for Declude JunkMail Pro.
http://www.mailpure.com/software/
=====================================================
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
--
=====================================================
MailPure custom filters for Declude JunkMail Pro.
http://www.mailpure.com/software/
=====================================================
--
=====================================================
MailPure custom filters for Declude JunkMail Pro.
http://www.mailpure.com/software/
=====================================================
|