IT Management Suite

How to install App-V 5.1 and SWV/SWS side by side on Windows 7/8.* 

01-11-2018 10:11 AM

Backstory

This tutorial is for those of you wanting to install and run both App-V 5.1 agent with latest HF and SWV/SWS agents side by side on your Windows 7/8.* environment. I have been testing it for a good while and I have not seen any problems so far. *DISCLAIMER, I CAN NOT GUARANTEE IT WILL WORK ON YOUR SYSTEM*

First of all you need at least PowerShell 3.0 on your system as a pre requirement for App-V. PowerShell installation get upgraded when you install  WMF(Windows Management Framework) 3.0, 4.0 or 5.1 on your system. You can see your systems PowerShell version by starting up PowerShell windows and typing the command "Get-host." without the "".

If the console host version says: Version: 2.0  you need a newer WMF, and there is a certain install order to do this or the WMF install will fail.  I recommend using the latest 5.1 version, but I have included both 3.0 and 5.1 version in this article.

Install order:

  1. Uninstall Symantec SWS/SWV -> reboot required
  2. Installwmf3 or 5.1 -> reboot required
  3. Install Appv client -> No reboot needed
  4. Install swv/sws agents again -> reboot.

Using ITMS we can do this with the following scripts and restart between the required steps.

Uninstall Sws_Swv.bat. This script is for SWV version 7.5 HF5, but the logic should be the same for newer versions using correct msi code.

 

@echo off
:: Created by arne johansen
:: Creation date 02-01-2017
:: Updated 
:: Version 1.1

:: History
:: 20102014 - Changed routines to correct error on streaming agent uninstallation
:: 14102014 - Added return codes to altiris/script exit
:: 02012017 - Initial release
:: 03012017 - Updated log file path

:: Return codes from the script is as following:
:: ------------------------------------------------
:: 0 - completed with no errors, succesfull upgrade
:: 1 - Uninstallation of streaming agent failed, see C:\Windows\logs\SWSupgradestatus.log and C:\Windows\logs\SWSuninstall.log for actual error code
:: 2 - Upgrade of Virtualization Agent failed, see c:\windows\logs\SWSupgradestatus.log and c:\windows\logs\SWV75upgrade.log
:: 3 - Installation of new streaming agent failed, see c:\windows\logs\SWSupgrade75.log and c:\windows\logs\SWS75inst.log
:: 4 - Installation of streaming agent language patch failed, see c:\windows\logs\SWSupgrade75.log and C:\Windows\Temp\SW5langpatch.log


echo Running Uninstall of SWS/SWV 7.5 HF5
echo -------------------------------------------------

set scriptExitCode=0
SET swsLogFile=C:\Windows\logs\SWSupgradestatus.log
echo ----------------------------------------- >>%swsLogFile%
echo Logging started: %time%@%date% >>%swsLogFile%
echo Computer: %COMPUTERNAME% >>%swsLogFile%
echo ----------------------------------------- >>%swsLogFile%
echo This log containg information about how the SWS upgrade have gone on the computer >>%swsLogFile%
echo. >>%swsLogFile%
echo.
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%
echo. >>%swsLogFile%

:: Step 0 - Preparing for removal
echo Preparing computer for removal of Symantec Workspace Virtualization and Streaming Agents
echo --- This might take up to several minutes...
echo [%time% @ %date%] Preparing computer for removal of Symantec Workspace Virtualization and Streaming Agents >>%swsLogFile%
"%ProgramFiles%\Symantec\Workspace Streaming\Bin\appmgrcmd.exe" -s -ta -hidden
::svscmd * D -f >NUL
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Preparing computer returned: %ErrorLevel% >>%swsLogFile%


:: Step 1 - Remove Symantec Workspace Streaming Agent
echo Uninstalling Symantec Workspace Streaming Agent
echo [%time% @ %date%] Uninstalling Symantec Workspace Streaming Agent >>%swsLogFile%
start /wait MsiExec.exe /X{46B26804-569B-4355-9678-0DDF6ADCFB0F} /l*v c:\windows\logs\SWSuninstall.log /qn
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\40862B64B96555346987D0FDA6CDBFF0" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{46B26804-569B-4355-9678-0DDF6ADCFB0F}" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{8C97F3F9-AE29-4992-B39B-6B28B7146F0A}" /f

:: Step 2 - Remove Symantec Workspace Virtualization Agent
echo Uninstalling Symantec Workspace Virtualization Agent
echo [%time% @ %date%] Uninstalling Symantec Workspace Virtualization Agent >>%swsLogFile%
start /wait MsiExec.exe /X{8C97F3F9-AE29-4992-B39B-6B28B7146F0A} /l*v c:\windows\logs\SWSuninstall.log /qn /norestart

shutdown /r /t 20 /f /c "SWS/SWV removed, rebooting"
:scriptExit
echo [%time% @ %date%] Script done, script ReturnCode: %scriptExitCode% >>%swsLogFile%
::pause
EXIT /B %scriptExitCode%





Install wmf3.bat if you need powershell 3.0, I don't see the point of upgrading to WMF4,better use WMF5.1 if you go down that road:

@echo off
:: Created by arne johansen
:: Creation date 03-01-2017
:: Updated 
:: Version 1.1

:: History
:: 03012017 - Initial release
:: 03012017 - Updated log file path

:: Return codes from the script is as following:
:: ------------------------------------------------
:: 0 - completed with no errors, succesfull upgrade

:: Install WMF 3 containing Ps3.0 onto system
echo - Install WMF 3 containing Ps3.0 onto system
echo -------------------------------------------------

