Windows Tech Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, 6 February 2012

A Basic Package Scripting Exercise

Posted on 16:30 by Unknown
The following is an excerpt from a screening exercise we use to evaluate potential candidates for positions involving software repackaging and deployment.  There's much more to the screening and evaluation, so this is just a sampling.  After looking it over, read my comment at the end.


BEGIN


Exercise 1 - Installation

Create a script (using template A, below) to install a product named "Fubar 2012" using the vendor-provided "fubar12.msi" file.  This installation will be deployed with Configuration Manager 2007, which will use the local SYSTEM account to perform all tasks, unattended, regardless of a (human) user being logged on or not.

Your script will need to perform the following tasks:

  • The installation needs to specify the USERNAME property as "IT Services" and the COMPANYNAME property as "Contoso Corporation" during the installation.
  • The .MSI installation should create a log file named "cvb_fubar2012.log" in the TEMP folder.  It is important to NOT hard-code the path to the "temp" folder, but use a Windows environment variable instead.
  • After the .MSI installation, the script needs to copy a shortcut file named "Fubar 2012.lnk" from the script source directory down to the "All Users" Start Menu, under "Programs\Fubar 2012".  Keep in mind that this will need to work for Windows XP and Windows 7 installations.
  • Download a license file named "license.dat" from the script source directory into the application installation folder:   "%ProgramFiles%\Fubar 2012\bin"
  • Create a new Registry value under the application registry key path: HKLM\SOFTWARE\FUBAR\2012\Options, named "CheckForUpdates", with a REG_DWORD value of 0 (zero).
  • Adjust folder permissions on the installation folder: "C:\Program Files\Fubar 2012" to allow members of the group "Contoso\Domain Users" to have "Change" (modify) permissions

Important:  Remember that when deploying scripts and packages with products like Configuration Manager, you cannot be certain as to where the package will be deployed from.  The deployment system manages the distribution of packages to a network of "Distribution Point" servers.  Therefore, it is important that you never assume the script source path, but use a self-referencing path variable instead, such as "%~dp0" or "%~dps0", etc.

Exercise 2 - Uninstall

You will use a separate script (using template B, below) to uninstall Fubar 2012.   After inspecting the Registry, you determine that the application stores the uninstall reference under the GUID:  {00001111-3ABC-DEFG-1234-0123456789AB}

Your script will need to perform the following tasks:

  • Execute a silent uninstall of the .MSI package using the GUID (above), making sure to suppress a restart afterwards
  • Handle the scenario when script is run on a client that does not have the application installed (exit / abort gracefully)
  • Remove leftover folder and files: "C:\Program Files\Fubar 2012"
  • Remove leftover registry keys: "HKLM\SOFTWARE\Fubar"
  • Remove the Start Menu shortcut and the sub-folder it was added to (for Windows XP and Windows 7 installations)

Comment:

After fielding this to a long list of candidates, so far, not one has passed with flying colors.  Not one.  This is considered by most packagers to be a "basic level" test.  The best we've come to expect is determining how close to "correct" each candidate is and use that to determine how much (if any) training is required to close the gaps in their skills.

I have to say I'm extremely disappointed in the results our search for candidates within the United States.  We have listings on multiple services, web sites, Facebook, Google+ and Twitter and applicants are just not there.  If the job didn't require on site working in Virginia we'd focus on searching overseas.  I'm still holding out hope.

The other parts we evaluate include working with AdminStudio, InstallShield, troubleshooting file and folder permissions, registry permissions, managing services and processes, user context issues, System Center Configuration Manager (packages, programs, advertisements, collections, status monitoring, troubleshooting, client management, etc.).  After this we evaluate the candidate based on communication skills, professional attitude, courtesy, and so on.  If they don't root for one of our favorite football teams they're definitely eliminated (just kidding).

Template A

@echo off
rem ****************************************************************
rem Filename..: install.cmd
rem Author....: (replace with your name)
rem Date......: 01/18/2011
rem Purpose...: install application name
rem ****************************************************************
CLS
SETLOCAL
SET APPNAME=ApplicationName
SET LOG=%TMP%\CVB_%APPNAME%_install.log
echo %DATE% %TIME% installing... %APPNAME%... >%LOG%
echo %DATE% %TIME% source....... %~dp0 >>%LOG%
echo %DATE% %TIME% target....... %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% windir....... %WINDIR% >>%LOG%
echo %DATE% %TIME% progfiles.... %PROGRAMFILES% >>%LOG%
echo %DATE% %TIME% temp......... %TMP% >>%LOG%
echo ----------------------------------------------- >>%LOG%
rem perform MSI installation here
rem echo result to log file
rem handle failure of MSI installation here (exit/abort)
rem copy shortcut file to start menu
rem copy license data file
rem create registry value
rem echo result to log file
rem adjust folder permissions
echo ----------------------------------------------- >>%LOG%
rem echo exit code to log file
ENDLOCAL
rem return final exit code here

