Select Page

Contents

BDD

How to inject drivers into WinPE CD?

  1. Remote desktop to sfac-sms-tmk.sfac.auckland.ac.nz server and have the driver folder accessible from the server.
  2. Launch Deployment Workbench and right click on Out-of-Box Drivers ( Deployment Workbench > Distribution Share > Out-of-Box Drivers ) and then click on New to browse the driver source directory.
  3. When the drivers are added, it will appeared at the bottom of the Out-of-Box Drivers page after the page is reloaded.
  4. Go to Deployment Workbench > Deploy > Deployment Points . Right click on LAB and click on Update to update the WinPE iso and wim file in D:BDDDistributionBoot

How to edit sysprep.inf (Windows XP) or Unattend.xml (Windows Vista)?

There are several ways of modifying the Unattend.xml file. eg. Modifying that Unattend.xml file that is used by Create – Science Lab Vista.

  • Modify the Unattend.xml file through Deployment WorkBench on sfac-sms-tmk.sfac.auckland.ac.nz

Right click on Deployment WorkBench > Task Sequences > CRT-SFAC-LAB and then click on Properties

Under OS Info tab, click on Edit Unattend.xml to modify the file in XML editor

OR

Under Task Sequence tab, add Set Task Sequence Variable to Postinstall.
It has to be added before ZTIConfigure script get ran because ZTIConfigure script will update the Unattend.xml (Vista) or sysprep.inf (XP).

OR

Modify the sysprep.inf under C:sysprep folder for Windows XP
Modify the Unattend.xml under C:WindowsSystem32sysprep folder for Windows Vista

Content to be modified in sysprep file

Variables

DomainAdmin - pcadd
DomainAdminPassword
JoinDomain - sfac.auckland.ac.nz
MachineObjectOU - "OU=Incoming,OU=Computers,OU=sfac,DC=sfac,DC=auckland,DC=ac,DC=nz"

Packaging

Steps to package a software

  1. New software before packaged are currently stored in uoasms.uoa.auckland.ac.nzpackagesToDoPackages .
  2. Organise the software in <Company><Version>installer files .
  3. Create a file called install.cmd and package the software with the guidelines shown in Guidelines for Packaging Link
  4. When the software is tested and installed successfully by running install.cmd in command prompt of the windows XP and/or Vista machine, make them available in uoasms.uoa.auckland.ac.nzpackages with the folder structure shown in 2nd step.
  5. Add this package to SMS using SMS Administrator Console

Steps to add a package created through SMS Administrator Console

  1. Launch SMS Adminstrator Console
  2. Packages are categorised into Non-Site Licensed, Public, Site Licensed, Unsorted, UOA and Updates and are browsable under Systems Management Server > Site Database (UOA – The University of Auckland) > Packages
  3. Right click on one of the category (eg. Software – Public) then select New > Package.
  4. Fill in the fields in General tab accordingly (can refer to the folder structure of the software).
  5. Switch to Data Source tab and tick the “This package contains source files” checkbox.
  6. Click on Set… button under Data Source tab and select “Network path (UNC name)” radio button and enter the source directory of the software (eg uoasmspackages<software>).
  7. Now the final step is to click on Apply button then OK button to have this software added to SMS system.

Steps to update a package on distribution point(s)

If any changes are made to the Data Source eg. content of the script changed and file added/removed. Following steps will be required:

  1. Launch SMS Adminstrator Console
  2. Browse through Systems Management Server > Site Database (UOA – The University of Auckland) > Packages and right click on the package the files has changed on uoasms.uoa.auckland.ac.nzpackages<software>, then click on All Tasks > Update Distribution Points
  3. All distribution points of the package is distributed to will be updated (if might take some time to update).

Steps to advertise a package to a collection

  • Through custom developed webpage (easier)
  1. Launch a browser and type in http://uoasms.uoa.auckland.ac.nz/smsweb/admin
  2. Click on Manage the distribution of packages to distribution points
  3. Checked the checkbox in SFAC-SMS-TMK column for the package you want it to be distribution to the distribution point. (The reason choosing in SFAC-SMS-TMK column because we had BDD install on the server and we deploy image through this server using LiteTouchCD).
  4. After checked all the packages that will be used to advertise to a collection/collections later, click on Back in browser or enter http://uoasms.uoa.auckland.ac.nz/smsweb/admin/Assignments.aspx in the browser to start advertising programs to collections.

Select new image for a program will have the program advertise the collection, it will be included while deploying an image through LTI CD

Select mandatory for a program will have the program advertise the collection, it will install the software on the machine without prompting.

