OCS Deployment Tips and tricks

Saturday 29 July 2006

Latest addition: Thursday 13 September 2007

Web link: OCS Inventory Package deployment


Prior to using the following info for creating own-made packages, let’s test if everything is working fine.

I’ve created a NSIS script that writes into registry in a key called HKLM\SOFTWARE\OCS and puts a key named “cert” with value “creilla”.

If we create a package with action “LAUNCH”, and attach the regcert.zip with command to execute “regcert.exe”, all clients with functional package deployment, will add that key to registry, so we can check, using OCS registry query function for a key named “cert” into: HKLM \SOFTWARE\OCS.

After some time, affected and with working software deployment (Read OCS Inventory Package deployment to learn how to setup it properly), we could know in which ones it’s working and in which ones it doesn’t work, just doing a search for computers with a special value in that registry key. (I’ve also uploaded the precompiled version I use for your testing purpouses).

Software

Software Command switches Result
OCS Inventory /S /SERVER:serverip Installs new OCS version on top of older one, this is only recommended if package deployment was setup successfully, if not, use NSIS script referred at OCS Inventory Package Deployment
VNC /SP- /VERYSILENT Installs VNC without any user intervention
PowerOff Just copy to desired folder Allows to shutdown, reboot hibernate, etc remotely or from command line
EICAR Copy and run from any folder This file is detected by antivirus as a virus, but it isn’t harmful (read http://www.eicar.org), if execution fails... target computer has a working antivirus engine running
Firefox -ms -ira Installs Mozilla Firefox silently (with 1.5 it show uncompressing dialog, but with 2b2 it’s totally invisible)
Java /S /v/qn" WEBSTARTICON=0 REBOOT=Suppress MOZILLA=1 IEXPLORER=1" Installs Java Runtime Environment (tested on 1.5.0.0.6) silently, totally invisible
Acrobat Reader msiexec.exe /i acrobat.msi /qb-! Silent install, must first uncompress installation and copy extracted files to a folder, zip them, and upload to OCS (you can extract Acrobat components doing: AdbeRdr80.exe -nos_s -nos_ne -nos_oC:\temp)
Flash Player msiexec /i fp9.msi /qn Silent install using windows installer interface (it’s ok for other programs distributed in msi files

Registry

HivePathValueUtility
HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Run * Know which programs are executed at startup
HKCU SOFTWARE\Microsoft\Windows\CurrentVersion\Run * Know which programs are executed at user login
HKLM SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx szVirDefDate Know Mcafee Virus Definitions date
HKLM Software\Symantec\SharedDefs * Shows different norton products definitions
HKLM Software\Microsoft\Windows\CurrentVersion ProductKey Windows 9x Install key
HKLM Software\Microsoft\Windows\CurrentVersion\RunServices * Services in the machine
HKLM Software\Microsoft\Windows\CurrentVersion\RunServices * Windows 9x Services
HKLM Software\OCS cert Allows us to check if package deployment is working using regcert example

Packages

ActionFileCommand lineDescription
RUN "%PROGRAMFILES%\RealVNC\VNC4\winvnc4.exe" -connect HOST Launches a new VNC client to HOST, allowing to watch Desktop as HOST initiated the connection
RUN netsh firewall add portopening TCP 5900 VNC Opens 5900 port on TCP in Windows Firewall (XP SP2) (for using with VNC)

Please, feel free to contribute with your Registry Keys or command line commands to improve this guide.

Using win-get (an apt-get clone for Win32), you can use this big list of supported applications for installation doing win-get sinstall APPNAME