Docstoc

TS_Install

Document Sample
TS_Install Powered By Docstoc
					                                           Square One bv : TS Installation




                           Installation
                          Windows 2003
                         Terminal Server




                                                               Schiestraat 38
                                                          2201 AS Noordwijk
                                                    Tel: +31 (0)71 364 86 57
                                                              www.square1.nl
                                                  mailto:support@square1.nl




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC           1    Draft version
Update : X. van Bommel                             Date : 08.02.2012
                                                  Square One bv : TS Installation

                                    Square One bv
                                    TS Installation


1    Introduction.                                                              3

     1.1   Square One bv WTS Support.                                           3

2    Install …….                                                                4

4    Security.                                                                  8

5    Installing new applications.                                               9

     Program installation                                                       9
     Getting ready to install programs                                          9
     Starting the installation                                                 10

6    TS Batch files.                                                           13




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                  2    Draft version
Update : X. van Bommel                                    Date : 08.02.2012
                                                        Square One bv : TS Installation

1        Introduction.

No introduction yet .......




1.1      Square One bv WTS Support.


Unix-Windows integration - Thin-Client/Server - Remote Access


Company                       :Square One bv
                              Schiestraat 38
                              2201 AS
                              Noordwijk
                              The Netherlands


Telephone                     : +31 (0)71 3648657
Fax                           : +31 (0)71 3620293
Email Square1                 : Support@Square1.nl
Web Site                      : http://www.square1.nl


Xander van Bommel             : Network Engineer
Email Square1                 : Xander@Square1.nl


Oscar Horvath                 : Network Engineer
Email Square1                 : Oscar@Square1.nl




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                        3    Draft version
Update : X. van Bommel                                          Date : 08.02.2012
                                                                     Square One bv : TS Installation

2         Install …….



Installation of SYSTEM from CD.
1. Boot from Manufacture CD.
2. Do a normal (all defaults) Windows 2003 installation.
3. Delete and add Windows components for Terminal Server and reboot.
4. Fill in the TCP/IP details, If connected to 100Mbps UTP jack, than configure NIC to 100Mbps
   full duplex mode.
5. Configure Harddisk partitions.


Server partitioning Dell Perc 4Di (2 * 73 GB) RAID 1.
Array   Partition No.   Type          Size           Drive         Label          Description
1       Partition 0            N/A           8 MB            N/A           N/A           System Partition
1       Partition 1            NTFS          16384 MB        C:            SYSTEM        System disk
N/A     N/A                    N/A           N/A             D:            CDROM         CDROM
1       Partition 3            NTFS          44 GB           E:            Data          Home Directory
1       Partition 2            NTFS          8192 MB         Z:            TEMP/SWAP Page / Spool /Temp



6. Install Windows 2003 SP1
7. Add the server to the desired domain and reboot.
8. Configure Page file(s) and Startup /Recovery.
      Change : My Computer / Properties / Advanced.
                Performance options / Application response : Background services
                Performance options / Virtual Memory / Change… (Change size and location of page
                file)
                        C:     = 16MB – 16MB                 (Initial size = Maximum size)
                        Z:     = 2*RAM –2*RAM (Initial size = Maximum size)


                Startup / Recovery
                        System Startup       : 5 sec.
                        Write an event to the system log           : Default ON.
                        Send an administrative alert               : ON.
                        Automatically Reboot                       : ON.
                        Write Debugging information                : Small Memory Dump
        Close and reboot.




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                          4    Draft version
Update : X. van Bommel                                                            Date : 08.02.2012
                                                                            Square One bv : TS Installation

Windows 2003 Components for Terminal Server
Accessories and Utilities.                                                          Downlevel Client Support.
           Accessibility Wizard.                                                    MSMQ HTTP Support.
        Accessories.                                                                Routing Support.
                      Calculator.                                                   Triggers.
                      Character Map.                             Certificate Services.
                      Clipboard Viewer.                                     Certificate Services CA.
                      Desktop Wallpaper.                                    Certificate Services Web Enrollment Support.
                      Document Templates.                        E-Mail Services.
                      Mouse Pointers.                                       POP3 Service.
                      Paint.                                                POP3 Service Web Administration.
                      WordPad.                                      Fax Services.
        Communications.                                             Indexing Service.
                      Chat.                                      Internet Explorer Enhanced Security configuration.
                      Hyper Terminal.                                       For administrator groups.
Application Server.                                                         For all other user groups.
           Application Server Console.                           Management and Monitoring Tools.
           ASP.NET.                                                         Connection Manager Administration Kit.
           Enable network COM+ access.                                      Connection Point Services.
           Enable network DTC access.                                       Network Monitor Tools.
           Internet Information Services (IIS).                             Simple Network Management Protocol.
                Background Intelligent Transfer Service                     WMI SNMP Provider.
                (BITS) Server Extensions.
                                                                            WMI Windows Installer Provider.
                                 BITS management console snap-
                           in.                                   Networking Services.

                                 BITS server extension ISAPI.               Domain Name System (DNS).

                      Common Files.                                         Dynamic Host Configuration Protocol (DHCP).

                      File Transfer Protocol (FTP) Server.                  Internet Authentication Service.

                      FrontPage 2002 Server Extensions.                     Simple TCP/IP Services.

                      Internet Information Services Manager.                Windows Internet Name Service (WINS).

                      Internet Printing.                         Other Network File and Print Services.

                      NNTP Service / NNTP Service.                          File Services for Macintosh.

                      SMTP Services / SMTP Service.                         Print Services for Macintosh.

                World Wide Web Service.                                     Print Services for Unix.

                                 Active Server Pages.               Remote Installation Services.

                                 Internet Data Connector.           Terminal Server.

                                 Remote Administration (HTML).      Terminal Services Licensing.

                             Remote Desktop Web                  UDDI Services.
                           Connection.                                      UDDI Services Administration Console.
                                 Server Side Includes.                     UDDI Services Database and Web Server
                                 WebDAV Publishing.                      Components.

                                 World Wide Web Server.             Update Root Certificates.

        Message Queuing.                                         Windows Media Services.

                      Active Directory Integration.                         Multicast and Advertisement Logging Agent.

                Common                                                      Windows Media Services.

                                 Core functionality.                       Windows Media Services Administrator for the
                                                                         Web.
                                 Local storage.
                                                                            Windows Media Services snap-in.



8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                                 5    Draft version
Update : X. van Bommel                                                                   Date : 08.02.2012
                                                           Square One bv : TS Installation

Server TCP/IP details.

Computername:
Location:                          Lankhorst-Sneek
Domain:                            LankhorstEuronete
Function:                          Terminal Server


IP Address:
Subnet Mask
1st Default Gateway:
2nd Default Gateway:


