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

Get help using Construct 2

Post » Tue Aug 13, 2013 12:18 pm

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??
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Wed Aug 14, 2013 6:08 pm

any advice?
Somebody that has used the run file action??
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Wed Aug 14, 2013 6:33 pm

You had it mostly right. You need to add a preceding forward-slash to your expression: NodeWebkit.AppFolder & "/dxwebsetup.exe".
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Wed Aug 14, 2013 8:01 pm

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?
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Wed Aug 14, 2013 8:18 pm

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.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Sat Aug 17, 2013 4:02 pm

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??nacheto2013-08-17 16:27:17
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Sat Aug 17, 2013 4:32 pm

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
B
7
S
1
Posts: 11
Reputation: 1,267

Post » Sat Aug 17, 2013 4:40 pm

Awesome, glad you figured it out. You should file a bug report in that forum; bugs mentioned elsewhere pretty-much get forgotten about.
B
57
S
15
G
11
Posts: 912
Reputation: 12,626

Post » Sat Aug 17, 2013 4:41 pm

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.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Sat Aug 17, 2013 4:55 pm

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.
B
7
S
1
Posts: 11
Reputation: 1,267

Next

Return to How do I....?

Who is online

Users browsing this forum: DarthPapalo666 and 31 guests