set scriptExitCode=0
SET swsLogFile=C:\Windows\logs\WMF3upgradestatus.log
echo ----------------------------------------- >>%swsLogFile%
echo Logging started: %time%@%date% >>%swsLogFile%
echo Computer: %COMPUTERNAME% >>%swsLogFile%
echo ----------------------------------------- >>%swsLogFile%
echo This log containg information about how the WMF3 upgrade have gone on the computer >>%swsLogFile%
echo. >>%swsLogFile%
echo.
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%
echo. >>%swsLogFile%
wusa.exe "Windows6.1-KB2506143-x64.msu" /extract:C:\TEMP\WMF3.0\
dism.exe /online /add-package /PackagePath:C:\TEMP\WMF3.0\Windows6.1-KB2506143-x64.cab /NoRestart
shutdown /r /t 20 /f /c "Ps3.0 installed, rebooting!"
:scriptExit
echo [%time% @ %date%] Script done, script ReturnCode: %scriptExitCode% >>%swsLogFile%
::pause
EXIT /B %scriptExitCode%


or Install-WMF5.1ps1 if you need the latest powershell:


<#PSScriptInfo

.VERSION 1.0

.GUID bae78b34-2bd5-42ce-9577-ec348b598570

.AUTHOR Microsoft Corporation

.COMPANYNAME Microsoft Corporation

.COPYRIGHT

.TAGS

.LICENSEURI

.PROJECTURI

.ICONURI

.EXTERNALMODULEDEPENDENCIES

.REQUIREDSCRIPTS

.EXTERNALSCRIPTDEPENDENCIES

.RELEASENOTES


#>

<#

.DESCRIPTION
 Test the compatibility of current system with WMF 5.1 and install the package if requirements are met.

#>

##Check OS Version is below Windows 10.
[CmdletBinding(SupportsShouldProcess=$true)]
param(
    [switch] $AcceptEULA,
    [switch] $AllowRestart
)

$ErrorActionPreference = 'Stop'

function New-TerminatingErrorRecord
{
    param(
        [string] $exception,
        [string] $exceptionMessage,
        [system.management.automation.errorcategory] $errorCategory,
        [string] $targetObject
    )

    $e = New-Object $exception $exceptionMessage
    $errorRecord = New-Object System.Management.Automation.ErrorRecord $e, $errorId, $errorCategory, $targetObject
    return $errorRecord
}

function Test-Compatibility
{
    $returnValue = $true

    $BuildVersion = [System.Environment]::OSVersion.Version

    if($BuildVersion.Major -ge '10')
    {
        Write-Warning 'WMF 5.1 is not supported for Windows 10 and above.'
        $returnValue = $false
    }

    ## OS is below Windows Vista
    if($BuildVersion.Major -lt '6')
    {
        Write-Warning "WMF 5.1 is not supported on BuildVersion: {0}" -f $BuildVersion.ToString()
        $returnValue = $false
    }

    ## OS is Windows Vista
    if($BuildVersion.Major -eq '6' -and $BuildVersion.Minor -le '0')
    {
        Write-Warning "WMF 5.1 is not supported on BuildVersion: {0}" -f $BuildVersion.ToString()
        $returnValue = $false
    }

    ## Check if WMF 3 is installed
    $wmf3 = Get-WmiObject -Query "select * from Win32_QuickFixEngineering where HotFixID = 'KB2506143'"

    if($wmf3)
    {
        Write-Warning "WMF 5.1 is not supported when WMF 3.0 is installed."
        $returnValue = $false
    }

    # Check if .Net 4.5 or above is installed

    $release = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -Name Release -ErrorAction SilentlyContinue -ErrorVariable evRelease).release
    $installed = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -Name Install -ErrorAction SilentlyContinue -ErrorVariable evInstalled).install

    if($evRelease -or $evInstalled)
    {
        Write-Warning "WMF 5.1 requires .Net 4.5."
        $returnValue = $false
    }
    elseif (($installed -ne 1) -or ($release -lt 378389))
    {
        Write-Warning "WMF 5.1 requires .Net 4.5."
        $returnValue = $false
    }

    return $returnValue
}

if($PSBoundParameters.ContainsKey('AllowRestart') -and (-not $PSBoundParameters.ContainsKey('AcceptEULA')))
{
    $errorParameters = @{
                                    exception = 'System.Management.Automation.ParameterBindingException';
                                    exceptionMessage = "AcceptEULA must be specified when AllowRestart is used.";
                                    errorCategory = [System.Management.Automation.ErrorCategory]::InvalidArgument;
                                    targetObject = ""
                        }

    $PSCmdlet.ThrowTerminatingError((New-TerminatingErrorRecord @errorParameters))
}

$scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition

if($env:PROCESSOR_ARCHITECTURE -eq 'x86')
{
    $packageName = 'Win7-KB3191566-x86.msu'
}
else
{
    $packageName = 'Win7AndW2K8R2-KB3191566-x64.msu'
}

$packagePath = Resolve-Path (Join-Path $scriptPath $packageName)

