Client install tips and tricks

Hopefully none of the Epicor people take offense to this, but the client install process in my environment is terrible. I’m constantly hit with permissions errors, missing .bat file errors, file already exists errors. Maybe my deployment shares are setup wrong, or maybe my admins don’t have the right permissions. After another frustrating day updating 2 clients per hour from 10.1.500 to 10.2.200 I’m throwing in the towel and begging for help. What is the secret to making the install/upgrade process painless? How do I get out of the 2 step install of creating the desktop icons then running the autoupdate util? Surely one of you has figured out how to deploy this with PDQ or through group policy or even with a bat file?

Thanks in advance
Matt

1 Like

It is as easy as installing the client in one workstation, zipping up that bad boy and deploying it around with your favorite deployment package.
Make sure the folder you end up putting it in has Read / Write for all so that when the next update is release the autoupdate works fine.
Obviously all users need rights to your \epicor\EpicorVXXX.101011Deployemnt share so that updates can be installed. But there isn’t a ton of other complexity there

1 Like

Now all I need to do is get it to install cleanly on one so I feel comfortable duplicating it :smiley:

1 Like

Work was also done in 10.1.600 and improved in 10.2.100 to install the client without requiring that the user has Admin Rights on the machine. There are a few caveats to this new functionality - for example, you have to be on a new version before you get the full newer behavior (the old Epicor.exe installs AutoUpdate.exe which then installs the new Epicor.exe) and the installation location has to be out from under the Windows Managed directories. Also, part of the new functionality is to tell you why we need Admin Rights (if we determine that we do) so you have an idea of what needs to be changed.

1 Like

We use a vbs file deployed via GPO on login. It can be run ad hoc as well. It essentially copies the zips from the server, creates the local dir if it doesn’t exist, and unpacks them and places icons on their desktop.
It’s been pretty painless.

1 Like

Would you be willing to share?

Sure.
Mi code es su code. (Or somethin’…)
You’ll have to modify server names and locations to your needs.

