Open heyheysay opened 11 years ago
http://docs.rhomobile.com/rhodesapi/system-api#runapp
Read this doc pls, runApplication has same parameters as run_app
Incomplete documentation for this API makes it hard to figure out the proper value for the parameters.
Documentation needs to say that runApplication can only be ran against Rho apps. The path is the location of the software registry entry for the called program relative form “HKCU/software”
HKCU/Software/Rhomobile/HM/HM.exe So the path would be "rhomobile/HN/HM.exe"
So how do you call the calc.exe program?
You can run any program, which has record in registry.
To run any programs by full path you can use Ruby Process.exec
I tried to run calc.exe but it looks like "InstallDir" is required in the registry to run via runApplication. This is a problem as it looks like none of the Windows programs have this registry entry. I will give Ruby Process.exec a try and see what it can do but this doesn't help us execute a program via a hosted web page.
Since Android doesn’t have a registry file, what is the path for Android device in reference to? I looked in the 2.2 documentation but it looks like this was not supported on Android devices.
At android you need to pass application package name.
I'm unable to get the runApplication api to work win32 build.
**Command being ran Rho.System.runApplication("c:/windows/system32/calc.exe");
**Result of run E 08/16/2013 10:38:24:908 0000230c System| Cannot open registry key: SOFTWARE\c:\windows\system32; Code:2 W 08/16/2013 10:38:24:912 0000230c JavaScript| Console message at undefined:0 W 08/16/2013 10:38:24:913 0000230c JavaScript| System.runApplication failed for: c:/windows/system32/calc.exe