Select available for a program will have the program advertise the collection, it will prompt the user about the availability of the software and they can choose to install (useful for staff).

  • Through SMS Administrator Console
  1. Launch SMS Administrator Console
  2. Browse through Systems Management Server > Site Database (UOA – The University of Auckland) > Packages and right click on a package to advertise and click on All Tasks > Distribute Software.
  3. Select a distribution point (SFAC-SMS-TMK will be needed to deploying packages through LiteTouch CD) to distribute software.
  4. Walk through the wizard, then select a collection to advertise to.

Steps to delete an advertised package from a collection

  • Through custom developed webpage (easier if there is just a few (less than 5))
  1. Launch a browser and type in http://uoasms.uoa.auckland.ac.nz/smsweb/admin
  2. Click on Manage the assignment of packages to machines
  3. Select the empty dropdown menu for the program in the collection.
  • Through SMS Administrator Console (easier if there quite a few to delete)
  1. Launch SMS Administrator Console
  2. Browse through Systems Management Server > Site Database (UOA – The University of Auckland) > Advertisements, here is a list of all programs being advertised.
  3. Sort the advertisements by Collection.
  4. Right click on the advertisement in the collection and Click on Delete OR Select the advertisement and hit the Delete button on keyboard

Steps to change the priority of an advertisement

  1. After you advertise the package to the collection and would like to set the priority of the package
  2. Launch SMS Administrator Console
  3. Browse through Systems Management Server > Site Database (UOA – The University of Auckland) > Advertisements, here is a list of all programs being advertised.
  4. Sort the advertisements by Collection.
  5. Double click on the advertisement in the collection OR right click on the advertisement in the collection and then click on Properties.
  6. Under Schedule tab, set the Priority accordingly. eg by default all advertisements are set to Medium, manually set all shortcut to Low priority and manually set those advertisements that need to install first or require manual install to High priority.
  • Tips and tricks

Access uoasms database

  1. Remote desktop to winterm2.cs.auckland.ac.nz
  2. Launch SQL Server Management Studio (Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio)
  3. Set the value for Server type: Database Engine , Server name: uoasms.uoa.auckland.ac.nz , Authentication: Windows Authentication then click on Connect button.
  4. Browse into uoasms.uoa.auckland.ac.nz (SQL Server …) > Databases, select SMS_UOA and click on New Query on the menu and execute the query below by copy and paste in to the new query page.

Sett priority to low for all shortcut advertisement (Do this with CAUTION!)

Query:
UPDATE vAdvertisement
SET Priority=3
WHERE PkgProgram like '%shortcut%'

View all advertisements advertised to collection in order

Some definitions:
6.00.600 - value set in BDD (DeploymentWorkbench > Deploy > Deployment Points , right click on LAB and click on properties.
          Modify the value for OSVer variable under Rules tab for the collection) manually to represent Vista OS on the machine.
UOA00081 - represent Science labs collection


Query:
SELECT va.PackageID, va.ProgramName
FROM v_Advertisement va
    LEFT OUTER JOIN v_OS_Details vo
        on va.PackageID=vo.PackageID and va.ProgramName=vo.ProgramName
WHERE va.CollectionID = 'UOA00081'
    and (va.AssignedScheduleEnabled != 0 or va.AdvertFlags & 110010000 != 0)
    and ('6.00.600' between vo.MinVersion and vo.MaxVersion
        OR (vo.MinVersion is NULL and vo.MaxVersion is NULL))
ORDER BY va.Priority

Imaging

Final configuration before sysprep the machine

Before sysprep Windows Vista, configurations and software installation on first boot can be achieved by having SetupComplete.cmd script and other installers inside C:WindowsSetupScripts.

Currently temporary stored on uoasms.uoa.auckland.ac.nzPackagesToDoPackagesVistaFirstBoot

Current SetupComplete.cmd content

REM Disable sidebar
reg add "HKLMSoftwareMicrosoftWindowsCurrentVersionPoliciesWindowsSidebar" /v TurnOffSidebar /t REG_DWORD /d 1 /f

REM Turn off UAC Prompt for Admin Elevation
reg add "HKLMSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f

REM Add command prompt option to right click menu
reg add "HKCRFoldershellcmd" /ve /t REG_SZ /d "Open Command Prompt Here"
reg add "HKCRFoldershellcmdcommand" /ve /t REG_SZ /d "cmd.exe /s /k pushd "%V""

