Sunday, September 27, 2015

AppV5 - Sequencing Oracle 11g R2

Apparently this is a fun topic.  How do you sequence Oracle 11G R2 on AppV5?

I believe I have an answer.  In my attempts to sequence Oracle 11G on AppV5 I came across a few issues and have come up with solutions that work for various applications that rely on this tool.

The first issue:
Oracle 11G only allows paths without spaces and special characters.

On Windows systems, if the path to your Java installation includes a space character, you must provide the path in DOS 8.3 format, as shown in the previous example.

This *maybe* fixed now, but I experienced issues with trying to install Oracle 11g to the 8.3 folder structure to place it under "Program Files" or "Program Files (x86)".  The sequenced application would be broken.  This was a known/reported issue with AppV 5SP2 HF4 that was marked as 'fixed' by Microsoft for SP3+.  I have not had the ability to confirm that and will continue this post with what I know works...  I also believe that when expanded out it uses the full path with spaces as opposed to the 8.3 path.

Second Issue:
Installing Oracle 11G to the default 'recommended' directory will fail if you move your PackageInstallationRoot to a different drive.

This is because the second folder (apps - in this example) is not tokenized.  Forcing AppV5 to utilize the token "appvPackgeDrive" which can expand out differently then you expect, breaking the application.

Third Issue:
Cannot install to PVAD.

The reason I chose to NOT utilize PVAD is if you do then Oracle cannot be used in connection groups.

So how do you resolve all these issues and sequence Oracle 11G R2?

The direction I went was to ensure the directory I sequenced the installer to was a tokenized directory.  It also needed to a directory that, when expanded in the virtualized environment, does not contain any spaces or special characters.

The list of directories AppV5 tokenize's can be found in the AppV 5.0 Sequencing Guide.

I'll list them here:

Known Folder Token
Known Folder Path
AccountPictures
C:\Users\\AppData\Roaming\Microsoft\Windows\AccountPictures
Administrative Tools
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools
AppData
C:\Users\\AppData\Roaming
Application Shortcuts
C:\Users\\AppData\Local\Microsoft\Windows\Application Shortcuts
Cache
C:\Users\\AppData\Local\Microsoft\Windows\Temporary Internet Files
CD Burning
C:\Users\\AppData\Local\Microsoft\Windows\Burn\Burn
Common Administrative Tools
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
Common AppData
C:\ProgramData
Common Desktop
C:\Users\Public\Desktop
Common Documents
C:\Users\Public\Documents
Common Programs
C:\ProgramData\Microsoft\Windows\Start Menu\Programs
Common Start Menu
C:\ProgramData\Microsoft\Windows\Start Menu
Common Startup
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
Common Templates
C:\ProgramData\Microsoft\Windows\Templates
CommonDownloads
C:\Users\Public\Downloads
CommonMusic
C:\Users\Public\Music
CommonPictures
C:\Users\Public\Pictures
CommonRingtones
C:\ProgramData\Microsoft\Windows\Ringtones
CommonVideo
C:\Users\Public\Videos
Contacts
C:\Users\\Contacts
Cookies
C:\Users\\AppData\Roaming\Microsoft\Windows\Cookies
CredentialManager
C:\Users\\AppData\Roaming\Microsoft\Credentials
CryptoKeys
C:\Users\\AppData\Roaming\Microsoft\Crypto
Desktop
C:\Users\\Desktop
Device Metadata Store
C:\ProgramData\Microsoft\Windows\DeviceMetadataStore
DocumentsLibrary
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms
Downloads
C:\Users\\Downloads
DpapiKeys
C:\Users\\AppData\Roaming\Microsoft\Protect
Favorites
C:\Users\\Favorites
Fonts
C:\windows\Fonts
GameTasks
C:\Users\\AppData\Local\Microsoft\Windows\GameExplorer
History
C:\Users\\AppData\Local\Microsoft\Windows\History
ImplicitAppShortcuts
C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts
Libraries
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries
Links
C:\Users\\Links
Local AppData
C:\Users\\AppData\Local
LocalAppDataLow
C:\Users\\AppData\LocalLow
MusicLibrary
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries\Music.library-ms
My Music
C:\Users\\Music
My Pictures
C:\Users\\Pictures
My Video
C:\Users\\Videos
NetHood
C:\Users\\AppData\Roaming\Microsoft\Windows\Network Shortcuts
Personal
C:\Users\\Documents
PicturesLibrary
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries\Pictures.library-ms
Podcast Library
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries\Podcasts.library-ms
Podcasts
C:\Users\\Podcasts
PrintHood
C:\Users\\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
Profile
C:\Users\
ProgramFiles
C:\Program Files
ProgramFilesCommon
C:\Program Files\Common Files
ProgramFilesCommonX64
C:\Program Files\Common Files
ProgramFilesCommonX86
C:\Program Files (x86)\Common Files
ProgramFilesX64
C:\Program Files
ProgramFilesX86
C:\Program Files (x86)
Programs
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Public
C:\Users\Public
PublicAccountPictures
C:\Users\Public\AccountPictures
PublicGameTasks
C:\ProgramData\Microsoft\Windows\GameExplorer
PublicLibraries
C:\Users\Public\Libraries
Quick Launch
C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
Recent
C:\Users\\AppData\Roaming\Microsoft\Windows\Recent
RecordedTVLibrary
C:\Users\Public\Libraries\RecordedTV.library-ms
ResourceDir
C:\windows\resources
Ringtones
C:\Users\\AppData\Local\Microsoft\Windows\Ringtones
Roamed Tile Images
C:\Users\\AppData\Local\Microsoft\Windows\RoamedTileImages
Roaming Tiles
C:\Users\\AppData\Local\Microsoft\Windows\RoamingTiles
SavedGames
C:\Users\\Saved Games
Searches
C:\Users\\Searches
SendTo
C:\Users\\AppData\Roaming\Microsoft\Windows\SendTo
Start Menu
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu
Startup
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
System
C:\windows\system32
SystemCertificates
C:\Users\\AppData\Roaming\Microsoft\SystemCertificates
SystemX86
C:\windows\SysWOW64
Templates
C:\Users\\AppData\Roaming\Microsoft\Windows\Templates
User Pinned
C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned
UserProfiles
C:\Users
VideosLibrary
C:\Users\\AppData\Roaming\Microsoft\Windows\Libraries\Videos.library-ms
Windows
C:\windows
Custom Token
Custom Token Expansion
AppVAllUsersDir
C:\Users\All Users
AppVComputerName
-LT02
AppVCurrentUserSID
S-1-5-21-124525095-708259637-1543119021-705252
AppVEnvironmentVariableCommonProgramFiles
%commonprogramfiles%
AppVEnvironmentVariableProgramFiles
%ProgramFiles%
AppVPackageDrive
C:
AppVPackageRoot
C:\AppInstallFolder
AppVSystem32Catroot
C:\windows\system32\catroot
AppVSystem32Catroot2
C:\windows\system32\catroot2
AppVSystem32DriversEtc
C:\windows\system32\drivers\etc
AppVSystem32Driverstore
C:\windows\system32\driverstore
AppVSystem32Logfiles
C:\windows\system32\logfiles
AppVSystem32Spool
C:\windows\system32\spool

There are multiple directories we can choose.  I opted to use "Common AppData".  That means I will install the Oracle client here: "C:\ProgramData".  It does not contain a space, is tokenized, and when expanded will remain on the C:\ drive.  I created a 'response' file for the Oracle install. 


I called the script through this command:

And that's it!