1st DNS Server:
2nd DNS Server:
Host Name:                         …….LankhorstEuronete.com
Domain:                           LankhorstEuronete.com
 st
1 Domain Search Order             LankhorstEuronete.com
 nd
2 Domain Search Order
 rd
3 Domain Search Order


1st WINS Server:
2nd WINS Server:




TS share:                          \\........\TS$
Install share:                     \\........\Install$


                                           Account            Password
Administrator:                             Administrator           ???
TS Admin:                                  ……\TsAdmin              ???
TS Test:                                   …….\TsUser              ???




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                           6    Draft version
Update : X. van Bommel                                             Date : 08.02.2012
                                                          Square One bv : TS Installation

3     Terminal Server base installation.

    1. Terminal Server Client (installed on all W2003 systems).
    2. Internet Explorer 6 English (installed on all W2003 systems).
    3. Acrobat Reader 7.
    4. Office 2003 Multi-Language
    5. Bull Terminal Emulation Software
    6. ESP for Windows




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                               7    Draft version
Update : X. van Bommel                                                 Date : 08.02.2012
                                                                Square One bv : TS Installation


4        Security.

    1. Create on the PDC the following global groups.
                TS_Admins
                TS_Users
                TS_NoAccess
    2. Execute the following batch file.
                Tsbatch.cmd.
    3. Example connection permission configuration : Startup the MetaFrame Tools \ Citrix
       Connection Configuration \ Security permissions.
        Everyone            Guest Acces          s    : remove
        Guest        Guest Access                : remove
        Administrators      User Access               : add
        TS_NoAccess         No Access                 : add
        TS_Users            User Access               : add


FYI : Default NTFS rights on “SYSTEM:\WINNT” should match following permissions.
Name                        Permissions               Apply
Administrators                    Full Control                This folder, subfolders and files
SYSTEM                      Full Control              This folder, subfolders and files
Power Users                       Modify                            This folder, subfolders and files
Users                       Read & Execute            This folder, subfolders and files
CREATOR OWNER                     Full Control                Subfolder and files only
Everyone                    Read & Execute            This folder only




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                   8    Draft version
Update : X. van Bommel                                                     Date : 08.02.2012
                                                             Square One bv : TS Installation

5         Installing new applications.

Installing applications on Terminal Server needs to be done in “install” mode, when setup of new
application has finished you need to put the server back in “execute” mode.



Program installation

         Use Add/Remove Programs in Control Panel to install applications on the Terminal server.
          With this method, you can install programs for multisession use. For more information
          about installing applications on a Terminal server, see Starting the installation.

         Once you have enabled Terminal Services and installed programs, do not switch Terminal
          Services on and off.
          Terminal Services installs programs for use in a multisession environment. Programs that
          were installed while Terminal Services was installed might not work correctly when
          Terminal Services is turned off. You should reinstall all programs for use without Terminal
          Services if you decide to remove the component.



Getting ready to install programs
It is recommended that you install programs before providing client access to the server. This
ensures that you can test the program before it is accessed, reducing the time it takes to perform
program tuning.
If you are installing a program after clients have been granted access, be certain that there are no
users logged onto the server during installation. You can send clients a message detailing the time
and duration of the installation and then disable all connections before starting.
For more information about currently connected sessions, see Terminal Services Manager
overview.
For more information about sending messages to users, see To send a message to a user.
For more information about disabling a connection, see To disable a connection.

        Note
         You should be logged on using an administrator account when installing programs.




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                9    Draft version
Update : X. van Bommel                                                  Date : 08.02.2012
                                                               Square One bv : TS Installation

Starting the installation
Use either of the following methods to install programs for multisession application server access:
         Use Add/Remove Programs in Control Panel.

         Use the change user command at the command prompt before and after installing the
          program.
One of the primary functions of the change user command is to ensure that program files are
installed to the systemroot rather than the windows subdirectory of the user's home directory
(%homepath%\windows). This makes the programs available for multisession access.
Before the program is installed, change user /install places the system in install mode and turns
off .ini file mapping. The system then records how the setup APIs initially install the program.
After the program is installed, change user /execute returns the system to execute mode, restores
.ini file mapping, and redirects user-specific data to the user's home directory.
When the user opens the program, user-specific registry setting files (.ini, .dll, .ocx, and so on) are
automatically propagated as needed to the user's home directory.
Add/Remove Programs, which automatically runs the change user command, is the preferred
method. Enter change user at the command prompt only when you install a program by another
method and want to ensure multisession access. For example, when Internet Explorer 5 prompts
you to install an add-on program, use change user at the command prompt to ensure that the
program is installed for multisession access.

        Important
         Some programs need tuning in order to work correctly for a multisession environment.
          Before installing a program, check Application compatibility scripts for a list of programs
          that require scripts and information about how to use them.
For more information, see To install a program using Add/Remove Programs.

        Notes
         Do not copy program files from one directory to another or manually edit the registry during
          installation.

         Install programs on the Terminal server local drive rather than on a file server. This
          improves program performance.

         Install programs on NTFS file system formatted drives rather than on FAT formatted drives.
          You can only set file permissions on NTFS drives.




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                  10   Draft version
Update : X. van Bommel                                                    Date : 08.02.2012
                                                                          Square One bv : TS Installation

Program for all the users.
If this application must be available for all users you can simply copy the shortcuts to the proper
path and then run the “TSBatch.cmd” file.
Copy the shortcuts somewhere into the following path :
        \\DCLH1\TS$\Admin\Documents and Settings\All Users\Start Menu\…etc.


Program for users based on Domain group membership.
If this application needs to be available for a small group of users then some batch files in the
directory “\\DCLH1\TS$\Admin\…etc” will need to be modified.


1) Wtsgroup.cmd                 :Will (re)create Local groups on the Terminal Server and add all the
                                Domain groups which need access to the application into this local group.




2) Wtsapp.cmd                   :Sets all kind of temporary environment variables which will be needed the
                                process permissions to files and directories, see examples below.
set RA_Outlook=/c /g "Administrators:f" "SYSTEM:f" "TS_Outlook:r" /y
       Sets the environment variable RA_Outlook. This variable will be used later in the batch files “wtsprog.cmd” and/or
       “wtsprof.cmd”.
       This specific variable replaces the NTFS ACL (Access Control List).
       Administrators and SYSTEM will be granted full control permissions.
       TS_Outlook will be granted read permissions.

set RA_ABN_Amro=/e /c /p "Administrators:f" "SYSTEM:f" "TS_ABN_Amro:r" /r "Authenticated Users" "CREATOR
OWNER"
       Sets the environment variable RA_ABN_Amro. This variable will be used later in the batch files “wtsprog.cmd”
       and/or “wtsprof.cmd”.
       This specific variable will edit the NTFS ACL (Access Control List).
       Administrators and SYSTEM will be granted full control permissions.
       RA_ABN_Amro will be granted read permissions.
       Permissions for the "Authenticated Users" and "CREATOR OWNER" will be revoked.


3) Wtsprog.cmd : This batch files will set NTFS permissions on entire volumes and a select
group of applications, see examples below.
If specified otherwise “Administrator” and “SYSTEM” will have full control permissions.


%Xcacls% "%SYSTEM%\PDOXUSRS.NET" %UChange%
      “Authenticated Users” will have change permissions on the file “PDOXUSRS.NET”.

%Xcacls% "%SYSTEM%\Program Files\Hooge Huys" /t %CA_HH_TopSite%
      “TS_HH_TopSite” will have change permissions on the directory “Hooge Huys” (/t = reset subdirectories).

%Xcacls% "%SYSTEM%\Program Files\Internet Explorer"          /t %RA_InternetExplorer%
      “TS_InternetExplorer” will have read permissions on the directory “Internet Explorer” (/t = reset subdirectories).

%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\Office10\OUTLOOK.EXE"                 %RA_Outlook%
      “TS_Outlook” will have read permissions on the file “OUTLOOK.EXE”.

%Xcacls% "%SYSTEM%\Program Files\NetMeeting" /t %Admin%
      Only “Administrators” and “SYSTEM” will have full control permissions on the directory “NetMeeting” (/t = reset
      subdirectories).




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                                11   Draft version
Update : X. van Bommel                                                                  Date : 08.02.2012
                                                                          Square One bv : TS Installation

%Xcacls% "%SYSTEM%\Program Files\VH"                                        %RA_Acturaat%
%Xcacls% "%SYSTEM%\Program Files\VH\Acturaat Visible" /t             %CA_Acturaat%
      “TS_Acturaat” will have read permissions on the directory “VH”.
      “TS_Acturaat” will have change permissions on the directory “Acturaat Visible” (/t = reset subdirectories).


4) Wtsprof.cmd     : This batch files will set NTFS permissions on “Document and Settings” and
“Admin\Shortcuts” directory, see examples below (some more examples and details can also be
found above at “3) Wtsprog.cmd”).
If specified otherwise “Administrator” and “SYSTEM” will have full control permissions.


%Xcacls% "%Prof_Shortcuts%"           /t %Default2%
      “Authenticated Users” will have read permissions.

%Xcacls% "%Prof_Shortcuts%\Desktop\Internet Explorer.lnk" %RA_InternetExplorer%
      “TS_InternetExplorer” will have read permissions.

%Xcacls% "%Prof_Prog%\Admin"        /t %Admin%
      Only “Administrators” and “SYSTEM” will have full control permissions.

%Xcacls% "%Prof_Prog%\Business Applications\Acturaat"          /t %RA_Acturaat%
      “TS_Acturaat” will have read permissions.




5) Homedir.cmd         : Creates directories and copies files during logon for all the users (see
examples below.


if not exist "%HOME%\TEMP"          md "%HOME%\TEMP"
if not exist "%PROG%"               md "%PROG%"
if not exist "%PROG%\Infodisk"      md "%PROG%\Infodisk"
if not exist "%PROG%\Infodisk\INFO.TPS"
         copy "%ProgramFiles%\INFDSK01\INFO.TPS" "%PROG%\Infodisk\INFO.TPS"
if not exist "%PROG%\zleven\data"   md "%PROG%\zleven\data"


6) Shortcuts.cmd : Creates / rebuilds the Start Menu and Desktop icons based on per user
permissions. However if there are some icons placed automatically on the user(s) desktop than
they also need to be deleted by this batch file.
Note : We do not want to delete the icons the user has created on his/her own desktop (see
examples below).


if exist "%To%\Desktop\Anva.lnk"       del /Q "%To%\Desktop\Anva.lnk"          >NUL
if exist "%To%\Desktop\Eudora.lnk"     del /Q "%To%\Desktop\Eudora.lnk"        >NUL




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                               12   Draft version
Update : X. van Bommel                                                                 Date : 08.02.2012
                                                                      Square One bv : TS Installation

6        TS Batch files.

$TS            : \\DCLH1\TS$
$Company : Lankhorst Euronete B.V.
$TS\Admin\$Company\Tsbatch.cmd = \\DCLH1\TS$\Admin\Tsbatch.cmd.


TSBatch.cmd            : For copying complete directory structures including policy files …etc.
TS.scr                 : For removing registry hive trees.
Wtsgroup.cmd           : Creation of local groups on Terminal Server(s).
Wtsapp.cmd             : ACL’s temporary environment variables.
Wtsprog.cmd            : Setting NTFS permissions on entire volumes / directories and files.
Wtsprof.cmd            : Setting NTFS permissions to build users “Start Menu\Programs”.
UsrLogon.cmd           : Terminal Server logon batch (modified), processed during user logon.
Tslogon.cmd            : Makes a call to all the necessary logon batches.
Homedir.cmd            : Creates directories and copies files during logon for all the users.
Outlook.cmd            : Outlook profile builder.
Shortcuts.cmd          : Creates / rebuilds the Start Menu and Desktop icons based on permissions.
Apps.scr               : Creates directories and copies files during logon based on domain groups.


$TS\Admin\$Company\Tsbatch.cmd.
@echo off
REM ***************
REM * TSbatch.CMD *
REM ***************

Echo v1.0 : First Run
Echo v1.1 : Configuration Outlook Profile Builder
Echo v1.2 : Disable van Services toegevoegd
Echo v1.3 : Activeren Printhood
Echo v1.4 : Aanpassingen in Desktop en Start Menu
Echo v1.5 : Directory security aangepast t.b.v Bull(change)
Echo.

set ver=v1.5
set SYSTEM=%SystemDrive%

if exist "%SYSTEM%\Admin\TSbatch_ver.txt" type "%SYSTEM%\Admin\TSbatch_ver.txt"
if not exist "%SYSTEM%\Admin\TSbatch_ver.txt" echo No TSbatch version available on %COMPUTERNAME%
echo.

choice "Do you want to proceed with this Terminal Server change (%ver%) ? "
if ERRORLEVEL 2 goto NoChange
goto Change

REM **********
REM * Change *
REM **********
:Change
REM set PAGE=D:
set DATA=E:
set PRINTHOOD=\\DCLH1\Printers$
set Profiles=%SYSTEM%\Documents and Settings
set Prof_All=%ALLUSERSPROFILE%
set Prof_Prog=%Prof_All%\Start Menu\Programs

set From=\\DCLH1\TS$\Admin
set To=%USERPROFILE%
set Directory=Start Menu\Programs
set OPT=/S /C /I /Q /Y


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                      13   Draft version
Update : X. van Bommel                                                        Date : 08.02.2012
                                                                       Square One bv : TS Installation

