Skip to content

os.start() not working for .lnk and .bat files? #35

@Stackor

Description

@Stackor

I am trying to make a custom remote with buttons starting different Windows 10 apps.

Building upon the example files, I already defined appropriate functions using os.start() and a layout with buttons to trigger them on tap.

To keep things flexible, I do not want to hardcode the path to each app's executable in the .lua.
Instead, I use os.start() to launch generic Windows .lnk files inside a subfolder of the remote which "point" to the executables:

actions.command1 = function ()
  os.start("\"C:\\ProgramData\\Unified Remote\\Remotes\\Custom\\WinApps\\Links\\Command1.lnk\"");
end

Unfortunately, the remote shows up on my client, but the buttons won't work.
Tried to run a .bat file instead, to no avail either.

Is os.start() limited to .exe files only?

Or am I maybe doing something wrong with the string escapes?
(I added surrounding escaped doublequotes to the string because I know that command prompt requires them if the path contains spaces.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions