ur Posted August 16, 2017 Posted August 16, 2017 I am trying to launch the shortcut through autoit, but I am getting below error. [Window Title] C:\Windows\system32\cmd.exe /c start "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk" [Content] Windows cannot find 'C:\Windows\system32\cmd.exe /c start "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk"'. Make sure you typed the name correctly, and then try again. [OK] Launching the target directly is not feasible as it is dynamic. I tried. $r = ShellExecute(@ComSpec & " /c " & "start """& @ProgramsCommonDir & "\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk""") and also Run and RUnwait
mikell Posted August 16, 2017 Posted August 16, 2017 Did you try ShellExecute(@StartMenuDir & "\Programs\erwin\erwin Mart Server r9.8 (64-bit)\Create MartServer Service.lnk") ?
ur Posted August 17, 2017 Author Posted August 17, 2017 Same issue with the @StartMenuDir also.. And even I tried below folders also. But the files do exist. Please see the below console output of dir.
ur Posted August 17, 2017 Author Posted August 17, 2017 When I remove the .lnk then it is not giving the file not found error. But it is not executing the shortcut also.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now