REM
REM Copy Admin directory to System
REM
ROBOCOPY %From%\Logon              %SYSTEM%\Admin\Logon            /MIR /LOG:%TEMP%\ROBOCOPY2.log
ROBOCOPY %From%\Policy             %SYSTEM%\Admin\Policy           /MIR /LOG:%TEMP%\ROBOCOPY3.log
ROBOCOPY %From%\Shortcuts          %SYSTEM%\Admin\Shortcuts /MIR /LOG:%TEMP%\ROBOCOPY4.log

REM
REM Document and Settings
REM
if not exist "%Profiles%\All Users_old" ROBOCOPY "%Profiles%\All Users" "%Profiles%\All Users_old" /MIR /R:0
/LOG:%TEMP%\ROBOCOPY.log
ROBOCOPY "%From%\Documents and Settings\All Users\Desktop" "%Prof_All%\Desktop"                  /MIR
/LOG:%TEMP%\ROBOCOPY5.log
ROBOCOPY "%From%\Documents and Settings\All Users\Start Menu"             "%Prof_All%\Start Menu"              /MIR
/LOG:%TEMP%\ROBOCOPY6.log

if not exist "%Profiles%\Default User_old" ROBOCOPY "%Profiles%\Default User" "%Profiles%\Default User_old" /MIR
/LOG:%TEMP%\ROBOCOPY.log
ROBOCOPY "%From%\Documents and Settings\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch"
"%Profiles%\Default User\Application Data\Microsoft\Internet Explorer\Quick Launch" /MIR
ROBOCOPY "%From%\Documents and Settings\Default User" "%Profiles%\Default User" /MIR
/LOG:%TEMP%\ROBOCOPY7.log
ROBOCOPY "%From%\Documents and Settings\Default User\Start Menu" "%Profiles%\Default User\Start Menu" /MIR
/LOG:%TEMP%\ROBOCOPY7.log

REM
REM System ...etc
REM
if not exist %SystemRoot%\System32\usrlogon_old.cmd copy %SystemRoot%\System32\usrlogon.cmd
%SystemRoot%\System32\usrlogon_old.cmd
copy %From%\Logon\usrlogon.cmd %SystemRoot%\System32\usrlogon.cmd

if not exist %SystemRoot%\System32\black16.scr copy %From%\Policy\black16.scr
%SystemRoot%\System32\black16.scr

KIX32 TS.scr >nul

call wtsgroup.cmd
call wtsprog.cmd
call wtsprof.cmd

call ConfigServices.cmd

echo TSbatch %ver% is installed on %COMPUTERNAME% > %SYSTEM%\Admin\TSbatch_ver.txt
echo.
echo.
echo You need to reboot "%COMPUTERNAME%" (only if this is the first time you install these settings).
echo.
goto End


REM ************
REM * NoChange *
REM ************
:NoChange
  echo.
  echo No change(s) has been made.
  goto End

REM *******
REM * End *
REM *******
:End
  echo.
  PAUSE




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                            14   Draft version
Update : X. van Bommel                                                              Date : 08.02.2012
                                                                       Square One bv : TS Installation

$TS\Admin\$Company\TS.scr (MS Outlook namespace …etc).
BREAK OFF

; Remove Outlook icon from desktop
;
DelTree ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00020D75-0000-
0000-C000-000000000046}")

EXIT


$TS\Admin\$Company\wtsgroup.cmd.
@echo off
REM ****************
REM * WTSGROUP.CMD *
REM ****************

SET RDOMAIN=LHEuronete

Echo Adding Windows Terminal Server Local Groups
Echo -------------------------------------------
Echo.

REM ***********************************
REM * Setup of security rights on WTS *
REM ***********************************
NET LOCALGROUP "TS_Users"               /ADD /COMMENT:"TS_Users"      >NUL
NET LOCALGROUP "TS_NoAccess"              /ADD /COMMENT:"TS_NoAccess"    >NUL
NET LOCALGROUP "TS_PowerUsers"             /ADD /COMMENT:"TS_PowerUsers"   >NUL
NET LOCALGROUP "TS_PowerUsersAdmR" /ADD /COMMENT:"TS_PowerUsersAdmR"            >NUL
NET LOCALGROUP "TS_PowerUsersAdmC" /ADD /COMMENT:"TS_PowerUsersAdmC"            >NUL

NET LOCALGROUP "Administrators"       "%RDOMAIN%\TS_Admins"                     /ADD >NUL
NET LOCALGROUP "TS_NoAccess"          "%RDOMAIN%\TS_NoAccess"                    /ADD >NUL
NET LOCALGROUP "Remote Desktop Users" "%RDOMAIN%\TS_Users"                     /ADD >NUL

REM **********************
REM * Delete permissions *
REM **********************
NET LOCALGROUP "Administrators" "%RDOMAIN%\Domain Admins"    /DELETE >NUL
NET LOCALGROUP "Users"       "%RDOMAIN%\Domain Users"     /DELETE >NUL

REM ****************************************************************
REM * WTS Local groups Creeeren lokale groepen op Terminal Servers *
REM ****************************************************************

NET LOCALGROUP "TS_Access"                           /ADD /COMMENT:"Users of Access"                        >NUL
NET LOCALGROUP "TS_AccessRT"                      /ADD /COMMENT:"Users of Access RunTime"                   >NUL
NET LOCALGROUP "TS_Excel"                            /ADD /COMMENT:"Users of Excel"                         >NUL
NET LOCALGROUP "TS_Frontpage"                        /ADD /COMMENT:"Users of Frontpage"                     >NUL
NET LOCALGROUP "TS_Outlook"                          /ADD /COMMENT:"Users of Outlook"                       >NUL
NET LOCALGROUP "TS_Powerpoint"                       /ADD /COMMENT:"Users of Powerpoint"                    >NUL
NET LOCALGROUP "TS_Publisher"                        /ADD /COMMENT:"Users of Publisher"                     >NUL
NET LOCALGROUP "TS_Word"                             /ADD /COMMENT:"Users of Word"                          >NUL
NET LOCALGROUP "TS_InternetExplorer"              /ADD /COMMENT:"Users of InternetExplorer"                 >NUL
NET LOCALGROUP "TS_Glink"                            /ADD /COMMENT:"Users of Glink"                         >NUL
NET LOCALGROUP "TS_Bull"                      /ADD /COMMENT:"Users of Bull"                          >NUL
NET LOCALGROUP "TS_Winzip"                           /ADD /COMMENT:"Users of Winzip"                        >NUL

