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:


Revision #2
Created 8 April 2022 11:19:04 by Guest
Updated 8 April 2022 11:21:05 by Guest