mr-es335 Posted 3 hours ago Posted 3 hours ago Good day, I have been attempting to create a create an argument within a "cmd statement" For example: ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- CreateOn_SignInLink() ; ----------------------------------------------- Func CreateOn_SignInLink() Local $targetPath = "C:\Windows\System32\cmd.exe" Local $Argument = "D:\App_Install\Digital_Audio\name\Assets\On_SignInTest.au3" Local $sDstPath = "D:\App_Install\Digital_Audio\name\Assets\On_SignInTest.lnk" ; ----------------------------------------------- ;~ FileCreateShortcut($targetPath, $sDstPath, "", '/c start "" "D:\App_Install\Digital_Audio\name\Assets\On_SignInTest.au3"') FileCreateShortcut($targetPath, $sDstPath, "", '/c start "" & $Argument) EndFunc ;==>CreateOn_SignInLink ; ----------------------------------------------- The string succeeding ", "", '/c start """ is what I wish to make into a variable - in this case, "$Argument". The following was suggested, but I have been unable to get this work?! Local $Argument = "/c start ""YourExecutable.exe"" /high" Any ideas?!? mr-es335 Sentinel Music Studios
mr-es335 Posted 1 hour ago Author Posted 1 hour ago A slight update: ; ----------------------------------------------- #include <FileConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- CreateSignInTestLink() ; ----------------------------------------------- Func CreateSignInTestLink() Local $targetPath = "C:\Windows\System32\cmd.exe" Local $sDstPath = "C:\Users\RML_User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\On_SignInTest.lnk" ; ----------------------------------------------- FileCreateShortcut($targetPath, $sDstPath, "", '/c start "" "D:\App_Install\Digital_Audio\1_RMLLabs\Assets\On_SignInTest.au3"', "", "", "", 0, 7) EndFunc ;==>CreateSignInTestLink ; ----------------------------------------------- mr-es335 Sentinel Music Studios
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