REM Set Users permissions on C: drive to READ only access - Fix the issue after sysprep
REM C:WindowsSystem32SetAcl.exe -on "C:" -ot file -actn ace -ace "n:Users;p:list_folder;m:set" -ace "n:Users;p:read_ex;m:set"

REM install OpenAFS
call "%~dp0installOpenAFS1.5.28install.cmd"
call "%~dp0installOpenAFS1.5.28installShortcut.cmd"

How to build a mandatory profile under Vista

Current method of creating the mandatory profile

if not exist "C:u_drive" (
	mkdir C:u_drive
)

REM copy the Default profile to ecprofile
xcopy C:UsersDefault C:u_driveecprofile.v2 /y /e /z /i
xcopy C:UsersDefaultNTUSER.DAT C:u_driveecprofile.v2 /y /z /i /h

pushd C:u_driveecprofile.v2

REM Rename ntuser.dat to ntuser.man
attrib -S -H NTUSER.DAT
ren NTUSER.DAT NTUSER.MAN
attrib +S +H NTUSER.MAN

popd

REM Give user full access to the ntuser hive
reg load HKUtmp C:u_driveecprofile.v2NTUSER.MAN
"%~dp0SetACL.exe" -on "HKUtmp" -ot reg -actn ace -ace "n:Users;p:full"
reg unload HKUtmp

Alternative way of creating a mandatory profile manually with all the settings covered on Vista

  1. Log on to a computer running Windows Vista with any domain admin/user or local admin/user account (Ideally using an user account, so any settings configured will be sure it works.).
  2. Configure user settings
  3. Log off the computer
  4. Log on to the machine using domain admin account.
  5. Click Start, right click on Computer, then click on Properties
  6. Click Advanced System Settings. Under Advanced tab, click on Settings button in User Profiles section
  7. Then click on Copy To button to copy the user profile that you use in step 1.
  8. Under Copy profile to section, Enter/browse the local directory (C:u_driveecprofile.v2) or network path to store mandatory profile
  9. Under Permitted to use section, click on Change. Change From this location: to local machine name and type Everyone in Enter the object name to select.
  10. Then click OK to start copying the profile.
  11. Select the domain user and click on Delete button to delete his/her profile, so next time when he/she login using EC domain, he/she will obtain a mandatory profile.
  12. Log off the machine and log on using domain administrator account to convert the roaming profile copied to mandatory.
  13. Click on Computer. Then click on Organize at the menu and then click on Folder and Search Options.
  14. Under View tab, Change the view option on the machine to Show hidden files and folders. Clear the Hide extensions for known file types and Hide protected operating system files check box.
  15. Rename NTUSER.DAT to NTUSER.MAN for the copied user profile.
  16. This mandatory profile needs to be on lab machines under U:ecprofile.v2 for EC users to get mandatory profile. By achieving this, mandatory user profile is copied to C:u_driveecprofile.v2 and startup script will use subst command to map U: drive to C:u_drive.

Example of mapping U drive to C:u_drive

cmd>subst U: C:u_drive

Inject Additional Drivers into Vista Operating System

pnputil can be used in Vista to inject more drivers into the operating system.

Share folder (sfac-sms-tmk.sfac.auckland.ac.nzDistribution$Out-of-Box Drivers) with all the drivers that is used to build WinPE bootable CD which can be used to inject the drivers into the OS. A script can be use to generate a list of folders with *.inf .

Microsoft PnP Utility
Usage:
------
pnputil.exe [-f | -i] [ -? | -a | -d | -e ] <INF name>
Examples:
pnputil.exe -a a:usbcamUSBCAM.INF      -> Add package specified by USBCAM.INF
pnputil.exe -a c:drivers*.inf          -> Add all packages in c:drivers
pnputil.exe -i -a a:usbcamUSBCAM.INF   -> Add and install driver package
pnputil.exe -e                           -> Enumerate all 3rd party packages
pnputil.exe -d oem0.inf                  -> Delete package oem0.inf
pnputil.exe -f -d oem0.inf               -> Force delete package oem0.inf
pnputil.exe -?                           -> This usage screen

Proposed script

REM map the distribution share to N drive
net use n: sfac-sms-tmk.sfac.auckland.ac.nzDistribution$ /user:sfac<username>
<password>

REM add driver package

<Fill in all the drivers to add>

REM Partial network section:
pnputil -a "N:Out-of-Box DriversNetw70n5 1.2.0.56*.inf"
pnputil -a "N:Out-of-Box DriversNetyk60x8 10.12.7.3*.inf"
pnputil -a "N:Out-of-Box DriversNetyk51x8 10.12.7.3*.inf"
...