REM ****************************************
REM * Add Domain groups to Local TS groups *
REM ****************************************
NET LOCALGROUP "TS_Access"                       "%RDOMAIN%\A_Access"             /ADD >NUL
NET LOCALGROUP "TS_AccessRT"                       "%RDOMAIN%\A_AccessRT"             /ADD >NUL
NET LOCALGROUP "TS_Excel"                      "%RDOMAIN%\A_Excel"             /ADD >NUL
NET LOCALGROUP "TS_Frontpage"                     "%RDOMAIN%\A_Frontpage"           /ADD >NUL
NET LOCALGROUP "TS_Outlook"                      "%RDOMAIN%\A_Outlook"           /ADD >NUL
NET LOCALGROUP "TS_Publisher"                        "%RDOMAIN%\A_Publisher"           /ADD >NUL
NET LOCALGROUP "TS_Powerpoint"                       "%RDOMAIN%\A_Powerpoint"            /ADD >NUL
NET LOCALGROUP "TS_Word"                        "%RDOMAIN%\A_Word"              /ADD >NUL
NET LOCALGROUP "TS_InternetExplorer"                "%RDOMAIN%\A_InternetExplorer"      /ADD >NUL
NET LOCALGROUP "TS_Glink"                            "%RDOMAIN%\A_Glink"            /ADD >NUL.
NET LOCALGROUP "TS_Bull"                     "%RDOMAIN%\A_Bull"             /ADD >NUL
NET LOCALGROUP "TS_WinZip"                      "%RDOMAIN%\A_WinZip"             /ADD >NUL


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                            15   Draft version
Update : X. van Bommel                                                              Date : 08.02.2012
                                                                      Square One bv : TS Installation

$TS\Admin\$Company\wtsapp.cmd.
@echo off
REM **************
REM * WTSAPP.CMD *
REM **************

REM ---------------------------------------------
REM Default : Domain Users - Default permissions
REM UChange : Domain Users - Change permissions
REM ---------------------------------------------
set Revoke="Everyone" "Power Users" "TERMINAL SERVER USER" "Users"
set SysWinnt=/e /c /p "Administrators:f" "SYSTEM:f" "CREATOR OWNER:f" "Power Users:c" "Users:r" "Everyone:r" /r
"Authenticated Users"

REM set Admin=/e /c /p "Administrators:f" "SYSTEM:f" /r "TS_PowerUsers" "Authenticated Users" "CREATOR OWNER"
%Revoke%
set Admin=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsersAdmR:r" "TS_PowerUsersAdmC:c" /r "TS_PowerUsers"
"Authenticated Users" "CREATOR OWNER" %Revoke%
set Adm_Read=/e /c /p "Administrators:r" /r "SYSTEM" "TS_PowerUsers" "Authenticated Users" "CREATOR OWNER"
%Revoke%
set Adm_None=/e /c /p "Administrators:n" /r "SYSTEM" "TS_PowerUsers" "Authenticated Users" "CREATOR OWNER"
%Revoke%
set Adm_Deny=/c /g "SYSTEM:f" "TS_Users:r" /d "Administrators" /y
set Default=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "Authenticated Users:r" /r "CREATOR OWNER"
%Revoke%
set Default2=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "Authenticated Users:r" /y
set DefChange=/e /c /p "Administrators:f" "SYSTEM:f" "Authenticated Users:c" /r "CREATOR OWNER" %Revoke%
set Def_RWX=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "Authenticated Users:ewx" /r "CREATOR
OWNER" %Revoke%
set O_Change=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "Authenticated Users:r;c" "CREATOR
OWNER:c" /r %Revoke%
set O2_Change=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "Authenticated Users:c;c" "CREATOR
OWNER:c" /r %Revoke%
set O_Full=/e /c /p "Administrators:f" "SYSTEM:f" "Authenticated Users:c" "CREATOR OWNER:f" /r %Revoke%
set UChange=/e /c /p "Authenticated Users:c"

REM set Xcacls=%NTResKit%\Xcacls.exe
REM set Profiles=C:\Profiles
REM set Prof_All=%Profiles%\All Users

set SYSTEM=%SystemDrive%
set DATA=Z:
set Xcacls=Xcacls.exe
REM set Xcacls=%SYSTEM%\Admin\Bin\xcacls.exe
set Profiles=%SYSTEM%\Documents and Settings
set Prof_All=%ALLUSERSPROFILE%
set Prof_Prog=%Prof_All%\Start Menu\Programs
set Database=%DATA%\Apps

REM ------------------------------------------
REM R = Application Users - Read permissions
REM C = Application Users - Change permissions
REM ------------------------------------------
set RA_Act=/c /g "Administrators:f" "SYSTEM:f" "TS_Act:r" /y
set RA_AccountView=/c /g "Administrators:f" "SYSTEM:f" "TS_AccountView:r" /y

set RA_Access=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Access:r" /y
set RA_Access2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Access:r" /r "Authenticated Users"
"CREATOR OWNER"
set cA_Access=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Access:C" /y
set RA_AccessRT=/c /g "Administrators:f" "SYSTEM:f" "TS_AccessRT:r" /y
set RA_Excel=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Excel:r" /y
set RA_Excel2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Excel:r" /r "Authenticated Users"
"CREATOR OWNER"
set RA_Frontpage=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Frontpage:r" /y
set RA_Frontpage2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Frontpage:r" /r "Authenticated Users"
"CREATOR OWNER"
set RA_Outlook=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Outlook:r" /y
set RA_Outlook2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Outlook:r" /r "Authenticated Users"
"CREATOR OWNER"
set RA_Powerpoint=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Powerpoint:r" /y
set RA_Powerpoint2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Powerpoint:r" /r "Authenticated
Users" "CREATOR OWNER"
set RA_Publisher=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Publisher:r" /y
set RA_Publisher2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Publisher:r" /r "Authenticated Users"
"CREATOR OWNER"

8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                          16   Draft version
Update : X. van Bommel                                                            Date : 08.02.2012
                                                                      Square One bv : TS Installation

set RA_Word=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Word:r" /y
set RA_Word2=/e /c /p "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Word:r" /r "Authenticated Users"
"CREATOR OWNER"
set RA_InternetExplorer=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_InternetExplorer:r" /y
set RA_Glink=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Glink:r" /y
set RA_Bull=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Bull:r" /y
set CA_Bull=/c /g "Administrators:f" "SYSTEM:f" "TS_PowerUsers:c" "TS_Bull:c" /y
set RA_WinZip=/c /g "Administrators:f" "SYSTEM:f" "TS_WinZip:r" /y




$TS\Admin\$Conpany\wtsprog.cmd.
@echo off
REM ***************
REM * WTSPROG.CMD *
REM ***************

call wtsapp.cmd

