ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

.lnk files - arguments not passed to .exe?

(1/1)

highend01:
Hi,

A very simple .ahk script, that outputs all command line parameters it receives


--- ---Loop, %0%  ; For each parameter:
{
    param := %A_Index%  ; Fetch the contents of the variable whose name is contained in A_Index.
    MsgBox, 4,, Parameter number %A_Index% is %param%.  Continue?
    IfMsgBox, No
        break
}

This one will be compiled into "Get command line parameters.exe"

If invoked from a command prompt with:

--- ---"R:\Get command line parameters.exe" "arg1" "arg2"It outputs both arguments correctly

But when I now create a shortcut to the .exe file

--- ---"R:\Get command line parameters.exe.lnk"
and put the command line arguments into the target field of this shortcut e.g. with:

--- ---"R:\Get command line parameters.exe" "arg1" "arg2"
The called .exe will output: nothing!

Both params aren't passed to the .exe file...

System: Windows Server 2012 R2 U3 x64

Does anyone have an idea on what is causing this behavior?

Navigation

[0] Message Index

Go to full version