Template B

@echo off
rem ****************************************************************
rem Filename..: uninstall.cmd
rem Author....: (replace with your name)
rem Date......: 01/18/2011
rem Purpose...: uninstall application name
rem ****************************************************************
CLS
SETLOCAL
SET APPNAME=ApplicationName
SET LOG=%TMP%\CVB_%APPNAME%_uninstall.log
echo %DATE% %TIME% installing... %APPNAME%... >%LOG%
echo %DATE% %TIME% source....... %~dp0 >>%LOG%
echo %DATE% %TIME% target....... %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% windir....... %WINDIR% >>%LOG%
echo %DATE% %TIME% progfiles.... %PROGRAMFILES% >>%LOG%
echo %DATE% %TIME% temp......... %TMP% >>%LOG%
echo ----------------------------------------------- >>%LOG%
rem perform MSI uninstall here
rem echo result to log file
rem handle failure of MSI installation here (exit/abort)
rem remove shortcut file and app folder from start menu
rem check for leftover files and folders, remove them if found
rem remove leftover registry key path
rem echo result to log file
echo ----------------------------------------------- >>%LOG%
rem echo exit code to log file
ENDLOCAL
rem return final exit code here
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in config manager, employment, installshield, packaging, scripting, software packaging | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Voting Time: Help Me Out?
    I need to get a better view of how I should manage this blog if I'm going to keep at it. I'd like to know how you typically discover...
  • A World Without Competition
    Try to imagine what things would be like today had there not been fierce competition in certain key parts of our world.  I’ll give you some ...
  • Book Update
    I posted some gibberish a few weeks ago about another book project.  Well, I'm getting close to wrapping it up, so I thought I'd go ...
  • Cost
    Software technology, like any technology, provides a means to solving problems.  Some big. Some small.  Some that help.  Some that hurt.  An...
  • Windows 7: Default User vs All Users
    A lot of confusion seems to occur with understanding the difference between the "Default User" profile, and the "All Users...
  • Time to Give Props
    With the ever-expanding volume and breadth of information on the Internet today, it's easy to focus on my own thoughts, experiences, ide...
  • Table of Contents (Preliminary)
    Here's the preliminary Table of Contents for my new book "The AutoCAD Network Administrator's Bible - 2013 Edition".  I...
  • The Nicest IT and IT Vendor Folks I Know
    I've ranted many times before how it's unfair to "hate" an entire company, without providing a rationale for it based on s...
  • Windows 8
    Two small, yet irritating things, that I hope Windows 8 addresses with respect to Windows 7: Being able to put the Recycle Bin in the S...
  • Stupid Assumptions
    After years of watching sci-fi TV shows, movies, etc. it's finally come to a point where even the so-called brightest of our authors and...