REM ****************************************************
REM * Copy File to prevent deletion of empty directory *
REM ****************************************************
echo Copy Protect files to prevent deletion of empty directories
IF NOT EXIST %DATA%\Temp                            md %DATA%\Temp
IF NOT EXIST %DATA%\Spool                           md %DATA%\Spool
IF NOT EXIST %DATA%\Spool\PRINTERS                  md %DATA%\Spool\PRINTERS

echo off >"%DATA%\Temp\Protect"

REM *******************************
REM * Set Protect file attributes *
REM *******************************
ATTRIB +R "%DATA%\Temp\Protect"

REM *********
REM * ADMIN *
REM *********
echo Setting Admin access rights

%Xcacls% "%SYSTEM%"                          %Default2% >nul
%Xcacls% "%SYSTEM%"                          %Default2% >nul
REM %Xcacls% "%SYSTEM%\*.*"                      %Default% >nul
%Xcacls% "%SYSTEM%\*.bat"                     %Default2% >nul
%Xcacls% "%SYSTEM%\*.com"                      %Default2% >nul
%Xcacls% "%SYSTEM%\*.ini"                    %Default2% >nul
%Xcacls% "%SYSTEM%\*.sys"                     %Default2% >nul
%Xcacls% "%SYSTEM%\*.txt"                    %Default2% >nul
%Xcacls% "%SYSTEM%\boot.ini"                  %Admin% >nul
%Xcacls% "%SYSTEM%\NTDETECT.COM"                      %Admin% >nul
%Xcacls% "%SYSTEM%\ntldr"                     %Admin% >nul
%Xcacls% "%SYSTEM%\Admin"                      /t %Default2% >nul

%Xcacls% "%SystemRoot%\system32\ie4uinit.exe"         %Default2% >nul

%Xcacls% "%SystemRoot%\system32\*.msc"        %Admin% >nul
%Xcacls% "%SystemRoot%\system32\mshta.exe"     %Admin% >nul
%Xcacls% "%SystemRoot%\system32\ODBCAD32.exe"      %Admin% >nul
%Xcacls% "%SystemRoot%\system32\tlntadmn.exe"   %Admin% >nul
%Xcacls% "%SystemRoot%\system32\tsadmin.exe"    %Admin% >nul
%Xcacls% "%SystemRoot%\system32\Com\*.msc"      %Admin% >nul
%Xcacls% "%SystemRoot%\system32\joy.cpl"      %Admin% >nul
%Xcacls% "%SystemRoot%\system32\mmsys.cpl"      %Admin% >nul
%Xcacls% "%SystemRoot%\system32\odbccp32.cpl"   %Admin% >nul
%Xcacls% "%SystemRoot%\system32\telephon.cpl"  %Admin% >nul
%Xcacls% "%DATA%"            %Default2% >nul
%Xcacls% "%DATA%\Spool"       /t %Def_RWX% >nul
%Xcacls% "%DATA%\Temp"         /t %O2_Change% >nul
%Xcacls% "%DATA%\Temp\Protect"      %Adm_Read% >nul

REM ********
REM * PROG *
REM ********
echo Setting PROG access rights

REM ----------------------------


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                          17   Draft version
Update : X. van Bommel                                                            Date : 08.02.2012
                                                                        Square One bv : TS Installation

REM User Application permissions
REM ----------------------------

%Xcacls% "%SYSTEM%\Inetpub"                               /t %Default2%                 >nul
%Xcacls% "%SYSTEM%\Program Files"                            /t %Default2%                >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Access RunTime"                    /t %RA_AccessRT%          >nul
%Xcacls% "%SYSTEM%\Program Files\Common Files"                         /t %Default%            >nul
%Xcacls% "%SYSTEM%\Dell"                               /t %Admin%                    >nul
%Xcacls% "%SYSTEM%\Program Files\Internet Explorer"                  /t %RA_InternetExplorer% >nul
%Xcacls% "%SYSTEM%\Program Files\NetMeeting"                        /t %Admin%                  >nul
%Xcacls% "%SYSTEM%\Program Files\Outlook Express"                      /t %Admin%               >nul
%Xcacls% "%SYSTEM%\Program Files\Support Tools"                      /t %Admin%                >nul
%Xcacls% "%SYSTEM%\Program Files\Uninstall Information"                /t %Admin%               >nul
%Xcacls% "%SYSTEM%\Program Files\Windows Media Player"                     /t %Admin%           >nul
%Xcacls% "%SYSTEM%\Program Files\Windows NT"                          /t %Default%                     >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11"                  /t %Default%       >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE"                 %RA_Excel%           >nul
REM %Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\FRONTPG.EXE" %RA_Frontpage%                           >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" %RA_Access%                            >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\MSPUB.EXE"                  %RA_Publisher%        >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" %RA_Outlook%                          >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\POWERPNT.EXE" %RA_Powerpoint%                          >nul
%Xcacls% "%SYSTEM%\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" %RA_Word%                             >nul
%Xcacls% "%SYSTEM%\Program Files\Glink\Gl.EXE"                                     %RA_Glink%         >nul
%Xcacls% "%SYSTEM%\Program Files\Bull"                                          /t %CA_Bull%         >nul
%Xcacls% "%SYSTEM%\Program Files\WinZip"                         /t %RA_WinZip%                 >nul




$TS\Admin\$Company\wtsprof.cmd.
@echo off
REM ***************
REM * WTSPROF.CMD *
REM ***************

REM **********************************************************************
REM * Reset permissions on All Users profile to SYSTEM and Administrator *
REM * Full Control rights.                                   *
REM **********************************************************************

call wtsapp.cmd

set Prof_Shortcuts=%SYSTEM%\Admin\Shortcuts
set Prof_Prog=%Prof_Shortcuts%\Start Menu\Programs
REM set Prof_Dept=%Prof_Shortcuts%\Start Menu\Dept Tools
set QLCH=%Prof_Shortcuts%\Application Data\Microsoft\Internet Explorer\Quick Launch

REM ************
REM * Profiles *
REM ************
echo Setting Profiles access rights

REM ----------------------------------
REM All Users Default User permissions
REM ----------------------------------
%Xcacls% "%Profiles%"                          %Default% >nul
%Xcacls% "%Prof_All%"                        /t %Default% >nul
%Xcacls% "%Prof_All%\Start Menu\Programs\Administrative Tools" /t %Admin%          >nul

REM %Xcacls% "%DATA%\Documents and Settings"                                %Default% >nul
REM %Xcacls% "%DATA%\Documents and Settings\All Users"                       /t %Default% >nul
REM %Xcacls% "%DATA%\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools" /t %Admin%
>nul

REM %Xcacls% "%Prof_All%\All Users\Desktop"          %UChange% >nul

