3.5 – Start RemoteApp
Add the following parameters if you want to start the RemtoeApp in current browser window:
startProgram=app
exe=||WINWORD
directory= encodeURIComponent(‘C:\\apps\\’)
Start RemtoeApp in a new window:
function startRemoteApp(remoteApp, args, dir, url){
var r = svManager.getInstance() || new svGlobal.Rdp(url); //reuse existing session if available
function onSurfaceReady(surface){
r.addSurface(surface);
if (r.running()){
r.startApp(remoteApp, args, dir);
}else{
r.run();
}
};
window.svOnSurfaceReady = onSurfaceReady;
var rail = window.open('rail.html');
rail.svOnSurfaceReady = onSurfaceReady;
}
window.onload = function() {
var gateway = 'w-think', //change this to your SparkView address
server = '192.168.12.132', //change this to your RDP server address
user = 'vmuser',
password = 'password',
remoteApp = '||notepad',
args = '',
dir = '',
url = 'ws://' + gateway + '/RDP?server=' + server + '&startProgram=app' + '&exe=' + encodeURIComponent(remoteApp) + '&user=' + user + '&pwd=' + password;
startRemoteApp(remoteApp, args, dir, url);
};
Checklist:
- Make sure you use the alias name of the RemoteApp and with “||’ before the name.
- Make sure you publish the RemoteApp on your Windows first.