if($packagePath -and (Test-Path $packagePath))
{
        if(Test-Compatibility)
        {
            $wusaExe = "$env:windir\system32\wusa.exe"
            if($PSCmdlet.ShouldProcess($packagePath,"Install WMF 5.1 Package from:"))
            {
                $wusaParameters = @("`"{0}`"" -f $packagePath)

                ##We assume that AcceptEULA is also specified
                if($AllowRestart)
                {
                    $wusaParameters += @("/quiet")
                }
                ## Here AllowRestart is not specified but AcceptEULA is.
                elseif ($AcceptEULA)
                {
                    $wusaParameters += @("/quiet", "/promptrestart")
                }

                $wusaParameterString = $wusaParameters -join " "
                & $wusaExe $wusaParameterString
            }
        }
        else
        {
            $errorParameters = @{
                                    exception = 'System.InvalidOperationException';
                                    exceptionMessage = "WMF 5.1 cannot be installed as pre-requisites are not met. See Install and Configure WMF 5.1 documentation: https://go.microsoft.com/fwlink/?linkid=839022";
                                    errorCategory = [System.Management.Automation.ErrorCategory]::InvalidOperation;
                                    targetObject = $packagePath
                                }

            $PSCmdlet.ThrowTerminatingError((New-TerminatingErrorRecord @errorParameters))
        }
}
else
{
    $errorParameters = @{
                            exception = 'System.IO.FileNotFoundException';
                            exceptionMessage = "Expected WMF 5.1 Package: `"$packageName`" was not found.";
                            errorCategory = [System.Management.Automation.ErrorCategory]::ResourceUnavailable;
                            targetObject = $packagePath
                            }

    $PSCmdlet.ThrowTerminatingError((New-TerminatingErrorRecord @errorParameters))
}
# SIG # Begin signature block
# MIIdlwYJKoZIhvcNAQcCoIIdiDCCHYQCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUoRmhalGqAUhpfQajpXG4FFBK
# oOugghhlMIIEwzCCA6ugAwIBAgITMwAAAMlkTRbbGn2zFQAAAAAAyTANBgkqhkiG
# 9w0BAQUFADB3MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G
# A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSEw
# HwYDVQQDExhNaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EwHhcNMTYwOTA3MTc1ODU0
# WhcNMTgwOTA3MTc1ODU0WjCBszELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp
# bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
# b3JhdGlvbjENMAsGA1UECxMETU9QUjEnMCUGA1UECxMebkNpcGhlciBEU0UgRVNO
# OkIxQjctRjY3Ri1GRUMyMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT
# ZXJ2aWNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAotVXnfm6iRvJ
# s2GZXZXB2Jr9GoHX3HNAOp8xF/cnCE3fyHLwo1V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==
# SIG # End signature block

Install_appv_client.bat - No reboot needed

@echo off
:: Created by arne johansen
:: Creation date 03-01-2017
:: Updated 
:: Version 1.3

:: History
:: 03012017 - Initial release
:: 03012017 - Updated log file path
:: 05052017	- Updated to hf8 (AppV5.1RTM_Client_KB4014009.exe)
:: 09012018 - Updated to hf10 (AppV5.1RTM_Client_KB4041137.exe)

:: Return codes from the script is as following:
:: ------------------------------------------------
:: 0 - completed with no errors, succesfull upgrade

:: Install Appv 5.1 client on system
echo - Install Appv 5.1 client on system
echo -------------------------------------------------
echo --- Please Wait, computer will restart after it's updated!-----
set scriptExitCode=0
SET swsLogFile=C:\Windows\logs\AppV5ClientInstall.log
echo ----------------------------------------- >>%swsLogFile%
echo Logging started: %time%@%date% >>%swsLogFile%
echo Computer: %COMPUTERNAME% >>%swsLogFile%
echo ----------------------------------------- >>%swsLogFile%
echo This log containg information about how the APPV5.1 upgrade have gone on the computer >>%swsLogFile%
appv_client_setup.exe /ACCEPTEULA /CEIPOPTIN=0 /MUOPTIN=0 /ENABLEPACKAGESCRIPTS=1 /AUTOLOAD=0 /q /norestart /log %swsLogFile%
AppV5.1RTM_Client_KB4041137.exe /ACCEPTEULA /CEIPOPTIN=0 /MUOPTIN=0 /ENABLEPACKAGESCRIPTS=1 /AUTOLOAD=0 /q /norestart /log C:\Windows\Logs\App-V51_Client_HF10_Install.log
::shutdown /r /t 20 /f /c "Appv 5.1 installed, rebooting!"
:scriptExit
echo [%time% @ %date%] Script done, script ReturnCode: %scriptExitCode% >>%swsLogFile%
::pause
EXIT /B %scriptExitCode%


And last but not least, Install Swv_Sws.bat to get the SEV clients back Again and then take the last reboot!

@echo off
:: Creation date 09-10-2014
:: Updated 27-02-2015 by arne johansen
:: Version 1.2

:: History
:: 27022015 - Changed from hf2 to hf3
:: 20102014 - Changed routines to correct error on streaming agent installation
:: 14102014 - Added return codes to altiris/script exit
:: 09102014 - Initial release
:: 2702015  - Updated from hf3 to hf5

:: Return codes from the script is as following:
:: ------------------------------------------------
:: 0 - completed with no errors, succesfull upgrade
:: 1 - Uninstallation of streaming agent failed, see C:\Windows\Temp\SWSupgradestatus.log and C:\Windows\Temp\SWSuninstall.log for actual error code
:: 2 - Upgrade of Virtualization Agent failed, see C:\Windows\Temp\SWSupgradestatus.log and C:\Windows\Temp\SWV75upgrade.log
:: 3 - Installation of new streaming agent failed, see C:\Windows\Temp\SWSupgrade75.log and C:\Windows\Temp\SWS75inst.log
:: 4 - Installation of streaming agent language patch failed, see C:\Windows\Temp\SWSupgrade75.log and C:\Windows\Temp\SW5langpatch.log


echo Running SWS Client upgrade to version 7.5 SP1 HF5
echo -------------------------------------------------

set scriptExitCode=0
SET swsLogFile=C:\Windows\Temp\SWSupgradestatus.log
echo ----------------------------------------- >>%swsLogFile%
echo Logging started: %time%@%date% >>%swsLogFile%
echo Computer: %COMPUTERNAME% >>%swsLogFile%
echo ----------------------------------------- >>%swsLogFile%
echo This log containg information about how the SWS upgrade have gone on the computer >>%swsLogFile%
echo. >>%swsLogFile%
echo.
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%
echo. >>%swsLogFile%

:: Step 0 - Preparing for Upgrade
echo Preparing computer for upgrade of Symantec Workspace Virtualization and Streaming Agents
echo --- This might take up to several minutes...
echo [%time% @ %date%] Preparing computer for upgrade of Symantec Workspace Virtualization and Streaming Agents >>%swsLogFile
"%ProgramFiles%\Symantec\Workspace Streaming\Bin\appmgrcmd.exe" -s -ta -hidden
svscmd * D -f >NUL
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Preparing computer returned: %ErrorLevel% >>%swsLogFile%

:: [START] ------------- THIS STEP IS OBSOLETE
:: Step 1 - Stop Symantec Workspace Streaming Agent Service
:: echo Stopping Symantec Workspace Streaming Agent Service [AppMgrService]
:: echo [%time% @ %date%] Stopping Symantec Workspace Streaming Agent Service [AppMgrService] >>%swsLogFile%
:: NET STOP AppMgrService
:: echo Result ReturnCode: %ErrorLevel%
:: echo [%time% @ %date%] Stopping of AppMgrService returned: %ErrorLevel% >>%swsLogFile%
:: [END] ------------- THIS STEP IS OBSOLETE

:: [START] ------------- THIS STEP IS OBSOLETE
:: Step 2 - Clear Symantec Workspace Streaming Agent Cache (C:\_AC)
:: echo Cleaning Streaming Agent Cache
:: echo [%time% @ %date%] Cleaning Streaming Agent Cache >>%swsLogFile%
:: "%ProgramFiles%\Symantec\Workspace Streaming\Bin\appmgrcmd.exe" -ra -s
:: echo Result ReturnCode: %ErrorLevel%
:: echo [%time% @ %date%] Cleaning the Streaming Agent Cache returned: %ErrorLevel% >>%swsLogFile%
:: [END] ------------- THIS STEP IS OBSOLETE

:: Step 3 - Remove Symantec Workspace Streaming Agent
echo Uninstalling Symantec Workspace Streaming Agent
echo [%time% @ %date%] Uninstalling Symantec Workspace Streaming Agent >>%swsLogFile%
start /wait MsiExec.exe /X{46B26804-569B-4355-9678-0DDF6ADCFB0F} /l*v C:\Windows\Temp\SWSuninstall.log /qn
Set scriptExitCode=1
IF %ErrorLevel% EQU 3010 SET scriptExitCode=0
IF %ErrorLevel% EQU 0 SET scriptExitCode=0
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Uninstallation of Symantec Workspace Streaming Agent returned: %ErrorLevel% >>%swsLogFile%
echo [%time% @ %date%] Log located at: C:\Windows\Temp\SWSuninstall.log >>%swsLogFile%
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%
echo Removing _AC folder
:: ping -n 10 127.0.0.1 >NUL
RD "C:\_AC" /S /Q
RD "%ProgramFiles%\Symantec\Workspace Streaming" /S /Q
echo [%time% @ %date%] Removal of C:\_AC returned: %ErrorLevel% >>%swsLogFile%

echo [%time% @ %date%] [ INFO ] Cleanup Registry settings. >>%swsLogFile%
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Servers" /f
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Portals" /f
echo [%time% @ %date%] [ INFO ] Cleanup Registry settings completed. >>%swsLogFile%

:: Step 4 - Install VC++ 2008 Runtime needed by the new agents
echo Installing Microsoft VC++ 2008 Runtime prerequirement
echo [%time% @ %date%] Installing Microsoft VC++ 2008 Runtime prerequirement >>%swsLogFile%
"%~dp0vcredist.exe" /q:a /c:"msiexec /i vcredist.msi /qn /l*v C:\Windows\Temp\SWSvcredist_x86.log"
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Installation of VC++ 2008 Runtime returned: %ErrorLevel% >>%swsLogFile%
echo [%time% @ %date%] Log located at: C:\Windows\Temp\SWSvcredist_x86.log >>%swsLogFile%

:: Step 5 - Upgrade Symantec Workspace Virtualization Agent
echo Updating Symantec Workspace Virtualization Agent
echo [%time% @ %date%] Updating Symantec Workspace Virtualization Agent >>%swsLogFile%
start /wait MsiExec.exe /I "%~dp0Symantec_Workspace_Virtualization.msi" REBOOT=ReallySuppress PRODUCT_KEY=xxxxxxxxxx CIF_TELEMETRY=1 ADDLOCAL=Altiris_NS /l*v "C:\Windows\Temp\SWV75upgrade.log" /qn
Set scriptExitCode=2
IF %ErrorLevel% EQU 3010 SET scriptExitCode=0
IF %ErrorLevel% EQU 0 SET scriptExitCode=0
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Update of Workspace Virtualization Agent returned: %ErrorLevel% >>%swsLogFile%
echo [%time% @ %date%] Log located at: C:\Windows\Temp\SWV75upgrade.log >>%swsLogFile%
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%

:: Step 6 - Install new Symantec Workspace Streaming Agent
echo Installing Symantec Workspace Streaming Agent
echo [%time% @ %date%] Installing Symantec Workspace Streaming Agent >>%swsLogFile%
start /wait MsiExec.exe /I "%~dp0Symantec Workspace Streaming Agent.msi" FROM_LAUNCHER=1 REBOOT=ReallySuppress CIF_TELEMETRY=1 NO_TELEMETRY_UI=1 STS_SERVER=altstream STS_LAUNCH_SERVER_URL=http://altstream /l*v "C:\Windows\Temp\sws75inst.log" /qn
Set scriptExitCode=3
IF %ErrorLevel% EQU 3010 SET scriptExitCode=0
IF %ErrorLevel% EQU 0 SET scriptExitCode=0
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Installation of Workspace Streaming Agent returned: %ErrorLevel% >>%swsLogFile%
echo [%time% @ %date%] Log located at: C:\Windows\Temp\SWS75inst.log >>%swsLogFile%
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%
xcopy "%~dp0AppstreamCfg.txt" "%ProgramFiles%\Symantec\Workspace Streaming\Bin\" /E /H /I /Y >NUL
echo [%time% @ %date%] Copying of AppstreamCfg.txt returned: %ErrorLevel% >>%swsLogFile%
:: change altstream property to your own streaming server url
echo [%time% @ %date%] [ INFO ] Set Registry settings. >>%swsLogFile%
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Servers\1 /v Name /t REG_SZ /d "altstream"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Servers\1 /v Port /t REG_SZ /d "80"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Servers\1 /v Proto /t REG_SZ /d "0"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Portals /v 1 /t REG_SZ /d "http://altstream"
echo [%time% @ %date%] [ INFO ] Set Registry settings completed. >>%swsLogFile%

:: Step 7 - Install Symantec Workspace Streaming Agent LangPatch
echo Installing Symantec Workspace Streaming Agent Language Patch
echo [%time% @ %date%] Installing Symantec Workspace Streaming Agent Language Patch >>%swsLogFile%
start /wait MsiExec.exe /P "%~dp0LangPatch.msp" FROM_LAUNCHER=1 REBOOT=ReallySuppress REINSTALL=ALL REINSTALLMODE=omus CIF_TELEMETRY=1 NO_TELEMETRY_UI=1 /l*v "C:\Windows\Temp\SWS75langpatch.log" /qn
Set scriptExitCode=4
IF %ErrorLevel% EQU 3010 SET scriptExitCode=0
IF %ErrorLevel% EQU 0 SET scriptExitCode=0
echo Result ReturnCode: %ErrorLevel%
echo [%time% @ %date%] Installation of Workspace Streaming Agent Language Patch returned: %ErrorLevel% >>%swsLogFile%
echo [%time% @ %date%] Log located at: C:\Windows\Temp\SWS75langpatch.log >>%swsLogFile%
echo [%time% @ %date%] scriptExitCode set to: %scriptExitCode% >>%swsLogFile%

:: Step 8 - Reboot the computer
echo Rebooting computer, upgrade completed
echo [%time% @ %date%] Rebooting computer, upgrade completed >>%swsLogFile%
shutdown /r /t 20 /f /c "SWS Upgrade Complete, rebooting"

:scriptExit
echo [%time% @ %date%] Script done, script ReturnCode: %scriptExitCode% >>%swsLogFile%
REM pause
EXIT /B %scriptExitCode%


AppsctreamCFG.txt example file:

 

[LOG FACILITY DEFINITIONS]
; --- LOG FACILITY DEFINITIONS ---
Debug.GenTraceLevel=INFO
Debug.LogFile.TxtPath=..\Logs\MgrLog.txt
Debug.LogFile.DebugView=0
Debug.LogFile.DecoratingPolicy=SizeCyclicRollover
Debug.LogFile.BytesSize=500000
Debug.LogFile.MaxLogFiles=50
Debug.LogFile.SynchronousLogging=true

; --- GPO Settings ---
; GPO settings are applied directly to the configuration file every
; time the streaming service starts.  If you would like that not
; to happen (great for testing), uncomment this line.
;IGNORE_GPO_SETTINGS=true


; --- VDI OPTIMIZATIONS ---
;XPF_FAST_INSTALL=true
;XPF_FAST_INSTALL_STREAMED_DIRS=true


; --- PERFORMANCE OPTIONS ---
AppMgrService.GeneralThreadPool.MinimumPoolThreads = 4
AppMgrService.GeneralThreadPool.ShrinkPoolInterval = 300


; --- NETWORKING DEFINITIONS ---

; List of IPs that the AppStream Application Manager
; will ignore when resolving a hostname to an IP
; address.  Useful to block wildcard DNS entries.
; IP_BLOCK_LIST = 64.70.19.33 ; Wildcard for .ws

; If a message to send to the server is greater than
; this threshold (in bytes), the message will be
; compressed first.  Specifying -1 will disable
; compression.
COMPRESS_MESSAGE_THRESHOLD=1024

; If AppMgr's communication thread is held long past the length
; of the expected timeout for a connectivity check, AppMgr assumes
; that a firewall has frozen the thread waiting for approval to allow
; the connection.  How should AppMgr notifiy the user in this situation?
; NEVER        = Do not notify the user
; SESSION_ONCE = Only notify the user one time during the AppMgr's lifetime
; SYSTEM_ONCE  = Only notify the user one time ever
; ALWAYS       = Always notify the user
FIREWALL_NOTIFICATION = SESSION_ONCE


; --- VIRTUAL INSTALLATION OPTIONS ---

; List of executables that treat their arguments as
; one filename to concatenate together, or executables
; that do not support quotes around their arguments.
VINSTALL_DONT_QUOTE_ME = msohtmed.exe

; List of wildcards that the client will not treat as
; streamable installable files.  Instead, all content will
; be delivered before the installation completes.
; Note that the system32 directory is already implicitly
; included in this list and can only be disabled at a
; package level.
EXTERNAL_STREAMED_FILES_EXCLUSIONS = $commonprogramfilesdir$\System\*;$commonprogramfilesdir$\InstallShield\*;$commonprogramfilesdir$\ODBC\*

; Allow packages to declare dependencies.  If turned on,
; a user must be provisioned for all of the required package
; dependencies or the installing package will fail to
; install.
PROCESS_SERVER_PACKAGE_DEPENDENCIES=true

; When the layer is streamed, should the (installation) dependency
; information received from the server overwrite the (activation)
; dependency information in the package?
ADD_DEPENDENCIES_TO_LAYER_PROPERTIES=true



; --- RECOVERY OPTIONS ---

; If RECOVERY_KEEP_DIRTY_CACHE is set to true, AppMgr
; will not delete applications from the cache that were
; marked as in use when it performs recovery from a
; previous abnormal termination.
RECOVERY_KEEP_DIRTY_CACHE = true

; If RECOVERY_KEEP_OFFLINE_CACHE is set to true, AppMgr
; will not delete applications from the cache that were
; marked as ready for offline and all blocks for the
; package have been delivered, even if the application
; was in use during a previous abnormal termination.
RECOVERY_KEEP_OFFLINE_CACHE = true

; If RECOVERY_SKIP_SET_CRASHCONTROL is set to true,
; AppMgr will not change the system recovery parameters.
RECOVERY_SKIP_SET_CRASHCONTROL = true

; This value can be set to "DISABLED", "COMPLETE",
; "KERNEL", or "SMALL" (without the quotes).  If the
; value is set to anything else or doesn't exist,
; "KERNEL" will be assumed.  This is the system
; dump level configuration.
RECOVERY_CRASHCONTROL_DUMPLEVEL = KERNEL



; --- MISCELLANEOUS DEFINITIONS ---

; Should AppMgr actively watch the profiles subdirectories
; (i.e. "C:\Documents And Settings" or "C:\WINNT\Profiles")
; for new shortcuts.  If this is enabled AppMgr will read
; a shortcut any time it is written and determine if it
; needs to be added to the list of shortcuts to remove when
; a package is removed.  If this is disabled, shortcuts
; are only scanned after an (MSI) application is installed
; and the shortcut was modified after the install started.
USE_SHORTCUT_WATCHER=false

; The amount of time in milliseconds that AppMgr should
; delay before closing a Session.  Useful if you want to
; let some external Application have a chance to properly
; clean up handles inside the cache if it knows that the
; Session processes have closed.
;DELAY_SESSION_CLOSE = 0

; List of file extensions that when specified as a target
; to open via shortcut should use the short file name.
; Extensions should include the dot (.) and are separated
; by semi-colons (comparison is case-insensitive).
EXTENSIONS_OPEN_WITH_SHORT_FILE_NAME=.cpl

; In earlier versions, the AppStream client did not add quotes
; to any parameters supplied to execution scripts.  This
; can cause issues with existing packages that do not expect
; the AppStreamCache to be in a path with spaces.  The quoting
; of the script parameters can be controlled using the following
; configuration setting.  ALWAYS = always quote the $scriptresult$
; parameter.  NEVER = never add quotes.  IF_SPACES = add quotes
; only if there are spaces in the path in the $scriptresult$.
; Note this also applies to the script executable path.
SCRIPT_QUOTING = IF_SPACES

; Should the client notify the server about implicit training?
NOTIFY_IMPLICIT_TRAINING_STOP = true





; --- CLIENT-SIDE TIMEOUTS ---

; Number of keep alive messages that can be missed before
; AppMgr suspends all sessions from a server.
NUM_KEEPALIVE_INTERVALS = 3

; How long in milliseconds AppMgr will wait for progress
; during the preload stage (initial block) before timing
; out.  A 4 kilobyte block must be sent within this
; timeout.
PRELOAD_CHECK_INTERVAL_MSEC = 60000

; The amount of time in milliseconds between checks if at
; least one 4K block was sent by server.
INSTALLED_FILES_CHECK_INTERVAL_MSEC = 60000

; The number of retries in case there are
; missing blocks of installed files
INSTALLED_FILES_MAX_RETRIES = 3

; How long after determining a server's status that the status
; is assumed to be valid (preventing many connectivity checks
; in a short duration).
CONNECTIVITY_CHECK_INTERVAL = 30



; --- GUI OPTIONS ---

; GUI mode - how should the GUI present itself when launching
; sessions.
; This value can be set to "NORMAL", "MESSAGES_ONLY", or "NONE"
; (without the quotes). If the value is set to anything else
; or doesn't exist, "NORMAL" will be assumed.
GUI_DISPLAY_ON_LAUNCH = NORMAL

; Should the tray icon be displayed?
GUI_DISPLAY_TRAY_ICON=true

; How should the progress bar be displayed during a virtual
; installation session?  The following values are allowed:
; 0 - the progress bar will appear normally (default)
; 1 - the progress bar will start minimized
; 2 - no progress bar will be displayed
PB_DISPLAY_ON_INSTALL = 0

; How should the progress bar be displayed during the launch
; of an already installed package?  The following values are
; allowed:
; 0 - the progress bar will appear normally
; 1 - the progress bar will start minimized
; 2 - no progress bar will be displayed (default)
PB_DISPLAY_ON_LAUNCH = 2

; Should we combine all progress bars into one dialog?
PB_USE_SINGLE_PROGRESS_DIALOG = true

; How many seconds we are going to wait until not trying focusing
; And assuming that the window of session is open (default 45)
SESSION_WINDOW_TIMEOUT=45

; Are we going to close the download dialog
; In case that the session is running for longer than the timeout
; and we didn't discover window yet.
; 0 if not to close existing download dialog (default)
; 1 is to close this download dialog
PB_CLOSE_ON_TIMEOUT=1

; Should AppMgr progress bars appear on top of other windows.
; The default is to make the progress bar dialog stay on top
; of other windows.  Uncomment this to stop that behavior.
;TOP_MOST_DIALOG = 0

; Maybe you do like the progress bars, but don't want them
; blocking out everything?  Make them partially transparent...
GUI_DISPLAY_TRANSPARENCY_CONTROLS = false

; Should AppMgr minimize the windows of applications that
; are suspended (due to disconnection from the server).
; It is recommended that this value be set to 0 for
; Windows XP.
MINIMIZE_ON_SUSPEND = 1

; The amount of time (in seconds) after which the GUI will
; close itself when there are no more sessions running.  If
; this is 0 (or negative) the GUI will never close unless
; directed to by the user.  If the GUI is opened from the
; Start Menu and there are no sessions running and the gap
; is greater than zero, the GUI will not shutdown until at
; least one Session has been seen.
GUI_GOODBYE_GRACE_GAP = 0

; Should the GUI be configured to run at startup if the user
; has streamed packages?  If this is set to RUN, then an entry
; will be added to the user's Run key to start the GUI.
; If this is set to anything else, an entry will not be added.
; If this value is missing, then RUN is assumed.
GUI_START_AT_LOGIN = RUN

; 0 for not displaying the Remove button
; The default is 1 to display
SHOW_REMOVE_BUTTON = 1

; 1 for displaying the Remove All button
; The default is 0 to hide the Remove All button
SHOW_REMOVE_ALL_BUTTON = 0

; Notify the user when an application is ready for offline usage,
; default value is true
NOTIFY_USER_ON_PACKAGE_OFFLINE_READY = true

; If a package cannot be upgraded immediately, prompt the user
; to reboot the system.
SYNCPKG_REQUEST_REBOOT = false

; Allow the user to cancel or revert a package synchronization
; request.  Allowing cancellation will allow the user to delay
; the upgrade to a later point in time, but the application can
; not be used until the synchronization is complete.  Allowing
; restoration will allow the user to re-enable the package for
; immediate use, but this assumes the server will grant access
; to the old version again.
SYNCPKG_ALLOW_RESTORATION = false
SYNCPKG_ALLOW_CANCELLATION = true



; --- OFFLINE ---

; When this flag is true, the GUI will start anytime an
; offline session is started
LAUNCH_GUI_ON_OFFLINE_SESSION = true

; the interval for sending the offline reports to the
; server.
OFFLINE_REPORTS_SEND_INTERVAL_SEC = 43200



; --- SHARING ---

; The amount of time (in seconds) AppMgr will wait for the
; authentication of an instant session to complete before
; terminating the process.
INSTANT_AUTH_TIMEOUT = 45

; The amount of time (in seconds) AppMgr will wait for the
; reauthentication of a session the server wanted to terminate
; before falling back to the termination behavior.
REAUTH_WAIT_TIMEOUT  = 45

; Would the user like to know they just failed to
; authenticate an instant session and AppMgr was forced to
; terminate a process?
INSTANT_NOTIFY_FAILED_AUTH = false

; How often (in seconds) should AppMgr query the file system
; for the existence of open file handles.  When AppMgr finds
; zero open file handles, the data session is closed.
; Default is set to 5 minutes.
CHECK_FOR_DATA_SESSION_CLOSE_INTERVAL = 300

; How should AppMgr notify the user on data session errors?
; Valid values are (SILENT is the default if this value is
; missing or invalid):
; SILENT - AppMgr will never notify the user
; ALWAYS - AppMgr will always notify the user
; ONCE   - AppMgr will notify the user the first time a
;          specific error occurs per package
; PERIODIC - AppMgr will notify the user only one time
;            during any given X second period about a specific
;            error per package.  (See next config value)
DATA_SESSION_ERROR_NOTIFICATION = SILENT

; How long should AppMgr suppress the same data session error
; for a particular package?  This is only used if
; DATA_SESSION_ERROR_NOTIFICATION is configured to PERIODIC.
DATA_SESSION_ERROR_SUPPRESSION_LENGTH = 60

; Should AppMgr display notifications for data sessions when
; the client loses connection from or reconnects to the server?
; Any combination of the following values separated by
; semi-colons are allowed:
; DISCONNECT; SUSPEND; RECONNECT; RESUME; OFFLINE
; DISCONNECT and SUSPEND are the same notification, as are
; RECONNECT and RESUME
DATA_SESSION_CONNECTIVITY_NOTIFICATIONS=

; Is authorization required for running upgrades?  The advantage
; is that the offline blocks for the package will be gathered
; in the first session run after the upgrade.  However the user
; will have to go through an extra authentication step.
AUTHORIZE_UPGRADE_SESSIONS=true



; --- PROCESS TRACKING ---

; The list of executable names (not paths, case-insensitive)
; that AppMgr should automatically assume should be added
; to a streaming session even though the executable is
; outside of the AppStream cache.  Executable names must
; be separated by semi-colons.  For example, AppMgr assumes
; the following executable names should always be added to
; the streaming session if a process creates them:
; winhlp32.exe;winhelp.exe;hh.exe;msohelp.exe
; (Note: These processes will only be added to the session
; if they are created by a process that belongs to a
; streaming session, or if created by the RPCSS subsystem
; if TRACK_RPC_PROCESSES is true.)
TRACK_PROCESSES_ALWAYS=

; The list of executable names (not paths, case-insensitive)
; that AppMgr should treat as long-lived processes.  These
; processes will be added to the list of hooked processes
; for the Session, but will not prevent the Session from
; closing if they are running and no other non-long-lived
; processes are running for the Session.  Background services
; started by streamed applications are a good candidate to put
; on this list.
TRACK_LONG_LIVED_PROCESSES=

; Should AppMgr treat any process created by the RPCSS
; (the (D)COM subsystem) process and whose executable is
; inside the cache automatically as a long lived process?
TREAT_RPC_PROCESSES_IN_CACHE_AS_LONG_LIVED=false

; Note:  The see-through process and the no-access process lists are
; now being completely handled by drivers.
; These lists have been transfered to the registry and can be found at
; 'HKLM\System\CurrentControlSet\Services\AppStream\Parameters'

; This is the list of process names that AppMgr can search
; for when looking for the user's shell (or some other
; user process that will always be open while the user
; is using AppStream).  AppMgr uses the token from this
; process to act on behalf of the user.  Process names
; are separated by semi-colons.
; For Citrix wfshell.exe is the user shell in windowed mode
SHELL_PROCESS_SEARCH_LIST=explorer.exe;userinit.exe;wfshell.exe



; --- LICENSE ENFORCEMENT ---

; Maximum interval (in seconds) between rechecking if any of
; the package licenses have expired.  Note that licenses are
; rechecked after any pre-population request, so setting this
; larger than PrePopulation.RequestInterval (or the associated
; value on the server) will be treated as PrePopulation.RequestInterval
LICENSE_ENFORCE_MONITOR_INTERVAL_SEC=300

; Should the shortcuts of an expired package remain on the machine
; so that the package can be relaunched and reinstalled without
; visiting the launch page?
RETAIN_EXPIRED_PACKAGE_SHORTCUTS = true

; Should the user be notified when a package expires?
LICENSE_NOTIFY_ON_EXPIRY = true



; --- SERVER MANAGEMENT ---
;
; Should we block all streaming via IP Addresses (EVEN IF THE HOST WOULD BE
; ALLOWED VIA A WHITELIST ENTRY).  This is a way to make sure all streaming
; is done via hostnames and not by IP.
ServerManagement.BlockAllIPAccess = false

; Allowed Lookup configuration values:
; TRUSTED, INTRANET, INTERNET, RESTRICTED, UNTRUSTED, CONFIG, or ANY
; RESTRICTED and UNTRUSTED are the same.  TRUSTED, INTRANET, INTERNET,
; RESTRICTED, and UNTRUSTED refer to the zones found in Internet Options
; for the MACHINE (not user-specific assigned zones).  CONFIG refers to
; the .Hostname and/or .IPRanges configuration values.  ANY allows
; any address to match.
; You can assign more than one zone to the lookup, so if you add
; ServerManagement.Whitelist.Lookup=TRUSTED;INTRANET;CONFIG
; then if the server is in the TRUSTED zone, or in the INTRANET zone,
; or matches the explicit configuration hostname or IPRange, then the
; server will be allowed to be contacted.
; You can specify ANY on the Blacklist, but it is a really bad idea.

; By default, the streaming client will contact any server it is pointed
; at.  If you would like to restrict the client to only contact certain
; servers, you can configure the Whitelist.  The default lookup option for
; the Whitelist is ANY.
;ServerManagement.Whitelist.Lookup = TRUSTED;CONFIG
;ServerManagement.Whitelist.Hostnames = *.example.com
;ServerManagement.Whitelist.IPRanges = 10.127.0.0-10.127.255.255

; Servers that should not be contacted by this client can be added to the
; Blacklist.  The Blacklist overrides the Whitelist, so if you want to
; only allow streaming from the domain example.com, you would add
; "*.example.com" in the Whitelist.  But if you then want to prevent
; deployed clients from contacting the testing server, you would add
; "testing.example.com" in the Blacklist.
;ServerManagement.Blacklist.Lookup = RESTRICTED;CONFIG
;ServerManagement.Blacklist.Hostnames = testing.example.com
;ServerManagement.Blacklist.IPRanges = 10.127.250.0-10.127.255.255


; --- PREPOPULATION ---
;
; IconEnable and PackagesEnabled control icons and package pre-
; population, same as in the Configuration tab of the GUI.
; FailedPkgDelay is the number of hours to delay attempting
; to pre-populate the same package after it failed to install.
; AtUserLogon specifies whether to check for pre-pop items from
; the server at Windows user logon.
; RequestInterval is the number of seconds between pre-pop data
; requests to the server.  The server can override this value.
PrePopulation.IconEnable = true
PrePopulation.FileAssociationsEnable = true
PrePopulation.PackagesEnabled = true
PrePopulation.FailedPkgDelay = 24
PrePopulation.AtUserLogon = true
PrePopulation.RequestInterval = 86400
PrePopulation.DisplayPkgControl = true



;--- SWV related settings
SHOW_SWV_RESET=1
SHOW_SWV_ACTIVATE_DEACTIVATE=1
SHOW_SWV_AUTOSTART=1
SHOW_SWV_DEACTIVATE_WARNING=1

Slam.Enable=true
Slam.DeactivateAtLogoff=true


;--- Browserless authentication settings
BrowserlessAuthentication.Enable=true
BrowserlessAuthentication.EnableUpgrade=true
BrowserlessAuthentication.ForceInternetExplorer=false

;--- VDI - Network Apps Setings

;To enable VDI
;ENABLE_VDI=true

;Repo location. Default value is empty string
;VDI_PKG_REPO=\\VDIRepo\xpa

;stream in multiple threads. Default value is true
;VDI_MULTI_THREADED_STREAM=true

;File contains list of packages in an order in which packages to be installed.
;This is for handling package dependencies
;VDI_PKG_INSTALL_CONF_FILE=InstallOrder.txt

;File contains list of packages for doing prepop icon. Default value is empty
;VDI_PREPOP_ICON_CONF_FILE=PrepopIcon.txt


;Remove unprovisioned applications. This will remove only unprovisioned vdi applications
;VDI_REMOVE_UNPROVISIONED_APPLICATIONS = true

;VDI provision refresh interval in minutes.
;Default value is 240. Set the value to 0 for refresh to occur during logon alone.
;VDI_REFRESH_INTERVAL=240

;Location where the vhd files have to be created
;VDI_RW_VHD_LOCATION=E:\Vhd

;Size of the Vhd file in MB. Default value is 0 in which vhd will not be created and used
;VDI_RW_VHD_SIZE=25

;To detach the vhd on user logoff. Default value is true. Setting false will not detach the vhd from the system on user logoff
;VDI_DETACH_VHD_ONLOGOFF=true

;To reverse default PrePop behaviour. If the value is set to true , packages listed in the "PrepopIcon.txt" will be streamed and icons will be pre-populated for rest of the packages.(Default value is true)
;VDI_REVERSE_PRE_POP = true
; --- END OF PRE-DEFINED CFG FILE

STATIC_PORTAL_LIST=http://altstream
PrePopulation.ServerURL=altstream,80,http://altstream

Some important notes on the last sws/swv installscript:

On Step 3 - "Remove Symantec Workspace Streaming Agent" this is normaly not needed if it's done in the previous script, but if something has failed it can still be there as an aditional step. Will only try again if it's still there.
On the "start /wait MsiExec.exe /X{46B26804-569B-4355-9678-0DDF6ADCFB0F}", change msi uninstall code to the GUID of your install version.

On Step 5 -" Upgrade Symantec Workspace Virtualization Agent"
Edit the PRODUCT_KEY property to your own key, and other properties as needed. "start /wait MsiExec.exe /I "%~dp0Symantec_Workspace_Virtualization.msi" REBOOT=ReallySuppress PRODUCT_KEY=xxxxxxxxxx CIF_TELEMETRY=1 ADDLOCAL=Altiris_NS /l*v "C:\Windows\Temp\SWV75upgrade.log" /qn"
 

On Step 6 - Install new Symantec Workspace Streaming Agent
Change the "altstream" property to your own streaming server url

REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Servers\1 /v Name /t REG_SZ /d "altstream"
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\AppStream\AppMgr\Portals /v 1 /t REG_SZ /d "http://altstream"

- You need to get the required install files from vendors yourself!  

Hope this is helping somebody else :)

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.