Powershell calling DMT

I have a PowerShell script to executes a DMT in command line mode. It’s been working for years, and now I’m getting the error (in Windows event viewer):

PS C:\EpicorData\PowerShellScripts> C:\EpicorData\PowerShellScripts\ShipmentNoticeTrigger.ps1
Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\EpicorData\PowerShellScripts\ShipmentNoticeTrigger.ps1:18 char:1
+ Start-Process -Wait -FilePath $DMTPath -ArgumentList "-NoUI -ConfigValue MATCOR  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

The PS Script hasn’t changed (the PS1 file has a date of 8/15/2017), so I’m wondering if a windows update may have changed how PS runs.

Here’s my PS Script:

# This Script runs the Epicor DMT utility to update table UD05
# The change of UD05.Checkbox20 from 0 -> 1 initiates a Data Directive 
# that generates the code to auto email shipping notices.
# This should be run at 4:00 PM EST every day

$DMTPath = "C:\Epicor\ERP10\LocalClients\MATCOR\DMT.exe"
$User = "_glbl_epicor"
$Pass = "redacted"

$Source = "C:\Temp\trigger.csv"

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 "

The error mentions ...ShipmentNoticeTrigger.ps1:18 char:1
and line 18 is the one that starts with Start-Process...

Any thoughts?

1 Like

Asking a stupid question but…it says it cannot find the file specified… I assume you checked that the file hasn’t moved? or that permissions havent’ changed in that folder?

Also “redacted” is not a very secure password
image

Hmmm …

Tried launching DMT on my client, and get

Trying to run it from the App Server and I get:

Hmm looks like a corrupted DMT… Try downloading a new version?
Any other similar issues can you open other files in the same folder fine? I don’t want to scare you but I’ve seen similar behavior before when there’s Cryptomalware going to town on your files… (hopefully not but I had to throw it out there)

Alternatively and hopefully less scary (depending on perspective) this looks like maybe Windows Smart screen is blocking DMT. I would check with your admin (assuming thats not you) to see if any new policies or patches / feature updates have been applied to the client. you can configure Windows to allow running the app but check with IT first.

“Installed” the latest version of DMT (4.0.41.0) for my version of E10 (E10.1.400).

Now DMT launches, but I get the option to down;load and install an update (DMT 4.0.41.2). If I choose to update, I get

image

Checking my server, and it has .Net 4.6 installed.

DMT now runs via the PowerShell Script, so I’m good. … for now.

1 Like

So a newer version of DMT requires an “older” version of .Net?

Looking back at the E10 Install guide, .Net 3.5 is not required.

What’s the deal?

Maybe a bug a boo?

EpicWeb only offers 4.0.41.0 for download. Any way to get the newer version directly, as opposed to letting 4.0.41.0 do the update?

I find this extra weird, as DMT doesn’t even get “installed”. The download from epic web is just a ZIP file with an .exe and a .dll file.

Try EpicWeb again. I think you where ahead of the curve. I got delete notices earlier today from EpicWeb.

Support sent me the latest version (4.0.41.2) to install.

Declined to admit any problems, saying “it must be something on your system…”

did they mention why the need for .Net 3.5?

Nope. Support said

I tested downloading the update from DMT with no issues. It could be something on your workstation. to prevent this error please install manually. DMT 4.0.41.2 attached.

It’s weird that downloading DMT does not have or use any installation program. Just copy the two files (the EXE and the DLL) to a folder and launch the EXE file.

BUt when you do an update from withing DMT, it uses some sort of installer. And I guess that is what requires the .NET 3.5

I don’t make computer programs, but isn’t that basically what an installer does? Just copies DLL’s and other files to the right locations?

Installers will also make sure those files are placed in specific locations, AND “register” them (create registry keys, update other program files of their existence, etc …) AND check for requirements to run the program…

The installer itself may need .NET :rofl:

I’m pretty sure this is the issue.

@ckrusen I had some issues that were unable to install the .NET framework because of some WSUS issues, not sure about your environment, but I ended up going into the registry and disabling the UseWsus registry, so that the machine would go to Windows for updates instead of a WSUS server and was able to install the correct framework. Also may be worth checking / stopping any type of firewall that may not be allowing it to get out and install the framework.

We use forcepoint, it can be a pain sometimes.

I never actually tried installing the .NET 3.5. It seems only the DMT Updater needs it. Not DMT itself.

And I’m not big on installing things on the server, if they’re “not really” needed.

2 Likes