/build/static/layout/Breadcrumb_cap_w.png
02/19/2019 418 views

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

Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

2

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

Answered 02/20/2019 by: SMal.tmcc
Red Belt

  • 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
    • I am not Nick, that is one of the Kace staff that review answers and will endorse them for credibility. He also posts too! Great guy, If you go to UserKon look him up
      • Ahh, my bad. I saw the "Endorsed by" as a "written by". My apologies.