cancel
Showing results for 
Search instead for 
Did you mean: 

WSAM Script to access terminal server

aeroplane_
Regular Contributor

WSAM Script to access terminal server

Hi

Can any one help me to configure WSAM script on client PC to access the terminal server?

2 REPLIES 2
rvi_
Occasional Contributor

Re: WSAM Script to access terminal server

The following example demonstrates how to use the W-SAM launcher to invoke W-SAM. This sample batch file generates error messages when W-SAM launches:

SamLauncher ‰Û start ‰Û url %1 ‰Û user %2 ‰Û password %3 ‰Û realm %4   if errorlevel 1 goto error_invalid_args  if errorlevel 2 goto error_connect  if errorlevel 3 goto error_credentials  if errorlevel 4 goto error_role  if errorlevel 5 goto error_preauth  if errorlevel 6 goto error_install  if errorlevel 7 goto error_reboot      :error_invalid_args  @echo invalid arguments  goto done    :error_connect  @echo could not connect  goto done    :error_credentials  @echo invalid credentials  goto done    :error_role  @echo invalid role  goto done    :error_preauth  @echo pre auth version checking  goto done    :error_install  @echo install failed  goto done    :error_reboot  @echo reboot required  goto done    :error_success  @echo Secure Application Manager has started  goto done    :done  

Win32 API example

CHAR szCmd = ‰ÛÏSamLauncher.exe ‰Û stop‰Û;  DWORD dwExitCode = 0;  STARTUPINFO si;  PROCESS_INFORMATION pi;  ZeroMemory(&si, sizeof(si));  si.cb = sizeof(si);  ZeroMemory(&pi, sizeof(pi));  if (!CreateProcess(NULL, szCmd, NULL, NULL, FALSE,                  0, NULL, NULL, &si, &pi)) {                   printf( "CreateProcess(%s) failed %d", szCmd, GetLastError());                  return -1;  }  WaitForSingleObject(pi.hProcess, 20000);  GetExitCodeProcess(&pi.hProcess, &dwExitCode);  CloseHandle(pi.hProcess);  CloseHandle(pi.hThread);  printf(‰ÛÏSamLauncher return %d\n‰Û, dwExitCode);  return 0;    
aeroplane_
Regular Contributor

Re: WSAM Script to access terminal server

Let me clear my requirement. I want users just only click WSAM launcher on desktop and their RDP session to the terminal server open with out going to first on SSL and then access Terminal server.

Is this possible?

Many thanks