REM ----------------------------------------------------------
REM C:\Shortcuts Application permissions (Application licence)
REM ----------------------------------------------------------

%Xcacls% "%Prof_Shortcuts%"                                        /t %Default2%          >nul

echo Setting desktop

%Xcacls% "%Prof_Shortcuts%\Desktop\Access.lnk"                               %RA_Access%                            >nul


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                             18   Draft version
Update : X. van Bommel                                                               Date : 08.02.2012
                                                                        Square One bv : TS Installation

%Xcacls% "%Prof_Shortcuts%\Desktop\Excel.lnk"                                %RA_Excel%                   >nul
REM %Xcacls% "%Prof_Shortcuts%\Desktop\Frontpage.lnk"                           %RA_Frontpage%                   >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Outlook.lnk"                               %RA_Outlook%                >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Powerpoint.lnk"                             %RA_Powerpoint%                   >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Publisher.lnk"                             %RA_Publisher%                     >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Word.lnk"                                 %RA_Word%                    >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Internet Explorer.lnk"                      %RA_InternetExplorer%             >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Glink.lnk"                               %RA_Glink%                    >nul
%Xcacls% "%Prof_Shortcuts%\Desktop\Bull.lnk"                                %RA_Bull%                     >nul

%Xcacls% "%Prof_Prog%\Internet Explorer.lnk"                                 %RA_InternetExplorer%        >nul
REM %Xcacls% "%Prof_Prog%\Microsoft Outlook.lnk"                               %RA_Outlook%                      >nul
REM %Xcacls% "%Prof_Prog%\Outlook Express.lnk"                                  %Admin%                   >nul
%Xcacls% "%Prof_Prog%\Accessories"                                       /t %Admin%                       >nul
%Xcacls% "%Prof_Prog%\Admin"                                          /t %Admin%                   >nul

%Xcacls% "%Prof_Prog%\Office\Access.lnk"                               %RA_Access%                               >nul
%Xcacls% "%Prof_Prog%\Office\Excel.lnk"                               %RA_Excel%                   >nul
REM %Xcacls% "%Prof_Prog%\Office\Frontpage.lnk"                          %RA_Frontpage%                   >nul
%Xcacls% "%Prof_Prog%\Office\Outlook.lnk"                             %RA_Outlook%                        >nul
%Xcacls% "%Prof_Prog%\Office\Powerpoint.lnk"                            %RA_Powerpoint%                   >nul
%Xcacls% "%Prof_Prog%\Office\Publisher.lnk"                            %RA_Publisher%                     >nul
%Xcacls% "%Prof_Prog%\Office\Word.lnk"                                %RA_Word%                    >nul

%Xcacls% "%QLCH%\Show Desktop.scf"                                                         %Default%
      >nul
%Xcacls% "%QLCH%\Launch Internet Explorer Browser.lnk"                                     %RA_InternetExplorer%
            >nul
%Xcacls% "%QLCH%\Outlook.lnk"                                                              %RA_Outlook%
            >nul




SYSTEM:\Admin\Logon\UsrLogon.cmd.
@Echo Off

Call "%SystemDrive%\Admin\Logon\TSlogon.cmd"

Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
If "%_SETPATHS%" == "FAIL" Goto Done

Rem
Rem This is for those scripts that don't need the RootDrive.
Rem

If Not Exist "%SystemRoot%\System32\Usrlogn1.cmd" Goto cont0
Cd /d "%SystemRoot%\Application Compatibility Scripts\Logon"
Call "%SystemRoot%\System32\Usrlogn1.cmd"

:cont0

Rem
Rem Determine the user's home directory drive letter. If this isn't
Rem set, exit.
Rem

Cd /d %SystemRoot%\"Application Compatibility Scripts"
Call RootDrv.Cmd
If "A%RootDrive%A" == "AA" End.Cmd

Rem
Rem Map the User's Home Directory to a Drive Letter
Rem

Net Use %RootDrive% /D >NUL: 2>&1
Subst %RootDrive% "%HomeDrive%%HomePath%"
if ERRORLEVEL 1 goto SubstErr
goto AfterSubst
:SubstErr
Subst %RootDrive% /d >NUL: 2>&1
Subst %RootDrive% "%HomeDrive%%HomePath%"
:AfterSubst

Rem
Rem Invoke each Application Script. Application Scripts are automatically


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                            19   Draft version
Update : X. van Bommel                                                              Date : 08.02.2012
                                                                     Square One bv : TS Installation

Rem added to UsrLogn2.Cmd when the Installation script is run.
Rem

If Not Exist %SystemRoot%\System32\UsrLogn2.Cmd Goto Cont1

Cd Logon
Call %SystemRoot%\System32\UsrLogn2.Cmd

:Cont1

:Done


SYSTEM:\Admin\Logon\Tslogon.cmd.
@echo off
REM ***************
REM * TSlogon.CMD *
REM ***************

set TSlogon=%SystemDrive%\Admin\Logon


:begin
         call %TSlogon%\homedir.cmd
         call %TSlogon%\Shortcuts.cmd
         call %TSlogon%\Outlook_Profile\outlook.cmd

REM %TSlogon%\KIX32.EXE %TSlogon%\Apps.kix
 goto end

:end


SYSTEM:\Admin\Logon\homedir.cmd.
@echo off
REM ***************
REM * HOMEDIR.CMD *
REM ***************

:begin
  set SYSTEM=%SystemDrive%
  set TSlogon=%SYSTEM%\Admin\Logon
  set HOME=H:

 if not exist "%HOME%" goto end

:homedirs
       REM *******************************
       REM * Create the HOME directories *
       REM *******************************
       set WINDOWS=%HOME%\Windows
       set PROG=%HOME%\Prog
       set Shared=%HOME%\Shared
       set MyDocs=%HOME%\My Documents
REM set Office97=%HOME%\Office97
REM set Office2000=%HOME%\Office2000
REM set Office2003=%HOME%\Office2003

         if not exist "%HOME%\TEMP"                   md "%HOME%\TEMP"
         if not exist "%TEMP%\Temporary Internet Files"     md "%TEMP%\Temporary Internet Files"
         if not exist "%PROG%"                      md "%PROG%"
         if not exist "%PROG%\EXcel"                  md "%PROG%\Excel"

REM      if not exist "%Shared%\User"               md %Shared%\User"
REM      if not exist "%Shared%\Templates"        md "%Shared%\Templates"
REM      if not exist "%Shared%\Themes"                   md "%Shared%\Themes"
REM      if not exist "%Shared%\Queries"                md "%Shared%\Queries"

REM      if not exist "%MyDocs%"                          md "%MyDocs%"
REM      if not exist "%MyDocs%\My Pictures"          md "%MyDocs%\My Pictures"

