0% found this document useful (0 votes)
54 views4 pages

APTRA Advance NDC Support Script

Uploaded by

shakyaniraj.ncat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views4 pages

APTRA Advance NDC Support Script

Uploaded by

shakyaniraj.ncat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

'$Id: AANDC_CompInstall/Comp.

ini Files/APTRA Advance NDC Support


Files/SupportFiles/[Link] [Link] 2013/12/11 17:12:24IST Spafford, Michael
(MS515892) Exp $
'$Log: AANDC_CompInstall/[Link] Files/APTRA Advance NDC Support
Files/SupportFiles/[Link] $
'Revision [Link] 2013/12/11 17:12:24IST Spafford, Michael (MS515892)
'AANDC-9769 - Support for 64-bit Windows 7 pathnames.
'Revision [Link].1.1 2013/10/29 17:11:35GMT Spafford, Michael (MS515892)
'AANDC-9769 - Support for 64-bit Windows 7.
'Revision [Link] 2013/10/24 13:58:58BST Spafford, Michael (MS515892)
'AANDC-9769 (10486) - Support for 64-bit Windows 7.
'Revision 1.17 2012/10/10 18:13:03BST Bhat, Ravi (br185000)
'ANDC420_to_trunk
'Revision [Link] 2012/10/10 22:43:03IST Battini, Nagaraju (nb185041)
'575706: Request functionality to detect freeze conditions and take recovery
action.
'Revision [Link].1.6 2012/10/10 11:44:21IST Battini, Nagaraju (nb185041)
'Comment is addressed
'Revision [Link].1.5 2012/10/09 19:28:53IST Battini, Nagaraju (nb185041)
'Code is updated
'Revision [Link].1.4 2012/10/08 15:53:37IST Battini, Nagaraju (nb185041)
'Code is updated.
'Revision [Link].1.3 2012/10/03 16:51:43IST Battini, Nagaraju (nb185041)
'Code is updated
'Revision [Link].1.2 2012/09/26 15:10:53IST Battini, Nagaraju (nb185041)
'Code is updated.
'Revision [Link].1.1 2012/09/06 11:32:40IST Gavarasana, Hima (hg185004)
'G575706 - Added code to run [Link] as part of [Link]
'Revision [Link] 2012/08/29 13:42:29IST Gavarasana, Hima (hg185004)
'ANDC4.2 Dev Path
'Revision 1.16 2011/06/20 14:52:44IST Bhat, Ravi (br185000)
'ANDC410_to_trunk
'Revision [Link] 2011/06/20 14:52:44IST Lawson, Richard (RL400003)
'RFC 506509 use FEH in ANDC
'Revision [Link] 2011/05/16 18:02:50BST Lawson, Richard (RL400003)
'G499861 Configure ANDC after ulWait.
'Revision 1.15 2010/08/26 17:19:36BST Bhat, Ravi (br185000)
'ANDC400_to_trunk
'Revision [Link] 2010/08/26 21:49:36IST Yakub, Zubair (zy515747)
'RFC442699
'Revision 1.14 2009/02/09 14:40:58GMT Dryden, Jim (JD515051)
'AANDC340_to_trunk
'Revision [Link] 2009/02/09 14:40:58GMT Duncan, Philip (PD515063)
'G419611 - Changed default ANDC path to C:\program files\ncr aptra\advance ndc
'Revision [Link] 2008/06/27 07:01:53BST Gourigari, Ramesh (rg185040)
'updated with set shell=Nothing
'Revision [Link] 2008/06/26 18:55:04IST Gourigari, Ramesh (rg185040)
'PromoteRegEntryExists method was always returning 0 causing [Link] not
running even when promote installed
'Revision [Link] 2008/05/22 20:38:18IST Yakub, Zubair (zy515747)
'Added startup for BrowserClient but conditional on existence of Registry Key
'Revision [Link] 2008/03/26 20:34:02IST nm185020
'GR1T324269 - State Type Split - merge into main path
'Revision [Link].1.1 2007/05/07 20:33:21IST nm185020
'Duplicate revision
'Revision [Link] 2007/05/07 16:03:21BST rl400003
'G364150 to main dev path andc 3.2
'Revision [Link].1.1 2006/01/18 13:14:57GMT pd515063
'Duplicate revision
'Revision [Link] 2006/01/18 13:14:57GMT ms515892
'Migrated Automated build / Installer changes into 3.1.
'Revision 1.8 2005/06/21 14:50:21BST rl400003
'ANDC 3.0

