Run application from cmd button

  • Thread starter Thread starter TKM
  • Start date Start date
T

TKM

I have a word 2003 document attached to an email. I would like to place a
comand button on the document when pushed. It will fire off an install of
another application within netInstall. I am new coder and having trouble. Can
anyone help with this? Seems like should be fairly simple?
 
This is very unlikely to work, because the user will get a warning that
the Word document contains macros and any reasonably intelligent user isn't
going to allow such macros to run, at least not without looking at them
first.

In any case, I don't see that this has anything at all to do with Outlook.
 
Thanks for your reply. What I am trying to accomplish is..when a user clicks
on a button I want this snippit of code to run in the "Run Box" unless there
is a easier way. Our company would like to automate an install of HDE and the
button will be on a word doc attachment. How can you pass this code to the
run box to excute? Yes I changed the lic key number just in case. Thank you
for your time

cmd.exe /k
"c:\program
files\netinst\niinst32.exe",/Execute:{189BF419-4CD6-4311-9IUYE-F98C897HUJK98JUH006} /install
 
still wont run. any other suggestions. How come noboby gives full
explinations on this subject?
 
You have to understand that we can't see what you see, or know what
you know. You complain that nobody is giving you the amount of
explanation you desire, yet you write "still won't run" without
providing any details whatsoever.

The link I sent you has an example similar to what you're trying to
do. Did you format the method call correctly? Why not post what you
tried, so we can see what didn't work.

If you do it manually does it run?

Have you tried the Shell function?

http://www.freevbcode.com/ShowCode.asp?ID=264
or
http://msdn.microsoft.com/en-us/library/xe736fyk(VS.80).aspx


--JP
 
I was able to get it to work like this..

RetVal = Shell("cmd.exe /k """"c:\program
files\netinst\niinst32.exe"",/Execute:{189BF419-4BVB-4311-9C3E-F989876UJH86}
/install""""")


However when I went to cope the entire word document into Outlook and send
it to me as a test. I was not able to see the button nor did it work.
Mentioned something about Active X settings. However our Network Admin says
it should be fine. Ideas?

Thanks for your help
 
You'd need to attach the Word document to a message, not copy the document
into the Outlook message body. Then the user would have to open the document
and, most likely, say yes to a prompt asking if it's OK to run a macro. If I
were a well-trained user, I'd say no and leave it at that. If I were also a
savvy, curious user, I'd go look at the macro code, and when if I didn't
understand what niinst32.exe and {189BF419-4BVB-4311-9C3E-F989876UJH86}
mean, I still wouldn't run it. You might try to get around that with some
official-sounding text in the document, but some users probably still will
be suspicious, as they should be.

FWIW, as JP indicated earlier, statements like 'mentioned something about
Active X settings' are not very helpful in troubleshooting. What may be
helpful is providing the full text of any error messages or warnings and
details of any other symptoms that seem relevant.
 
Back
Top