Categories

  • a
  • activation
  • active directory
  • advertising
  • agile
  • agility
  • amazon
  • american
  • apple
  • application virtualization
  • applications
  • art
  • articles
  • asp
  • augi
  • authors
  • autocad
  • AutoCAD Autodesk
  • autodesk
  • autolisp
  • automation
  • automotive
  • backups
  • batch
  • beer
  • beta
  • blackberry
  • blogs
  • bongloads
  • book
  • books
  • Books writing kindle amazon technology business projects
  • browsers
  • business
  • cad
  • career
  • certification
  • chrome
  • city government
  • civilization
  • cloud services
  • cmd
  • cmmi
  • comedy
  • command
  • community
  • computers
  • conferences
  • config manager
  • consultants
  • consulting
  • contracting
  • cranium drainium
  • crapware
  • culture
  • data center
  • data mining
  • databases
  • deployment
  • directx
  • DLL
  • domains
  • dumb
  • earth
  • economy
  • editor
  • education
  • election
  • elections
  • employment
  • engineering
  • entertainment
  • environment
  • error monitoring
  • events
  • exchange
  • facebook
  • family
  • firefox
  • flexnet
  • fud
  • fun
  • funny
  • games
  • gary vaynerchuk
  • gmail
  • google
  • government
  • group policy
  • hampton roads
  • health
  • history
  • holidays
  • home
  • html5
  • humor
  • hyper-v
  • iis
  • industry
  • infrastructure
  • installation
  • installshield
  • internet
  • internet explorer
  • interviews
  • jobs
  • jtbworld
  • kindle
  • kixtart
  • lab setup
  • languages
  • ldap
  • learning
  • legal
  • licensing
  • life
  • lifecycle
  • linux
  • lisp
  • logging
  • management
  • manufacturing
  • marketing
  • markets
  • mdop
  • mdt
  • medical
  • messaging
  • microsoft
  • microsoft access
  • military
  • mountains
  • movies
  • mozilla
  • music
  • nature
  • network administration
  • news
  • nook
  • nothing
  • office
  • open source
  • openoffice
  • opera
  • operating systems
  • oracle
  • osx
  • packaging
  • patches
  • people
  • photos
  • podcasts
  • policy
  • politics
  • powershell
  • predictions
  • process automation
  • products
  • programming
  • projects
  • psychology
  • publishing
  • rail
  • reading
  • registry
  • religion
  • reporting
  • reviews
  • rsat
  • rss
  • safari
  • safety
  • sales
  • satire
  • sccm
  • scheduling
  • science
  • scripting
  • search
  • security
  • servers
  • services
  • sharepoint
  • shopping
  • sms
  • social stuff
  • society
  • softgrid
  • software assurance
  • software deployment
  • software development
  • software packaging
  • sony
  • speaking
  • sports
  • sql express
  • sql server
  • statistics
  • Statistics news marketing
  • steve jobs
  • stories
  • stuff
  • stupidity
  • symantec
  • sysinternals
  • system center
  • systems architecture
  • t-sql
  • taxes
  • technet
  • technical support
  • technology
  • TED
  • ted talks
  • testing
  • textpad
  • thoughts
  • traffic
  • training
  • transportation
  • travel
  • troubleshooting
  • tutorials
  • twitter
  • ubuntu
  • unattend
  • unemployment
  • updates
  • upfront ezine
  • utilities
  • vacation
  • vba
  • vbscript
  • video
  • virginia
  • virginia beach
  • virtualization
  • visual lisp
  • vmware
  • vmware server
  • voting
  • war
  • weather
  • web
  • web browsers
  • web development
  • web sites
  • windows
  • windows 7
  • windows live
  • windows server
  • windows server 2012
  • windows8
  • winpe
  • wise
  • wmi
  • work
  • writing
  • ws08
  • wsus
  • wwa
  • x64
  • xml
  • ze frank

Blog Archive

  • ►  2013 (37)
    • ►  October (1)
    • ►  September (5)
    • ►  August (8)
    • ►  July (2)
    • ►  June (4)
    • ►  May (4)
    • ►  April (2)
    • ►  March (2)
    • ►  February (8)
    • ►  January (1)
  • ▼  2012 (120)
    • ►  December (14)
    • ►  November (12)
    • ►  October (10)
    • ►  September (7)
    • ►  August (3)
    • ►  July (2)
    • ►  June (6)
    • ►  May (6)
    • ►  April (20)
    • ►  March (16)
    • ▼  February (18)
      • Cost
      • Making a Poor Man's Web Service
      • Gazoline or Vazoline
      • Software Repackaging: Why Bother?
      • Autodesk Revit 2012 and Configuration Manager 2007...
      • Voting Time: Help Me Out?
      • A Missing Link of Software Life-cycle Management, ...
      • Rant No. 42
      • Time to Give Props
      • The Next Milestone
      • Choosing the Right Data Repository
      • Software Deployment Basic Basics: Uninstalls
      • Repackaging Quiz
      • Blog Status Update
      • A Basic Package Scripting Exercise
      • Amazon vs Nook vs Me
      • Repackaging: Application Deployment Types
      • Book Sales Update / What Readers Want
    • ►  January (6)
  • ►  2011 (343)
    • ►  December (15)
    • ►  November (23)
    • ►  October (27)
    • ►  September (35)
    • ►  August (29)
    • ►  July (17)
    • ►  June (23)
    • ►  May (20)
    • ►  April (38)
    • ►  March (61)
    • ►  February (54)
    • ►  January (1)
Powered by Blogger.

About Me

Unknown
View my complete profile