Thursday, December 16, 2010

How To Make A Poster A3

WebInterface ISO standard pages

Na? Sometimes even a Citrix Web Interface installed? Determined.
And what do you do next? Sites set up of course. The two usual - soon perhaps three sites. But right now it depends but usually a XenAppWeb XenAppServices site and one (Access Interface / PNAgent).
should look like, since the configuration in most scenarios like that, I have summarized this process (as usual here) as a small batch file. The result is a XenApp Services site and, further adjustments are possible on the Citrix web interface management console at any time.
The batch file will ask whether with standard values (paths, server) want to work, but you can make your own data interactively. I have in the event that this batch file calls itself scripted wird, einen Parameter vorgesehen, der nichts mehr fragt und stattdessen flott ein Ergebnis liefert (/stfu).


Hier ist der WI zard of OS :-)


@echo off
rem ### contact daniel.wipperfuerth@adn.de for info / improvements.
echo ######
echo ### script to set up two simple, standard websites for WI.
echo ### The created XA Web Site will be the standard site for IIS!
echo ### This script can be started with /stfu to just create two sites
echo ### without asking anything.
echo ### BE SURE YOU UNDERSTAND WHAT THIS SKRIPT IS DOING BEFORE RUNNING IT
echo ######

rem ### Declaring default variables - you can customize these - but script asks for path
setlocal
rem ### XAWPath specifies the XenApp Web-path - where do you want the website to be?
rem ### XAPNAPath specifies the XenApp Services Site-Path
rem ### If no parameter is given, i take the following defaults
set XAWpath=/Citrix/XenApp
set XAPNAPath=/Citrix/PNAgent
set XAServers=localhost
set XMLPort=80

rem ### SECTION ONE - gathering info
rem ### Find out if we are running on 64bit to get deviant path of sitemgr.exe
if defined ProgramFiles(x86) (for /F "usebackq delims==" %%n in (`dir /b /s "%ProgramFiles(x86)%\citrix\web interface\sitemgr.exe"`) do set smgrpath=%%n) else (for /F "usebackq delims==" %%n in (`dir /b /s "%ProgramFiles%\citrix\web interface\sitemgr.exe"`) do set smgrpath=%%n)
rem ### Find out if we are in stfu-mode
if "%1"=="" (goto :nostfu)
if /i %1==/stfu (goto :setitup)
:nostfu

rem ### Ask if Wi Sites should be created in the default path
:askfordefaults
set /P WantDefaults=Do you want to use /citrix/xenapp and /citrix/pnagent (y/n)?
if %WantDefaults%==y goto :askforservers
if %WantDefaults%==n goto :usecustompaths
echo You entered %WantDefaults%, but i expected a single y or n. I will ask again.
goto :askfordefaults

rem ### Ask if default server and xml port should be used
:askforservers
set /P WantDefaultServers=Do you want to use localhost and XML Port 80 (y/n)?
if %WantDefaultServers%==y goto :setitup
if %WantDefaultServers%==n goto :usecustomservers
echo You entered %WantDefaultServers%, but i expected a single y or n. I will ask again.
goto :askforservers



rem ### SECTION TWO - ask for custom paths or servers
:usecustompaths
echo Choose your paths - but do not forget the /slash...
set /P XAWpath=Enter XA Web Path (like /Citrix/XenApp):
set /P XAPNAPath=Enter XA Web Path (like /Citrix/PNAgent):
goto :askforservers

:usecustomservers
echo Enter your XA Servers - separate Servers with a semicolon (like XA1;XA2;XA3)
set /P XAServers=Enter your XA Servers (like XA1 or XA1.ADN.DEMO):
set /P XMLPort=Enter your XML Port (like 80 or 8080):
goto :setitup



rem ### SECTION THREE - create sites for a better world
rem ### Let`s rock
:setitup
echo Making your WI a homely place - please wait...
echo This takes usually less than 2 minutes.
echo XA Web Site creation starting
"%smgrpath%" -c "WIDest=1:%XAWpath%,WIDefaultSite=Yes,FarmName=MyFarm,XMLService=%XAServers%,XMLSPort=%XMLPort%,XMLSProtocol=HTTP,AppAccessMethods=Remote;Streaming"
if %errorlevel% GTR 0 (echo Errorlevel was %errorlevel%) else echo XA Web Site creation finished
echo XA Services Site creation starting
"%smgrpath%" -c "PNADest=1:%XAPNAPath%,FarmName=MyFarm,XMLService=%XAServers%,XMLSPort=%XMLPort%,XMLSProtocol=HTTP,AppAccessMethods=Remote;Streaming"
if %errorlevel% GTR 0 (echo Errorlevel was %errorlevel%) else echo XA Services Site creation finished

rem ### cleaning
up: end
endlocal
pause

0 comments:

Post a Comment