"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:
C:\Users\acutech\Downloads>dir C:\Windows\system32\curl.exe
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?
Thanks!
--
Kent
Answers (1)
Top Answer
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
see
http://www.samlogic.net/articles/sysnative-folder-64-bit-windows.htm
Comments:
-
Well, that was magic! Almost 30 years of supporting Windows and I've never heard of "sysnative".
And it's not a directory name in "\windows", and it's not an environment variable.
Just.... wow! (but not wow64)
Thanks, Nick The Ninja! You've solved my issue!
/Kent - kentwest 5 years ago