"File does not exist: C:\Windows\system32\curl.exe", yet it does
Online KScript, SMA version 9.0.270
Output log says: "
File does not exist: C:\Windows\system32\curl.exe"
even though the file actually exists:
Volume in drive C has no label.
Volume Serial Number is 72A8-CA1F
Directory of C:\Windows\system32
04/11/2018 03:34 PM 424,448 curl.exe
1 File(s) 424,448 bytes
Here's what the script looks like:
If I manually move \windows\system32\curl.exe to \ before I run the script, (which such manual work defeats the whole idea of using the SMA), and make corresponding changes to the script, the script works. But this script simply won't find/run "C:\Windows\System32\curl.exe".
I at first thought the "Local System" account might be restricted from running .exe's in "\windows\system32", but I also tried changing the "run as" from "Local System" to another admin account, with the same behavior.
As another test, I altered the script to use "\windows\system32\xcopy.exe" to copy "\windows\system32\xcopy.exe" to "\", and that works, but using "\windows\system32\xcopy.exe" to copy "\windows\system32\curl.exe" results in "file not found". I've compared the properties/permissions on the two files, and they seem to be identical.
Anyone have an explanation/fix?
Answer Chosen by the Author
it is most likely a sysnative problem. Kace is a 32 bit client running on a 64 machine and it will default to the syswow64 directory looking for apps. try using %windir%\sysnative instead of %windir%\system32