Creating a shortcut for project via command line arguments and native clientlauncher?

Using 7.9.9.

I wrote a batch file that will download/run the native vision client launcher so that our customer can distribute the file to the end users to make getting to the vision application as easy as possible.

I was referencing these docs to write it -
Native Client Launchers - Ignition User Manual 7.9 - Ignition Documentation .

It works but one thing my file does not do that the vision native client launcher does is create a shortcut on the desktop. Is there some additional argument I can add to do this? Or would this require my making a shortcut manually with all the proper arguments? Just wondering how this can be accomplished.

Nothing special about the shortcuts. You should be able to script it after establishing what you need. (Not sure what tool to use in windows, though, if that is what you are using. Linux shortcuts are text files with the .desktop extension.)

1 Like

So create the shortcut manually. Ok that's fine, I just wanted to see if there is a built-in way first so there's less chance of my making a mistake.

The company only uses windows (at least AFAIK) so this is all for windows. Thanks

For posterity as it took me longer than I wanted to learn how to make a shortcut in windows, but basically call out to a vbscript from the batch file. It's ugly as sin and the accepted top answer to this post windows - How to create a shortcut using a batch script? - Super User

Windows overcomplicating things imo

set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs"

echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT%
echo sLinkFile = "%USERPROFILE%\Desktop\DPD Weeklies.lnk" >> %SCRIPT%
echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT%
echo oLink.TargetPath = "%USERPROFILE%\Documents\Ignition\clientlauncher.exe" >> %SCRIPT%
echo oLink.Arguments = "gateway.addr=localhost:8088/main scope=C project=DPDWeeklies" >> %SCRIPT%
echo oLink.Save >> %SCRIPT%

cscript /nologo %SCRIPT%
del %SCRIPT%

Change your arguments as needed as well as your TargetPath

3 Likes

Oy!

3 Likes