Sage 100

 View Only
  • 1.  Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:12
    Version 2013 PU2 client install problem for Sage 100 Advanced. The workstation setup seems to install just fine. However, when the client is launched and the workstation files are synchronizing - the synchronization never finishes and instead the below script automatically pops up in Notepad. We've uninstalled and reinstalled and UAC is off, user is an admin, all the normal stuff. Ideas anyone? ' ************************************************************************* ' Automatic Update Process - Client-side update script ' ' This script is used to perform the actual installation of the files on ' the client machine. ' ' Copyright (c) 2011 Sage Software. All Rights Reserved ' $Id: autoupdate_vbscript.txt 749 2011-03-18 17:12:27Z fred.mcguirk $ ' ************************************************************************* On Error Resume Next Dim HasFailed, scErr, ErrVar, ErrMsg, oFS, FlagWinmgmts Dim bDoRestart, bFixAttributes, PvxExeName Dim PvxInstallDirRoot, PvxSourceTempRoot, PvxExeInstallDir, PvxLaunchDataFile ' Set oFS = CreateObject(""Scripting.FileSystemObject"") FlagWinmgmts = 1 Err.Clear HasFailed = 0 ' ' Initialize control variables for the ProvideX/WindX update process bDoRestart = True bFixAttributes = True bShowKillMsg = True PvxAppInstallDir = """" PvxSourceTempRoot = """" PvxExeInstallDir = """" PvxLaunchDataFile = """" AutoUpdateScriptDir = """" PvxExeName = """" ' ' Set control variables used for Windwows Shell Commands WindowStateHidden = 0 WaitForProcess = True NoWaitForProcess = False ' ========================================================================= ' Generated code from the automatic update process ' ' Replace the following line with assignment of control variables for the ' automatic update process on client. ' ========================================================================= bDoRestart = True bFixAttributes = True bShowKillMsg = True PvxLaunchDataFile = ""autoupdatelaunch.txt"" PvxExeName = ""pvxwin64.exe"" PvxSourceTempRoot = ""C:\Sage\Sage 100 ERP Workstation\MAS90\Home\lib\_updater\tmp"" AutoUpdateScriptDir = ""C:\Sage\Sage 100 ERP Workstation\MAS90\Home\lib\_updater"" PvxAppInstallDir = ""C:\Sage\Sage 100 ERP Workstation\MAS90\Home"" MASRootInstallDir = ""C:\Sage\Sage 100 ERP Workstation\MAS90"" ' ' ************************************************************************* ' BEGIN WORK ' ************************************************************************* ' ' Stop any existing processes using the same ProvideX executable if bDoRestart = True then Call StopPvxExe(PvxExeName, PvxExeInstallDir, bShowKillMsg) end if ' ' Set file attributes to enable overwrite of existing files if bFixAttributes = True then Call SetAttrib(PvxExeInstallDir) if PvxAppInstallDir <> PvxExeInstallDir then Call SetAttrib(PvxAppInstallDir) end if end if ' ' ========================================================================= ' Generated code from the automatic update process ' ' Replace the following line with function calls to copy files into the ' correct locations on the client. ' ========================================================================= ' Application programs Call CopyAppFiles(PvxSourceTempRoot+""\app\*"", MASRootInstallDir, True) ' Programs in OS-specific folders Call CopyAppFiles(PvxSourceTempRoot+""\env\CommonProgramFiles\*"", ""C:\Program Files (x86)\Common Files\"",True) ' ' Read information from command file and restart the session if HasFailed = 0 then oFS.DeleteFolder PvxSourceTempRoot ' if bDoRestart = True then Dim oTextFile, oWscript, aCommand, tmpStartInDir Const ForReading = 1 ' Set oTextFile = oFS.OpenTextFile(AutoUpdateScriptDir+""\""+PvxLaunchDataFile, ForReading) aCommand = oTextFile.ReadLine tmpStartInDir = oTextFile.ReadLine oTextFile.Close set oTextFile = nothing ' isDebug = False if isDebug = True then msgText = ""TextFile: ""+AutoUpdateScriptDir+""\""+PvxLaunchDataFile+chr(13) msgText = msgText + ""Cmd: ""+aCommand+chr(13) msgText = msgText + ""StartDir: ""+tmpStartInDir x1 = msgBox( msgText, 0, ""Restart"") end if ' ' Restart the session Set oWscript = CreateObject(""WScript.Shell"") oWscript.CurrentDirectory = tmpStartInDir Return = oWscript.Run( aCommand, WindowStateHidden, NoWaitForProcess) set oWscript = nothing end if end if ' if HasFailed = 0 then ' Do not register anything end if ' ' ************************************************************************* ' Declare the functions used to do the actual work ' ************************************************************************* ' ' CopyAppFiles(ByVal SourceDir, ByVal InstallDir, ByVal HasSubFolders) ' Parameters: ' SourceDir - [string] Temporary folder for files to copy ' InstallDir - [string] Folder where files are to be installed ' HasSubFolders - [boolean] Indicates whether 'SourceDir' has sub-folders ' ' Copy all files and sub-folders of the SourceDir to the InstallDir; create ' and folders or files that do not exist. ' ' Both the SourceDir and InstallDir must end with a directory separator ""\"". ' ------------------------------------------------------------------------- Function CopyAppFiles(ByVal SourceDir, ByVal InstallDir, ByVal HasSubFolders) ' Define local variables for this function dim isMoreToCopy ' ' If failure has already occurred - just exit if HasFailed = 1 then exit function end if ' ' Set / Clear control information Err.Clear HasFailed = 0 isMoreToCopy = True ' ' First, copy/create sub-folders in the InstallDir if HasSubFolders = True then Call DoCopy(SourceDir, InstallDir, True) ' Abort if folder copy failed if HasFailed=1 then exit function end if end if ' ' Then copy the files... Call DoCopy(SourceDir, InstallDir, False) end Function ' ' DoCopy(ByVal SourceDir, ByVal InstallDir, ByVal OnlyFolders) ' Parameters: ' SourceDir - [string] Temporary folder for files to copy ' InstallDir - [string] Folder where files are to be installed ' OnlyFolders - [boolean] Create/Copy sub-folders only ' ' Both the SourceDir and InstallDir must end with a directory separator ""\"". ' ------------------------------------------------------------------------- Private Function DoCopy(ByVal SourceDir, ByVal InstallDir, ByVal OnlyFolders) dim isMoreToCopy, MsgButtons, MsgTitle, MsgTitlePfx ' ' Set / Clear control information Err.Clear HasFailed = 0 isMoreToCopy = True ' ' Set ErrorHandler to be handled by this function On Error Resume Next ' while isMoreToCopy if OnlyFolders = True then MsgTitlePfx = ""Folder"" oFS.CopyFolder SourceDir+""*"", InstallDir else MsgTitlePfx = ""File"" oFS.CopyFile SourceDir+""*"", InstallDir end if if Err.Number=70 Then ErrMsg = ""Unable to copy files:"" + Chr(13) ErrMsg = ErrMsg + ""From: "" + SourceDir + "" To: "" + InstallDir + Chr(13) ErrMsg = ErrMsg + Chr(13) + Err.Description ErrMsg = ErrMsg + Chr(13) + ""Unable to modify one of the files in a sub-folder - "" + InstallDir ErrMsg = ErrMsg + Chr(13) + ""Please correct the permissions and select Retry or Cancel to abort the update."" ' MsgBox buttons: 16 (Critical Message) + 5 (Retry/Cancel) MsgButtons = 21 MsgTitle = MsgTitlePfx + "" copy failed!"" ErrVar = MsgBox(ErrMsg, MsgButtons, MsgTitle) if ErrVar=4 then ' Retry after reporting the error HasFailed=0 else HasFailed=1 isMoreToCopy = False end if else ' Copy is complete isMoreToCopy = False end if wend End Function ' ' StopPvxExe(ByVal PvxExeName, ByVal PvxExePath) ' Parameters: ' PvxExeName - [string] The name of the ProvideX executable (no path) ' PvxExeDir - [string] The Directory where the executable is located ' bShowKillMsg - [boolean] Show message about killing processes ' ------------------------------------------------------------------------- Function StopPvxExe(ByVal PvxExeName, ByVal PvxExePath) ' Local variables for this function dim oWinMgmts, msgText, msgButtons, msgResponse ' ' Set / Clear control information Err.Clear HasFailed = 0 ' ' Set ErrorHandler to be handled by this function On Error Resume Next ' set oWinMgmts = getobject(""winmgmts:"") if Err.Number<>0 Then FlagWinmgmts=0 exit function end if ' for each Process in oWinMgmts.InstancesOf(""Win32_process"") if UCase(Process.Name) = UCase(PvxExeName) and UCase(Process.ExecutablePath)=UCase(PvxExeDir+""\""+PvxExeName) then if bShowKillMsg = True then msgText = ""A process is running that is using this executable (""+PvxExeDir+""\""+PvxExeNam+"")""+chr(13) msgText = ""Stop this process and press 'OK' to continue,""+chr(13) msgText = ""or simply press 'OK' and this script will stop it for you."" ' MsgBox buttons: 48 (Warning Message) + 1 (OK/Cancel) msgButtons = 21 msgResponse = MsgBox(msgText, 0, ""Process must be stopped..."") end if ' If user pressed OK or message was not displayed, stop process; Otherwise, abort if msgResponse = 1 or bShowKillMsg = False then Process.Terminate() else HasFailed = 1 end if end if Next set oWinMgmts = nothing end Function ' ' SetAttrib(ByVal TheInstallDir) ' Parameters: ' TheInstallDir - [string] The installation directory to process ' ------------------------------------------------------------------------- Function SetAttrib(ByVal TheInstallDir) ' Local variables for this function dim oWscript, aCommand ' ' If failure has already occurred - just exit if HasFailed = 1 or TheInstallDir = """" then exit function end if ' ' Set / Clear control information Err.Clear ' ' Set ErrorHandler to be handled by this function On Error Resume Next ' Set oWscript = CreateObject(""WScript.Shell"") aCommand = ""attrib -r ""+CHR(34)+TheInstallDir+""\*.*""+CHR(34)+"" /s"" Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) set oWscript = nothing end Function ' ' RegisterObjectA(ByVal TheObjectFile, ByVal RegType) ' Parameters: ' TheObjectFile - [string] Name of the object file to register ' RegType - [string] Method to use for registration ' ------------------------------------------------------------------------- Function RegisterObjectA(ByVal TheObjectFile, ByVal RegType) ' Local variables for this function dim oWscript, aCommand, aObject ' ' Set / Clear control information Err.Clear ' ' If failure has already occurred - just exit if HasFailed = 1 then exit function end if ' ' Set ErrorHandler to be handled by this function On Error Resume Next ' Set oWscript = CreateObject(""WScript.Shell"") select case RegType case ""0"" aCommand = ""regsvr32 /u /s ""+chr(34)+TheObjectFile+chr(34) Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) aCommand = ""regsvr32 /s ""+chr(34)+TheObjectFile+chr(34) Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) case ""1"" aCommand = chr(34)+TheObjectFile+chr(34)+"" /unregserver"" Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) aCommand = chr(34)+TheObjectFile+chr(34)+"" /regserver"" Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) end select set oWscript = nothing end Function ' ' RegisterObjectB(ByVal RegInstall, ByVal RegUninstall) ' Parameters: ' RegInstall - [string] Command to register the object (Type=9) ' RegUninstall - [string] Command to unregister the object (Type=9) ' ------------------------------------------------------------------------- Function RegisterObjectB(ByVal RegInstall, ByVal RegUninstall) ' Local variables for this function dim oWscript, aCommand, aObject ' ' Set / Clear control information Err.Clear ' ' If failure has already occurred - just exit if HasFailed = 1 then exit function end if ' ' Set ErrorHandler to be handled by this function On Error Resume Next ' Set oWscript = CreateObject(""WScript.Shell"") aCommand = RegUninstall Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) aCommand = RegInstall Return = oWscript.Run( aCommand, WindowStateHidden, WaitForProcess) set oWscript = nothing end Function ' ' End of Script ' *************************************************************************


  • 2.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:14
    Install PU4 and see if problem resolves????? Almost looks like you have a switch turned on for debugging code....


  • 3.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:16
    WAG: Could Java be turned off or something weird like that? Malware/AV scanner?


  • 4.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:18
    I cannot install PU4 ... they have JobOps.


  • 5.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:28
    Maybe the AV software?


  • 6.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:29
    Maybe try installing in Safe-Mode with network... possibly a script blocking software?


  • 7.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:31
    Here's what the problem was. The .vbs file was being associated with Notepad instead of wscript.exe. Once I changed the file association the workstation then launched after the synchronization.


  • 8.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 11-11-2013 07:43
    Good to know! Thanks for the update.


  • 9.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 01-20-2014 11:01
    Dang! Wish I had seen this earlier today!!! I thought it had to do with multiple 2013's on the workstation. Copied the one test install I needed to an external drive then removed all 2013 installs, then reinstalled the wksetup with the same results. Changed the file association and all is well. Should have looked here first.


  • 10.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 01-20-2014 11:19
    School of hard knocks has quite a faculty staff. Happens to me way more often than I like to admit. Glad you were able to find it eventually. Probably saved you much wait time on hold for Sage tech support.


  • 11.  RE: Version 2013 PU2 client install problem for Sage 1

    Posted 01-20-2014 11:27
    Sage what???