REM add and install driver package (can be use for usb camera)
REM pnputil.exe -i -a a:usbcamUSBCAM.INF

net use N: /detele
<yes>

XP Sysprep

Store the sysprep.inf and sysprep.exe in C:sysprep directory and sysprep the machine by running the command below:
C:sysprepsysprep.exe -reseal -quiet -mini -forceshutdown

Vista Sysprep

C:WindowsSystem32sysprepsysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:WindowsSystem32sysprepunattend.xml

Capture image

Boot up the machine using System Rescue Disk or GParted or Ubuntu 8.10 Live CD to shrink the windows partition using gparted. Then use ntfsclone to capture the windows image with the command below:

ntfsclone gzip

Clone the image straight to server
ntfsclone -f -s -o - /dev/sda1 | gzip -1c | ssh xxx-admin@image-04.sfac.auckland.ac.nz "dd of=/var/lib/imaging/images/master-vista-`date +%Y%m%d`.img.gz"

OR

After resize the disk and create the second partition to store the image on the disk then scp to server
fsck.ext3 /dev/sda2
mount /dev/sda2 /mnt
ntfsclone -f -s -o - /dev/sda1 | gzip -1c > /mnt/master-vista-`date +%Y%m%d`.img.gz
scp the image to server

OR

#On image-04:
#Add the master-image machine to /etc/exports
#/var/lib/imaging/images 130.216.XXX.XXX (rw,no_root_squash)
#exportfs -a

On image-dist01.sit:
vi /etc/exports
/mnt/images/www/lab-images 130.216.XXX.XXX (rw,no_root_squash)
/etc/init.d/unfs3 reload


On master-image machine:
mount /dev/sda2 /mnt
-------------------------------------------------------------------------------------------------------------------------
ntfsclone -f -s -o - /dev/sda1 | gzip -1c > /mnt/master-vista-`date +%Y%m%d`.img.gz
OR
ntfsclone -f -s -o master-vista-`date +%Y%m%d`.img /dev/sda1
gzip --verbose master-vista-`date +%Y%m%d`.img
-------------------------------------------------------------------------------------------------------------------------

apt-get install nfs-client
mkdir /nfs
#mount -t nfs image-04.sfac.auckland.ac.nz:/var/lib/imaging/images /nfs
mount -t nfs image-dist01.sit.auckland.ac.nz:/mnt/images/www/lab-images /nfs
rsync -a --progress /mnt/master-vista-`date +%Y%m%d`.img.gz /nfs

ntfsclone bzip

ntfsclone -f -s -o - /dev/sda1 | bzip2 -1c | ssh xxx-admin@image-04.sfac.auckland.ac.nz "dd of=/var/lib/imaging/images/master-vista-`date +%Y%m%d`.img.bz2"

OR

After resize the disk and create the second partition to store the image on the disk then scp to server
fsck.ext3 /dev/sda2
mount /dev/sda2 /mnt
ntfsclone -f -s -o - /dev/sda1 | bzip2 -1c > /mnt/master-vista-`date +%Y%m%d`.img.bz2’
scp to server

Create an entry in images table which is available on cs-db.cs.auckland.ac.nz server under imaging database.

mysql> desc images;
+-------------------+--------------+------+-----+---------+----------------+
| Field             | Type         | Null | Key | Default | Extra          |
+-------------------+--------------+------+-----+---------+----------------+
| id                | int(11)      |      | PRI | NULL    | auto_increment |
| name              | varchar(255) | YES  |     | NULL    |                |
| partition_format  | varchar(255) | YES  |     | NULL    |                |
| partition_size_mb | int(11)      | YES  |     | NULL    |                |
| file              | varchar(255) | YES  |     | NULL    |                |
| format            | varchar(255) | YES  |     | NULL    |                |
| encoding          | varchar(255) | YES  |     | raw     |                |
| size_mb           | int(11)      | YES  |     | NULL    |                |
+-------------------+--------------+------+-----+---------+----------------+

Insert XP image to the images table

gzip

mysql>insert into images set name="Windows XP Lab Image-20080114", partition_format="ntfs-xp", partition_size_mb="30000", file="master-vista-20080114.img.gz", format="raw", encoding="gzip";

OR

bzip2

mysql>insert into images set name="Windows XP Lab Image-20080115", partition_format="ntfs-xp", partition_size_mb="30000", file="master-vista-20080115.img.bz2", format="raw", encoding="bzip2";

Insert Vista image to the images table

gzip

