Run application from cmd button

Status
Not open for further replies.
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?
 
S

Sue Mosher [MVP]

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.

Sue Mosher

"TKM" <TKM> wrote in message

news:480AEDDA-8406-4D2C-BBD9-05F109954614@microsoft.com...
> 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?
 
T

TKM

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

"Sue Mosher [MVP]" wrote:


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

> > Sue Mosher
> > >

> "TKM" <TKM> wrote in message
> news:480AEDDA-8406-4D2C-BBD9-05F109954614@microsoft.com...
> >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?


> .
>
 
J

JP

Check out the Run Method of the WshShell Object.

http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx

--JP

On Oct 30, 11:30 am, TKM <T...> wrote:
> 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 andthe
> 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-F98C897HUJK9­8JUH006} /install

>
 
T

TKM

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

"JP" wrote:


> 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

> On Oct 30, 3:47 pm, TKM <T...> wrote:
> > still wont run. any other suggestions. How come noboby gives full
> > explinations on this subject?
> > "JP" wrote:
> > > Check out the Run Method of the WshShell Object.

> >
> > >http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx

> >
> > > --JP

> >

> .
>
 
S

Sue Mosher [MVP]

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.

Sue Mosher

"TKM" <TKM> wrote in message

news:3FB74813-A150-4D5A-8978-8B359401A978@microsoft.com...
> 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

> "JP" wrote:
>
> > 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
>

>> On Oct 30, 3:47 pm, TKM <T...> wrote:
> > > still wont run. any other suggestions. How come noboby gives full
> > > explinations on this subject?
> >>>> > "JP" wrote:
> > > > Check out the Run Method of the WshShell Object.
> >> > >http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx
> >> > > --JP
> > >

> > .
> >
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
K Run a script rule to auto 'send again' on undeliverable emails? Outlook VBA and Custom Forms 1
G Save attachment run a script rule Outlook VBA and Custom Forms 0
U Outlook 2019 VBA run-time error 424 Outlook VBA and Custom Forms 2
D Outlook 2013 Macros only run in VB editor, not in drop down or button Outlook VBA and Custom Forms 10
D We're sorry but outlook has run into an error Using Outlook 6
M White square in body of Outlook Messages (O2016 Version 2012 32bit Click To Run) Using Outlook 4
E Having some trouble with a run-a-script rule (moving mail based on file type) Outlook VBA and Custom Forms 5
C Auto Run VBA Code on new email Outlook VBA and Custom Forms 1
Aussie Rules Run a Script on an Incoming Email OK and then the Email reverts Outlook VBA and Custom Forms 0
A Apply Selected Emails to outlook rules and Run Rules Using Outlook 5
B VBScript doesn't run on Recipient Email Outlook VBA and Custom Forms 2
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
S Outlook Custom Form Scripting only working when clicking on "Run this form" Outlook VBA and Custom Forms 2
Y Outlook 2013 Run A Script Outlook VBA and Custom Forms 4
O Outlook 2016 This rule will only run when you check your email in Outlook.... Using Outlook 4
B run scripts Using Outlook 1
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
Dave A Run macro on existing appointment when it changes Outlook VBA and Custom Forms 1
O Run macro automatically at sending an email Using Outlook 11
P errors appear every time I run SCANPST Using Outlook 3
B Outlook rule run a Script doesn't work Outlook VBA and Custom Forms 1
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
B Wanting to run a script that will filter any body that has a russian link in it. Outlook VBA and Custom Forms 5
P Run Time Error 91 when linking contact to task in VBA Outlook VBA and Custom Forms 1
O Having rules run on old mails noved to inbox Outlook VBA and Custom Forms 8
Bri the Tech Guy Registry Tweak to make "Run a Script" Action Available Outlook VBA and Custom Forms 2
Bri the Tech Guy Run Script rule not running for newly arriving messages Outlook VBA and Custom Forms 25
J Custom form code doesn't run Outlook VBA and Custom Forms 2
J VBA Run When Reply Outlook VBA and Custom Forms 4
Vijay Error in rule- Run a script Using Outlook 1
Vijay Run script doesn't work in outlook Using Outlook 1
O VBA to Run Font Change on Outlook Startup Outlook VBA and Custom Forms 4
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
Diane Poremsky Run a Script Rule: Send a New Message when a Message Arrives Using Outlook 2
Diane Poremsky Using Scanpst in Outlook Click to Run Using Outlook 0
oliv- How to Run a Script IN AN ADDIN with Outlook's Rules and Alerts Outlook VBA and Custom Forms 2
L Run a Script Rule doesn't work Using Outlook 5
B Can't run macro from QAT when emailing from Acrobat Outlook VBA and Custom Forms 0
J Outlook 2010 VBScript editor does not run code at all Outlook VBA and Custom Forms 0
X Outlook script to run excel data Outlook VBA and Custom Forms 1
D How to Run a Report Based on Age of Inbox Items Outlook VBA and Custom Forms 0
D RUN SCRIPT WHEN OUTLOOK IS CLOSE Outlook VBA and Custom Forms 1
L Cannot run script from rule Outlook VBA and Custom Forms 7
M Office 365 Click to run BCM (Business Contact Manager) 0
O modify vba to run it as script rule Outlook VBA and Custom Forms 8
D Must now "View on Facebook" for Mentions/Comments-Outlook 2013 click-to-run Using Outlook 2
P How many subs can run in one outlook VBA script Using Outlook 5
R Outlook won't run except in Safe mode problem Using Outlook 5
K Revert AutoArchive settings via GPO (Run Autoarchive every...) Using Outlook 4
Xueying run a script in rules, first time succeed, failed afterwards Outlook VBA and Custom Forms 3

Similar threads

Top