***Edit: The ‘Purpose’ section is a bit dated. There’s no CheckUpdateVsn block. That used to be when we ran it as a batch file.

  ' ========================================================================
  ' Author:  Hannah Willett
  ' Date:    08/18/2018
  ' Version: 10.2.200.11
  '
  ' Purpose: This script is used to install or update Domain Users' Epicor
  '          10.2 clients. Can be run using Group Policy at logon. The
  '          current version will check for the presence of a text file
  '          called 10.2.200.0.txt. Subsequent updates that don't use Epicor
  '          AutoUpdate will require the check of a new file that needs to
  '          be placed at \\<YourServer>\ERP10.2.200.0Deployment\Client\config
  '          and the CheckUpdateVsn block will need to be updated with the
  '          new patch level. Patches are cumulative, so the old can be
  '          overwritten. 
  ' ========================================================================

  ' Locations 
  ExtractTo = "C:\Epicor\ERP10.2Client\Client\"
  RootFolder = "C:\Epicor\ERP10.2Client"
  OldClient = "C:\Epicor\ERP10.1Client"
  Old102Client = "C:\Epicor\ERP10.2Client_OLD"
  ConfigFolder = "C:\Epicor\ERP10.2Client\Client\Config\"
  CheckFile = "C:\Epicor\ERP10.2Client\Client\config\10.2.200.0.txt"

  ' Files to unzip
  ClientFilesZip = "\\<YourServer>\ERP10.2.200.0Deployment\ReleaseClient.Zip"
  LocalClientFilesZip = "C:\Epicor\ERP10.2Client\Client\ReleaseClient.Zip"

  UpdateZip = "\\<YourServer>\ERP10.2.200.0Deployment\Custom\Client\Update\ERP10.2.200.11.zip"
  LocalUpdateZip = "C:\Epicor\ERP10.2Client\Client\ERP10.2.200.11.zip"

  DocSenderZip = "\\<YourServer>\ERP10.2.200.0Deployment\Custom\Client\DocumentSender\DocumentSender.zip"
  LocalDocSenderZip = "C:\Epicor\ERP10.2Client\Client\DocumentSender.zip"

  UserProcZip = "\\<YourServer>\ERP10.2.200.0Deployment\Custom\Client\User Process Scheduler\User Process Scheduler.zip"
  LocalUserProcZip = "C:\Epicor\ERP10.2Client\Client\User Process Scheduler.zip"

  HandheldZip = "\\<YourServer>\ERP10.2.200.0Deployment\Custom\Client\Handheld\Handheld.zip"
  LocalHandheldZip = "C:\Epicor\ERP10.2Client\Client\Handheld.zip"

  ' Icons and Config Files
  Icons = "\\<YourServer>\ERP10.2.200.0Deployment\Icons\*.*"
  ConfigFiles = "\\isimke\Epicor\Installers\E10.2\*.sysconfig"

  ' Local Desktop Variables
  Set WshShell = WScript.CreateObject("WScript.Shell")
  Set WshMyEnv = WshShell.Environment("PROCESS")
  userprof = WshMyEnv("userprofile")
  UserFolder = userprof & "\Desktop\"

  ' -----------------------------------------------------------------------
  ' Copys the old directory to a new folder called OLD and creates a 
  ' fresh directory
  ' -----------------------------------------------------------------------
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set objShell = CreateObject("Shell.Application")

  If( Not fso.FileExists(CheckFile) )Then
     ' -----------------------------------------------------------------------
     ' Delete Old Icons
     ' -----------------------------------------------------------------------
     Set objFolder = fso.GetFolder(UserFolder)
     Set colFiles = objFolder.Files
     On Error Resume Next
     For  Each objFile in colFiles
        If( instr(ucase(objFile.Name),"TEST") <> 0 )Then
           fso.DeleteFile UserFolder & "*TEST*.lnk"
        ElseIf( instr(ucase(objFile.Name),"LIVE") <> 0 )Then
           fso.DeleteFile UserFolder & "*LIVE*.lnk"
        ElseIf( instr(ucase(objFile.Name),"PILOT") <> 0 )Then   
           fso.DeleteFile UserFolder & "*PILOT*.lnk"
        ElseIf( instr(ucase(objFile.Name),"EPICOR") <> 0 )Then
           fso.DeleteFile UserFolder & "*EPICOR*.lnk"
        End If
     Next


     ' Delete 10.1 Client
     If fso.FolderExists(OldClient) Then 
        fso.DeleteFolder OldClient
     End If
     'Delete 10.2 Old Client
     If fso.FolderExists(Old102Client) Then 
        fso.DeleteFolder OldClient
     End If
     If fso.FolderExists(ExtractTo) Then  
        fso.MoveFolder RootFolder, OldClient
     End If
     
     On error goto 0

     folders = Split(ExtractTo, "\")
     For i = 0 To UBound(folders)
        fname = fso.BuildPath(fname, folders(i))
        If fso.FolderExists(fname) Then  
           Set objFolder = fso.GetFolder(fName)
        Else
           Set objFolder = fso.CreateFolder(fname)
        End If
     Next


     ' -----------------------------------------------------------------------
     ' Base 10.2.200.0 Client folder, Document Sender, Icons, and SysConfig
     ' -----------------------------------------------------------------------
     'fso.CopyFile ClientFilesZip, ExtractTo, True
     objShell.NameSpace(ExtractTo).CopyHere ClientFilesZip, 16
     objShell.NameSpace(ExtractTo).CopyHere UpdateZip, 16
     objShell.NameSpace(ExtractTo).CopyHere DocSenderZip, 16
     objShell.NameSpace(ExtractTo).CopyHere UserProcZip, 16
     objShell.NameSpace(ExtractTo).CopyHere HandheldZip, 16

     ' -----------------------------------------------------------------------
     ' Unzip Files
     ' -----------------------------------------------------------------------
     ' Unzip Local Client Files
     If fso.FileExists(LocalClientFilesZip) Then
        Set FilesInZip=objShell.NameSpace(LocalClientFilesZip).Items()
        objShell.NameSpace(ExtractTo).CopyHere FilesInZip, 16
        fso.DeleteFile LocalClientFilesZip
     End If

     ' Unzip Update Files
     If fso.FileExists(LocalUpdateZip) Then
        Set FilesInZip=objShell.NameSpace(LocalUpdateZip).Items()
        objShell.NameSpace(ExtractTo).CopyHere FilesInZip, 16
        fso.DeleteFile LocalUpdateZip
     End If

     ' Unzip Local DocSender Files
     If fso.FileExists(LocalDocSenderZip) Then
        Set FilesInZip=objShell.NameSpace(LocalDocSenderZip).Items()
        objShell.NameSpace(ExtractTo).CopyHere FilesInZip, 16
        fso.DeleteFile LocalDocSenderZip
     End If

     ' Unzip Local UserProc Files
     If fso.FileExists(LocalUserProcZip) Then
        Set FilesInZip=objShell.NameSpace(LocalUserProcZip).Items()
        objShell.NameSpace(ExtractTo).CopyHere FilesInZip, 16
        fso.DeleteFile LocalUserProcZip
     End If
     
     ' Unzip Local Handheld Files
     If fso.FileExists(LocalHandheldZip) Then
        Set FilesInZip=objShell.NameSpace(LocalHandheldZip).Items()
        objShell.NameSpace(ExtractTo).CopyHere FilesInZip, 16
        fso.DeleteFile LocalHandHeldZip
     End If

     ' -----------------------------------------------------------------------
     ' Copy icons and config files to user folders
     ' -----------------------------------------------------------------------
     fso.CopyFile ConfigFiles, ConfigFolder, True
     fso.CopyFile Icons, UserFolder, True

     ' -----------------------------------------------------------------------
     ' Creates a check file so the install does not run every time
     ' -----------------------------------------------------------------------
     Set objFile = fso.CreateTextFile(CheckFile,True)
     objFile.Write "10.2.200.0 Installed"
     objFile.Close
  End If

  Set fso = Nothing
  Set objShell = Nothing

Obligatory “Use at your own risk” blah, blah, blah.
This was developed to work for our environment. Changes may be needed to suit yours.

5 Likes

Similar to Hannah’s we use a .vbs which uses robocopy.exe that Setup.vbs can be invoked manually or used as a package via SCCM or GPO. I like Hannah’s script, his actually has the client in a .zip - where mine is literally 900mb unzipped, it was a quick config.

Example:

2018-12-19_1020
2018-12-19_1020_001

The Support folder contains robocopy.exe, .NET (if its missing it will install it) [ we can control that via SCCM too ]. Whatever you put in ShortCuts folder or Client folder, it will copy it and even compare, skip it if it already exists.

Gist:

 'Copy Files
 tmpRun = quote & ScriptPath & "support\robocopy.exe" & quote & " " & quote & ScriptPath & "Client" & quote & " " & quote & "C:\Program Files\Epicor Software\Epicor\Client\E10_Migrated102300" & quote & " /MIR /R:0 /W:0 /log:%temp%\Epicor_Install.txt /TEE /NDL /NC /NS"
 AppendLog now() & ": Start Epicor File copy.  Log file located at %temp%\Epicor_Install.txt" & vbcrlf & "Command: " & tmpRun, 1
 WS.run tmpRun, 1, true
 AppendLog now() & ": End Copy", 1

 'Create ShortCuts
 tmpRun = quote & ScriptPath & "support\robocopy.exe" & quote & " " & quote & ScriptPath & "support\ShortCuts" & quote & " " & quote & "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Epicor\E10_Migrated102300" & quote & " /MIR /R:0 /W:0 /log:%temp%\Epicor_ShortCuts.txt /TEE /NDL /NC /NS"
 AppendLog now() & ": Start ShortCut Copy.  Log file located at %temp%\Epicor_ShortCuts.txt" & vbcrlf & "Command: " & tmpRun, 1
 WS.run tmpRun, 1, true
 AppendLog now() & ": End Copy", 1

That was our quick fix to deploy it on Mass Scale.

Of course DEV, TST you get DMT. TRN and PRD you don’t get DMT Icons or even the .licx

We used to have the files unzipped on the server and a batch file would copy them all over to the local client.
This killed our network on upgrade days. It went SO much faster to copy the zip locally and extract. Plus, you got the benefit of having the unzip progress bars, so the user could see what was happening.
It helped out our remote, VPN users too. The old way took upwards of 40 minutes. The new way takes 10-15. :+1:t2:

1 Like

Only thing I can contribute to Hannah’s is a .NET Check gist only:

 on error resume next
 FrameWork = ""
 FrameWork = WS.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Version")
FrameWorkStripped = Left(Replace(FrameWork, ".", ""), 3) 'Convert 4.7.2 to 472 so we can compare against integer
 err.clear
 on error goto 0

 if FrameWork = "" or CInt(FrameworkStripped) < 470 then
tmpRun = quote & ScriptPath & "support\NDP472-KB4054530-x86-x64-AllOS-ENU.exe" & quote & " /passive /norestart /log %temp%\DotNetFrameWork4-6.htm"
   WS.run tmpRun, 1, true
AppendLog "Installed Dot Net Framework 4.7.2", 1
 else
   AppendLog "Dot Net Framework 4.7.2 Not Installed", 1
 end if

We have this because we use SCCM which gives all users a “Software Center” for self-serve. But you can also configure SCCM to do pre-requisite packages.

This is basically how SCCM looks like on the Client Side:

1 Like

@hmwillett Im definitely going to have to use the .zip version… Imagine every update 1000 PCs x 900mb lol thats like what 1TB in Bandwith. Probably even use 7z

We have Maintenance Windows and we use SCCM to deploy the Updates. So when the users come in the next day, we don’t want Epicor Auto-Update launching at 7am on 500 computers at once lol… so we do it all after hours, so users don’t have to Auto-Update.

But if you have less than I dont know 50 PCs, you are prob fine with Auto-Update :slight_smile:

Guys this is terrific, thanks again

1 Like

What’s the problem? LOL

Lastly, you could also probably create an .msi for free with http://wixtoolset.org/ if you have the need. Because msi can be deployed via GPO SIlently if i recall.

@hmwillett did you notice where @mattbradley is from? :wink:

LOL

image

1 Like

No wonder he wants your code… who’s got time to write stuff… WoW is a Full Time Job :stuck_out_tongue:

HAHAHAHA I forgot I put that in there. Busted. Also Horde, on Mal’Ganis since vanilla baby!!!

Just want add this link

Good work there @ERPSysAdmin.
We modified that one a bit to allow the selection of site so that it did not pull down everything accross the network.

I’m reviewing this with our 10.2.400 install. I think a combination of things is going to be better.

@hmwillett is a bit verbose with the copy dialog popping up. (not sure about using a silent option for the copy). @ERPSysAdmin 's script does all files just like @hkeric.wci 's

I’m going to revisit the silent.bat that’s in client install.

Our requirement is really that I want to ensure that the Test Client is separate from the Pilot and Live and the Demo to separate from all the others. Probably a bit of overkill, but we have custom dlls on the client and I want to be confident that we are not cross contaminating.

What I can say it that they are all a great way to get your clients setup the way you need for your specific environment.

Thanks for everyone contributions.

1 Like

Thank you so very much @Hally for this post and the kind words! I’m so glad that the script was helpful for you! :slight_smile: And I hope you can find the solution that fits your needs best!

I have just recently modified my original script a bit because users were complaining about not knowing the progress of the script that was running. So I’ve added a Delete Progress Bar and a Copy Progress Bar which will hopefully be more helpful to the users. (Please see newly modified script below.)

Just FYI, these are my Icon Shortcuts that get copied locally (we are going to have to make a decision on which ones to use and keep eventually…these are all just for testing purposes right now):

Also wanted to mention again that I created a Shortcut to the Powershell Script so that users weren’t actually running the script directly and couldn’t easily get into it to see or make any changes to it.

My PowerShell Script Shortcut Target Path:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -command "& ‘\ \ShareName\Epicor\Epicor102\Client Installation\PSS_InstallERP102ClientFiles.ps1’

Then I can place the Shortcut out in a Shared location where users can access it and run it on their PCs/Laptops.

Also, very important that when running the PS Script you must right-click and choose Run as administrator:
image

Disclaimer: I’m definitely not great at PS nor code writing so please excuse the mess and for any discombobulation throughout…it’s really just a file copy and paste program. :blush: So use at your own risk and TEST! TEST! TEST! PLEASE! :warning:

$LocalInstall_E102Path = 'C:\Epicor\ERP102\'
$E102ClientFilesSource = '\\ServerName\ERP10.2.400.0Deployment\Client\'
$E102LocalIconsPath = 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Epicor Software\Epicor ERP10.2 Client\ERP102\'
$IconsShortcutPath = '\\ShareName\Epicor\Epicor102\Client Installation\ERP102 Icons\'

    function Delete-ProgressBar
    {
        Param([string]$filePath)
        $ListOfFiles = Get-ChildItem -Path $filePath -Recurse | Where-Object {!$_.PSIsContainer}
                for ($i = 0; $i -lt $ListOfFiles.count; $i++) 
                { 
                    Write-Progress -Activity 'Deleting files...' -Status $ListOfFiles[$i].FullName -PercentComplete (($i / $ListOfFiles.Count) * 100)
                    Remove-Item -Path $ListOfFiles[$i].FullName -Recurse -ErrorAction SilentlyContinue 
                }
                #Delete Local Client ERP102 Folder and SubFolders
                Remove-Item $LocalInstall_E102Path -Recurse -Force
                
                #Close out of Delete-ProgressBar with -Completed parameter
                Write-Progress -Activity 'Deleting files...' -Completed -Status "Delete Done."
    }
    

    function Copy-ProgressBar
    {
        Param([string]$fromPath, [string]$toPath)                                                  
                    $files = Get-ChildItem -Path $fromPath #-Recurse #7,000 objects
                    [Double]$i = 0;
                    foreach ($file in $files)
                    {                
                       If (! (Test-Path $LocalInstall_E102Path\$file))
                       { 
                            Copy-Item -Path $files[$i].FullName $toPath -Recurse -Force
                            $i++;
                            Write-Progress -Activity 'Copying files...' -Status $file.FullName -PercentComplete (($i / $files.Count) * 100)
                        }
                    }
                    #Close out of Copy-ProgressBar with -Completed parameter
                    Write-Progress -Activity 'Copying files...' -Completed -Status "Copy Completed."
    }

    #If there is already an Existing ERP102 Folder, DELETE it and all of its contents completely.
    If (Test-Path $LocalInstall_E102Path)
    {
        Delete-ProgressBar $LocalInstall_E102Path
    }

    #Create new Local ERP102 Folder and Copy entire ERP102 Client Directory contents into it 
    New-Item -Path $LocalInstall_E102Path -ItemType Directory -Force
    Copy-ProgressBar $E102ClientFilesSource $LocalInstall_E102Path


    #If there is already an Icons Folder, DELETE it and all of its contents completely.
    If (Test-Path $E102LocalIconsPath)
    {
        Remove-Item $E102LocalIconsPath* -Recurse -Force
    }

    #Create new Icons Folder and Copy Shortcut Icon links from a Shared Folder on the Network into it
    New-Item -Path $E102LocalIconsPath -ItemType Directory -Force
    Copy-Item $IconsShortcutPath* $E102LocalIconsPath -Recurse -Force
    [System.Windows.Forms.MessageBox]::Show('Epicor 10.2.400 Client Installation Complete!', 'OK')
6 Likes