I have the following script that I am deploying to a LogMeIn session with private session mode (using link to download LogMeIn agent and not calling card). The LogMeIn technician console and the agent are on the same machine. I am running both as the same AD user:
@echo off C:\WINDOWS\System32\cmd.exe /c echo cmd test C:\WINDOWS\System32\msg.exe "%username%" /time:0 Hello World
When I try deploying it via LogMeIn I will see the output of the 2nd line "cmd test" but for line 3 I get the following I get 'C:\WINDOWS\System32\msg.exe' is not recognized as an internal or external command, operable program or batch file.
Why am I able to run C:\WINDOWS\System32\cmd.exe but not C:\WINDOWS\System32\msg.exe?
I'm stumped why this is happening and wonder if this means scripting is more limited than meets the eye.
Solved! Go to Solution.
Hi @0000000000, welcome to the community.
I have been informed that the best practice is to check if path C:\Windows\Sysnative\msg.exe exists and then refer msg.exe this way in the shell, otherwise you may call simply msg.exe.
It is recommended to use the following code in a CMD file:
"
if exist C:\Windows\Sysnative\msg.exe (
C:\Windows\Sysnative\msg.exe blabla........
) else (
msg.exe blabbla...
)
"
I hope this helps.
Hi @0000000000, welcome to the community.
I have been informed that the best practice is to check if path C:\Windows\Sysnative\msg.exe exists and then refer msg.exe this way in the shell, otherwise you may call simply msg.exe.
It is recommended to use the following code in a CMD file:
"
if exist C:\Windows\Sysnative\msg.exe (
C:\Windows\Sysnative\msg.exe blabla........
) else (
msg.exe blabbla...
)
"
I hope this helps.