The following:
- creates a file
c:\temp\trigger.csv
(the single>
overwrites an existing file) - Adds two rows. One to set the monitored field, and another to reset it. (using the double
>>
appends to the file) - Executes DMT.exe with command line parameters to update UD05
#DMT Automation Example 1
$DMTPath = "C:\Epicor\ERP10\LocalClients\MATCOR\DMT.exe"
$User = "_glbl_epicor"
$Pass = "PWfor_glbl_epicor"
$Source = "C:\Temp\trigger.csv"
#create the CSV file each time this is run
echo "Company,Key1,Key2,Key3,Key4,Key5,CheckBox20" > $Source
echo "MC,CKRU,,,,,1" >> $Source
echo "MC,CKRU,,,,,0" >> $Source
#Load Data
Start-Process -Wait -FilePath $DMTPath -ArgumentList "-NoUI -ConfigValue MATCOR -User $User -Pass $Pass -Update -Import UD05 -Source $Source "
EDIT
Since we use Windows endpoint, the user name and password are actually ignored, and the credentials of the windows task are used instead.
Here’s the Windows task (in Admin Tools Task Scheduler)
And here’s the Actions tab
Note, that this is all done on the App Server.