REM      if not exist "%HOME%\Data\Templates"       md "%HOME%\Data\Templates"
REM      if not exist "%HOME%\Data\Templates\Normal.dot" xcopy "%SYSTEM%\Admin\Logon\Office_settings\Normal.dot"
                              "%HOME%\Data\Templates" /C /Q /Y >nul


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                          20   Draft version
Update : X. van Bommel                                                            Date : 08.02.2012
                                                                     Square One bv : TS Installation

REM if not exist "%MyDocs%\Access"              md "%MyDocs%\Access"
REM if not exist "%MyDocs%\Excel"         md "%MyDocs%\Excel"
REM if not exist "%MyDocs%\Excel\xlstart" md "%MyDocs%\Excel\xlstart"
REM if not exist "%MyDocs%\Outlook"             md "%MyDocs%\Outlook"
REM if not exist "%MyDocs%\PowerPoint"    md "%MyDocs%\PowerPoint"
REM if not exist "%MyDocs%\Word"          md "%MyDocs%\Word"
REM if not exist "%MyDocs%\Word\AutoSave"       md "%MyDocs%\Word\AutoSave"
REM if not exist "%MyDocs%\Word\Startup" md "%MyDocs%\Word\Startup"
REM if not exist "%MyDocs%\Word\Templates"      md "%MyDocs%\Word\Templates"
 goto end

:end



SYSTEM:\Admin\Logon\Shortcuts.cmd.
@echo off
REM *****************
REM * SHORTCUTS.CMD *
REM *****************

:begin
  set SYSTEM=%SystemDrive%
  set DATA=E:
  set PRINTHOOD=\\DCLH1\Printers$
  set TSlogon=%SYSTEM%\Admin\Logon
  set Profiles=%SYSTEM%\Documents and Settings
  set Prof_All=%ALLUSERSPROFILE%
  set Prof_Prog=%Prof_All%\Start Menu\Programs
  set QLAUNCH=%APPDATA%\Microsoft\Internet Explorer\Quick Launch

 set From=%SYSTEM%\Admin\Shortcuts
 set To=%USERPROFILE%
 set Directory=Start Menu\Programs
 set OPT=/S /C /I /Q /Y

 REM
 REM Build the user Start Menu
 REM

 REM
 REM Backup Startup
 REM
 md "%To%\Start"
 xcopy "%To%\%Directory%\StartUp" "%To%\Start" %OPT% >nul

  REM
  REM Delete "Start Menu\Programs"
  REM
  %TSlogon%\ROBOCOPY.EXE "%From%\Empty\Start Menu" "%To%\Start Menu" /MIR
/LOG:%TEMP%\ROBOCOPY.log

 REM
 REM Restore Startup
 REM
 if exist "%To%\Start" xcopy "%To%\Start" "%To%\%Directory%\Startup" %OPT% >nul
 if exist "%To%\Start" rd "%To%\Start" /S /Q
REM if exist "%To%\%Directory%\Startup\Microsoft Office Shortcut Bar.lnk" copy "%From%\%Directory%\Microsoft Office
Tools\Microsoft Office Shortcut Bar.lnk" "%To%\%Directory%\Startup\Microsoft Office.lnk"
REM if exist "%To%\%Directory%\Startup\Microsoft Office Shortcut Bar.lnk" del /Q "%To%\%Directory%\Startup\Microsoft
Office Shortcut Bar.lnk" >NUL

 REM
 REM Copy authorized shortcuts to user
 REM
 :auth
 xcopy "%From%\%Directory%" "%To%\%Directory%" %OPT% >nul

 REM
 REM Quick Launch Bar
 REM
 if not exist "%QLAUNCH%" md "%QLAUNCH%" >nul

 REM
 REM Desktop


8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                         21   Draft version
Update : X. van Bommel                                                           Date : 08.02.2012
                                                                    Square One bv : TS Installation

 REM
 if exist "%To%\Desktop\Connect to the Internet.lnk" del /Q "%To%\Desktop\Connect to the Internet.lnk" >NUL
 if exist "%To%\Desktop\Internet Explorer.lnk"      del /Q "%To%\Desktop\Internet Explorer.lnk"    >NUL
 if exist "%To%\Desktop\Outlook.lnk"              del /Q "%To%\Desktop\Outlook.lnk"            >NUL

 if exist "%To%\Desktop\Access.lnk"       del /Q "%To%\Desktop\Access.lnk"        >NUL
 if exist "%To%\Desktop\Excel.lnk"       del /Q "%To%\Desktop\Excel.lnk"        >NUL
 if exist "%To%\Desktop\Word.lnk"         del /Q "%To%\Desktop\Word.lnk"         >NUL
 if exist "%To%\Desktop\Bull.lnk"       del /Q "%To%\Desktop\Bull.lnk"       >NUL
 if exist "%To%\Desktop\Glink.lnk"       del /Q "%To%\Desktop\Glink.lnk"       >NUL
 if exist "%To%\Desktop\Powerpoint.lnk"     del /Q "%To%\Desktop\Powerpoint.lnk" >NUL
 if exist "%To%\Desktop\Publisher.lnk"     del /Q "%To%\Desktop\Publisher.lnk"    >NUL
 xcopy "%From%\Desktop" "%To%\Desktop" %OPT% >nul

  REM
  REM PrintHood
  REM
  :printhood
  del /F /S /Q "%To%\PrintHood\Lankhorst" >NUL
  xcopy "%PRINTHOOD%\Printhood" "%To%\PrintHood" %OPT%
goto end

:end


SYSTEM:\Admin\Logon\Outlook_Profile\Outlook.cmd.

;REM ***************
;REM * OUTLOOK.CMD *
;REM ***************

:begin
  set SYSTEM=%SystemDrive%
  set TSlogon=%SYSTEMDRIVE%\Admin\Logon

 set HOME=H:
 set Outlook=%HOME%\Prog\Outlook
 set AD_Outlook=%APPDATA%\Microsoft\Outlook

 if not exist "%AD_Outlook%"               md "%AD_Outlook%"
 if not exist "%Outlook%"                  md "%Outlook%"

 if not exist "%AD_Outlook%\OUTLOOK.PRF"           goto outlook
 goto end

:outlook
  xcopy "%TSlogon%\Outlook_Profile\OUTLOOK.PRF" "%AD_Outlook%" /C /Q /Y >nul
  %TSlogon%\KIX32.EXE %TSlogon%\Outlook_Profile\Outlook.kix
  START "Outlook Profile Builder" "%AD_Outlook%\outlook.prf"
  goto end

:end




8ab844b2-db8a-4b52-999c-ab7e9fbfa751.DOC                                        22   Draft version
Update : X. van Bommel                                                          Date : 08.02.2012

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:13
posted:2/8/2012
language:English
pages:22