Nareshm

Cmd does Not Close when Run Shorcut (.lnk)

7 posts in this topic

When i start my application's shortcut (.lnk) using autoit script, CMD Does not close automaticaly.

my code is

Run(@ComSpec & " /c " & "C:\myapp.lnk")

 

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites
20 minutes ago, spudw2k said:

You could use ShellExecute instead of Run and avoid opening a CMD prompt all together.

Code ??

Share this post


Link to post
Share on other sites

Look at the example in your help file, or click the link to view the online help article. 

ShellExecute

Let us know what you need help with after reading it,

Share this post


Link to post
Share on other sites

#5 ·  Posted

You could also include Process.au3 then have a _RunDos("<command>") there

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Alternately,

Run(@ComSpec & " /c " & "C:\myapp.lnk")
Send ("exit {ENTER}")

perhaps?

Edited by aleph01
correction

Meds.  They're not just for breakfast anymore. :'(

Share this post


Link to post
Share on other sites

#7 ·  Posted

You could also do

#include <Process.au3>

_RunDos("C:\myapp.lnk")

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now