on Error Resume Next


const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const Wincor= 2
strComputer = "."
UlWaitRetVal = -1
Dim oShell
Dim strRegKey
Dim strProgFilesPathname

Set oShell = CreateObject("[Link]")

' Check if Windows 64-bit


progPath = [Link]("%ProgramFiles%")
progPath86 = [Link]("%ProgramFiles(x86)%")
If (progPath86="%ProgramFiles(x86)%") Then
strProgFilesPathname = progPath
strRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\"
Else
strProgFilesPathname = progPath86
strRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\"
End If

VendorName = [Link] (strRegKey & "NCR\Advance NDC\NCRHWErrors")


if(VendorName = Wincor) Then
strKeyPath_old = ".DEFAULT\XFS\LOGICAL_SERVICES\VDM\"
strKeyPath_new = ".DEFAULT\XFS\LOGICAL_SERVICES\_VDM"
on Error Resume Next
[Link]("HKEY_USERS\"& strKeyPath_old)
if [Link] = 0 then

Set objRegistry = GetObject("winmgmts:\\" & _


strComputer & "\root\default:StdRegProv")

if [Link]( HKEY_USERS, strKeyPath_old, valueNames, types ) = 0 then


if isArray( valueNames ) then
[Link] "HKEY_USERS" &"\" & strKeyPath_new &"\" & "" ,"","REG_SZ"
for i = 0 to UBound( valueNames )
[Link] HKEY_USERS, strKeyPath_old, valueNames(i), value
[Link] "HKEY_USERS" &"\" & strKeyPath_new &"\" & valueNames(i)
,value,"REG_SZ"
next
end if
end if
[Link] HKEY_USERS, strKeyPath_old
end if
end if
wosapause = [Link] (strRegKey & "NCR\Advance NDC\spstartpause")

UlyWaitCommand = """[Link]"" ""/w 1800"" ""/e"""

UlWaitRetVal = -1
UlWaitRetVal = [Link]( UlyWaitCommand, 2 ,true )
' UlWait return values 0 = started; 1 = not started within timeout;
' 2 = Error, not started; 3 = Error, reboot

if UlWaitRetVal > -1 then 'ulwait exists so use NCR SPs

Do Until UlWaitRetVal = 0
if UlWaitRetVal > 1 then
endstring = "ANDC Startapps: ATM is restarting because Ulwait
returned " & UlWaitRetVal
[Link] 1, endstring
shutdowncommand = "shutdown -r -f -t 00"
[Link] shutdowncommand, 2 ,true
Exit do
end if

UlWaitRetVal = [Link]( UlyWaitCommand, 2 ,true )


loop

else
VendorName = [Link] (strRegKey & "NCR\Advance NDC\NCRHWErrors")

if(VendorName = 3) Then 'Diebold


dim objWMIService
Set objWMIService = GetObject("winmgmts:
{impersonationLevel=impersonate}!\\.\root\cimv2")
dim colListOfServices
dim LoadAgilis
LoadAgilis = 0

Do Until LoadAgilis = 1
Set colListOfServices = [Link] ("Select *
from Win32_Service Where Name ='Diebold XFS'")
For Each objService in colListOfServices
status = [Link]
if status = "Running" then
LoadAgilis = 1
UlWaitRetVal = 0
else
[Link](500)
end if
Next
if(LoadAgilis = 0) then
[Link](20000)
end if
loop
else
' another vendor so look for start SPs command.
UlWaitRetVal = 0
wosacmnd = [Link] (strRegKey & "NCR\Advance NDC\spstartcommand")
if wosacmnd <> "" then
[Link] wosacmnd , 2, true
[Link](wosapause)
end if
end if
end if

if UlWaitRetVal = 0 then

' Check if Configuration is required - wait on this


[Link] chr(34) & strProgFilesPathname & "\NCR APTRA\Advance NDC\
[Link]" & chr(34), 0 ,true

'disable contactless
[Link] "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\NCR\Advance NDC\
ContactlessReader\NCRContactlessReader",0,"REG_DWORD"

'Start Advance NDC. ANDC started by Fatal Exception Handler (FEH).


[Link] = strProgFilesPathname & "\NCR APTRA\Advance NDC\"
[Link] "FEH [Link]" , 0 ,false
[Link] 60000

'[Link] "[Link] -A" , 7 ,false


'Above line has been commented by India PS bsis recommendation from FGSC For
GEMSID:INC000005821948

dim maps_Global_Path
maps_Global_Path = [Link]( "%MAPS_GLOBAL%" )
If ( maps_Global_Path = "%MAPS_GLOBAL%") then
'AANDC runtime installation. You can enable NDC Monitor by uncommenting
the following line.

'[Link] "[Link] " & chr(34) &


strProgFilesPathname & "\NCR APTRA\Advance NDC\Config\[Link]" & chr(34), 0,
false
End If

end if

Common questions

Powered by AI

The UlWait command executes the UlyWaitCommand function, which waits for a specified time to ensure the appropriate system state is achieved before starting further applications. The command returns several values: 0 if the process started successfully, 1 if the process did not start within the timeout period, 2 if there was an error preventing the start, and 3 in the case of an error requiring a system reboot .

For Diebold systems, identified by the VendorName of 3, the script utilizes WMI services to query the state of "Diebold XFS". If it’s not running, it enters a loop to repeatedly check the status, pausing intermittently with a sleep command until the service is up. If the service is not running, it pauses for 20 seconds before rechecking, continuing until the service is found to be running .

The script configures registry keys by reading current settings using WScript.Shell and modifying or writing new keys as necessary. For instance, it checks for the NCRHWErrors value under the "NCR\Advance NDC" key in the registry. If specific conditions are met, such as identifying a vendor, it manipulates registry paths under HKEY_USERS to correspond to various XFS logic services" paths .

The script includes functionality to detect application freeze conditions by running an executable named NDCHangMonitor.exe as part of the StartApps.vbs sequence. If a freeze is detected, the script expects NDCHangMonitor.exe to identify the condition and presumably trigger an appropriate recovery action, although explicit recovery steps are not detailed in the provided source .

The script manages the startup of Advance NDC applications by utilizing the Fatal Exception Handler (FEH) to initiate the main application, ApplicationCore.exe. It sets the current directory to the Advance NDC path and calls the FEH to start this core application. This structured approach ensures that the core components are initialized consistently, with particular actions like calling ApplicationCore.exe being indirectly handled through FEH .

The script is structured to conditionally run NCR.APTRA.NDC.Monitor.exe upon successful runtime installation. The check is done against a custom environment variable "%MAPS_GLOBAL%"; if its expansion results in the same placeholder text, this implies that proper configurations have not been achieved. Uncommenting the respective script portion enables the monitor, making this step conditional upon successful prerequisite checks .

The script configures NCR's contactless reader by writing a registry value that disables the feature. This is done by setting the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\NCR\Advance NDC\ContactlessReader\NCRContactlessReader" to 0, which indicates that the contactless reader functionality is turned off .

The startapps.vbs script determines the correct program files path by checking if the environment variable "%ProgramFiles(x86)%" expands to "%ProgramFiles(x86)%" itself. If it does, the system is recognized as 32-bit, and it uses the "%ProgramFiles%" path. If not, indicating a 64-bit system, the script uses the path from "%ProgramFiles(x86)%" with an adjusted registry key path to "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node" instead of the standard software path .

The script differentiates vendor-specific commands using the VendorName read from the registry. For NCR vendors (Wincor), it attempts specific command executions. For other vendors, it checks if specific start commands are set in the registry under "spstartcommand" and then executes them, following which it pauses based on a value read from "spstartpause" before proceeding further .

The script employs multiple error-handling techniques to ensure stability, primarily using "On Error Resume Next". This directive prevents script execution from stopping following a runtime error. It allows the script to continue execution rather than aborting, with specific checks and logs for critical steps, such as when determining the UlWait command output, ensuring graceful failure handling and system recovery through scripted shutdowns if necessary .

You might also like