Sign in to follow this  
Followers 0
willwatters

How to start an application thats in Start menu

4 posts in this topic

I ran the below code to run/open an application from the following path but it didn't work successfully - D:\documents and settings\All Users\Start Menu\Programs\Mitratech\Claim Litigation Mailer Utility.lnk:

;Launch Claim Litigation Mailer Utility from start menu > programs

$details = FileGetShortcut(@StartMenuCommonDir & "\Programs\Mitratech\Claim Litigation Mailer Utility.lnk")

$mycommandline = $details[0]& " " & $details[2]

run ($mycommandline,"",@SW_MAXIMIZE)

Sleep(2000)

I would appreciate your help in correcting this code.

Thanks.

Share this post


Link to post
Share on other sites



Does it work with simply Run and the hardcoded path of the executable?

That is, rule out the FileGetShortcut fn?

I might be curious to see if @StartMenuCommonDir ends with a \ already.

J


If I am too verbose, just say so. You don't need to run on and on.

Share this post


Link to post
Share on other sites

Your curiosity seems to spread. Just checked: 'C:\Documents and Settings\All Users\Start Menu'. It's good to see that our nice devs are consistent with that 'no trailing slash' thing. Makes it very simple...too bad I always forget that and error myself out with it :(

Take a look at all my error logs some times, most of them are I-D-10-T errors :(


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

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
Sign in to follow this  
Followers 0