mysql>insert into images set name="Windows Vista Lab Image-20080114", partition_format="ntfs-vista", partition_size_mb="30000", file="master-vista-20080114.img.gz", format="raw", encoding="gzip";

OR

bzip2

mysql>insert into images set name="Windows Vista Lab Image-20080115", partition_format="ntfs-vista", partition_size_mb="30000", file="master-vista-20080115.img.bz2", format="raw", encoding="bzip2";

Additional Information

Available on hosts: sfac-sms-tmk.sfac.auckland.ac.nz , winterm2.cs.auckland.ac.nz, uoasms.uoa.auckland.ac.nz

Authenticate using SFAC credential.

Accessing BDD

Start > All Programs > Microsoft Deployment Toolkit > Deployment Workbench

Accessing SMS Administrator Console

Start > All Programs > Systems Management Server > SMS Administrator Console

Plans for Sems 1 2008

  • Prepare image for Computer Science, Software Engineering, Math, Stats, Tamaki Labs, Physics, SBS and Psychology

To Do List

Packaging issues:

Computer Science

  • WinPCap (manual install)
  • Cygwin (manual install)
  • Netbean 6 incl. Ruby support (No silent flag found, manual install required, need to be packaged and added to SMS admin console)
  • CamStudio2.0 (cannot silent install, manual install required)
  • SICStus Prolog version 4 ( need to get the licensed copy from Peter)
  • WinDump + WinPCap (Add windump bin folder to path and need to fix the error – windump: PacketGetAdapterNames: The data area passed to a system call is too small. (122)) – (Potential solution to overcome the error message: run the program under admin account once then users should be able to use it.)
  • Wireshark (not appeared on the machine?)
  • Emacs (store user profile on H drive?)

Software Engineering

  • Selenium – Firefox plugin (required manual install)
  • Matlab 2007b (Need to get a copy or license.dat from Ivor (Engineering IT Manager))
  • EndNote X1.0.1 (Require packaging)
  • Morae update patches for 2.0.2?

Math

Stats

  • Xemacs – with AUCTex and ESS (no need any more)

Tamaki Labs

  • nVivo 7 (not vista compatiable)
  • Adoe Master Collection CS3 (don’t have license to install on science lab)
  • DjVu (require packaging)
  • ExpressView plugin (require packaging)
  • SwapMouseButton (require packaging)
  • Roxio Creator Plus (need to get a copy of the software and it is only licensed for HP machines)

Physics

  • Matlab 2007a (Need to upgrade to version 2007b which other Maths and Engineering will be using)

SBS

  • SAS JMP (required new license.dat file for JMP7.01 and required packaging)
  • sbs-print.ec.auckland.ac.nz – suit C4500N and HP4000 (requires printer driver and create a program in printer package)

Psychology

  • E-prime (Need to get the installer CD and dongle from Dylan and try installing it on Vista (might not work as it is for XP))

Chemistry

  • Discoverygate Gateway (requires newer version to be released which runs on Java 1.6 environment.)

SGGES

  • Limited licensed software for concurrent usage

Imaging Configurations

  • Change the Vista OS to best performance and XP look
  1. Right click on Computer, then click on Advanced system settings . Under Advanced tab, click on Settings… in Performance section. Then select Adjust for best performance under Visual Effects and click on OK button to apply the changes.
  2. Right click on taskbar and click on Properties. Under Start Menu tab, select Classic Start menu radio button to have XP appearance. Then click on Customize… button and tick Display log off to enable logoff button in start menu.
  • User profile – having VS2005/2008, firefox, eclipse, cygwin and other software’s user profile redirect to H drive, new user popup dialog removed through first click on the software through the same user profile.
  • Tidy up and apply Vista group policies currently available in Test ou in SFAC AD currently.
  • Build and add Remboot.exe to C:WindowsSystem32 to allow remote booting the machine (for imaging purpose)
  • Maybe having different settings in grub for default boot set to linux for left hand side of GCL
  • Find out all the different model machines with drivers that are used in SBS, Physics and Psychology, then add the drivers to Out-Of-Box drivers through BDD.
  • Fix the ldapdelete command in deploy.rhtml, it is still broken.
  • Change the default language on the machine to English manually.
  • Currently, it will install city printer and set it to default. Will need to include tamaki printer, sbs printer, physics? and psychology printer driver into the image manually.
  • Finish the rest of the packaging and fix those that had issues list in packaging issues section.

Future improvements

http://uoasms.uoa.auckland.ac.nz/smsweb/admin/Distribution.aspx to allow more than one dropdown menu selection for the programs before the page refreshes.

Skip to toolbar