Code Red => AutoLISP (Vanilla / Visual) => Topic started by: @_Bilal on February 12, 2019, 07:19:31 PM
Title: Running shortcut with autolisp
Post by: @_Bilal on February 12, 2019, 07:19:31 PM
Hi Guys,
Someone can help me to run from AutoLISP using Shell object the following shortcut Target: C:\Users\Myfolder\updater.exe /checknow
thank you in advance
Title: Re: Running shortcut with autolisp
Post by: MP on February 12, 2019, 07:57:38 PM
A bit long in the tooth and I don't have time to test if it still works but the shortcut portion of this code worked way back when ... link (http://www.theswamp.org/index.php?topic=25051.msg301679#msg301679[/url).
Title: Re: Running shortcut with autolisp
Post by: Lee Mac on February 13, 2019, 08:23:20 AM
Title: Re: Running shortcut with autolisp
Post by: JohnK on February 13, 2019, 08:41:54 AM
The original question is a little confusing--and I think Lee has already answered it but if the question is: "how to create a shortcut with lisp", I had this in one of my old files. You will have to update the information to suit your needs.
Title: Re: Running shortcut with autolisp
Post by: @_Bilal on February 13, 2019, 09:56:52 AM
Tanks for All
The target file "updater.exe" resides in "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe" While the shortcut "soft_Updater.lnk" resides in "C:\\Users\\username\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\softwareFolder\\soft_Updater.lnk"
When i ran the updater.exe file from the target directly (command "_.shell" "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe") failed result:-------the cmd screen run then close immediatetly
(command "_.shell" "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe /checknow") success result:-------But two screens run at the same time one is cmd screen and the other is for updater.exe
when trying to run the shortcut "soft_Updater.lnk" (command "_.shell" "C:\\Users\\username\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\softwareFolder\\soft_Updater.lnk") failed result:-------the cmd screen run then close immediatetly
When using Lee Mac function (LM:Open "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe") return T:-------but nothing happens.
(LM:Open "C:\\Users\\username\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\soffold\\soft_Updater.lnk") Return T:------------the updater.exe run alone without the cmd screen. Which is perfect
What i am looking for is to run (LM:open "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe /checknow") is it possible?
Title: Re: Running shortcut with autolisp
Post by: VovKa on February 13, 2019, 10:31:43 AM
Title: Re: Running shortcut with autolisp
Post by: MP on February 13, 2019, 12:27:58 PM
Absolute VovKa. :)
Title: Re: Running shortcut with autolisp
Post by: @_Bilal on February 13, 2019, 03:05:09 PM
Great,
(startapp "C:\\Users\\username\\AppData\\Roaming\\softwareFolder\\updater.exe" "/checknow") success result:-------------updater.exe run in a proper manner