Unable to use Node-Webkit's "Run file" action

0 favourites
  • 14 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • Hi,

    I am trying to use the Node webkit's action "Run file" to execute/run a program or open a file and I am not able to do this.

    For example, I've been trying to open the program "dxwebsetup.exe" present in the AppFolder and it does not do anything.

    I write the path like this: NodeWebkit.AppFolder & "dxwebsetup.exe"

    I've also try it using the UserFolder (placing the files in my user folder) and trying to open other .exe programs and other type of files like .pdf but it has never worked.

    I've try it in preview mode with Node-Webkit preview browser and also exporting the project with Node-Webkit and running it.

    Nevertheless, the "Write File" action, for example, did work. The only action I can't make work is "run file". And it is the one I need :(

    Somebody can help me??

  • any advice?

    Somebody that has used the run file action??

  • You had it mostly right. You need to add a preceding forward-slash to your expression: NodeWebkit.AppFolder & "/dxwebsetup.exe".

  • GeometriX thanks for your reply!

    I've already tried with the slash and it didn't work :(

    I've tried it with and without slash, changing the paths, changing the .exe's etc and it never worked.

    Did you make it work?

  • Yup, I tested it on my side and it works perfectly. Export a NW version from this capx [r140] and see if it works. If it doesn't, then there might be something like an anti-virus preventing the app from launching another file.

  • Hi GeometriX.

    I've tried your capx and it doesn't work here. It is really weird. I don't know what might be avoiding the execution of the .exe.

    I've tried it with R139 and R141. In two different pc, one running windows 7 Home Premium 64b and the other one with Windows 8 64b. I've also disabled the antivirus and even the firewall! But nothing...

    Ashley any ideas what might be happening??

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I've finally make it work!!

    Exporting via Node WebKit but using the r140 release!

    Ashley, in my two pc`s at least, "run file" action doesn't work in r139 and in r141. It did work in r140. Seems that in r141 something might have broken node webkit's "run file" action

  • Awesome, glad you figured it out. You should file a bug report in that forum; bugs mentioned elsewhere pretty-much get forgotten about.

  • Not sure where appPath is on a preview unless its saved first, but it probably wont work unless you do that.

    Its also possible that it may not work at all in preview mode for some computers.

    Also, just to make sure, Node-webkit wont run if the user doesn't have DirectX installed anyway.

    I know you are probably just doing it as an exercise, but I just thought I'd point it out.

  • I've found out that the main problem was that the path of the file to execute with the "run file" action must NOT have any spaces in it. Otherwise it doesn't work.

    I guess that's why it is not working in preview, beacuse of the space in "Program Files".

    I've exported a project to the desktop in a folder with no spaces in its name, execute it, and the run file action works perfectly. And then move the same folder to Program Files, execute it, and run file stopped working.

  • You should wrap the whole thing in quotation marks then if there's a space in the path.

    """" & NodeWebkit.AppFolder & "dxwebsetup.exe"""
  • ramones Damn! I was going to say that.

  • Also, files that run in terminal won't start as I mentioned here: https://www.scirra.com/forum/viewtopic.php?f=147&t=93044

  • didn't Noncentz705 method help your problem?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)