I am working on a utility script to run Sysprep. I have a block of code that verifies %windir%\system32\sysprep\sysprep.exe exists and the DIR function is failing to 'see' some of the items.

On Win 8.1 64-bit ...

C:\>dir %windir%\system32\sysprep

Directory of C:\Windows\system32\sysprep

05/28/2014 09:59 PM <DIR> .
05/28/2014 09:59 PM <DIR> ..
10/20/2014 04:49 PM <DIR> ActionFiles
09/29/2013 11:50 PM <DIR> en-US
05/11/2014 01:22 AM <DIR> Panther
02/22/2014 06:46 AM 432,640 sysprep.exe
08/22/2013 07:02 AM 991,744 unbcl.dll

If I run the following Kix ...

 Code:
$filename = dir("%windir%\system32\sysprep")
while $filename <> "" and @error = 0
  $filename ?
  $filename = dir()
loop


... Kix only displays three items: root, parent and \en-US.

.
..
en-US


I tried to add the following to the top of the script ... no joy.

if @onwow64
$x = setoption("wow64fileredirection","on")
$x = setoption("wow64alternateregview","on")
else
$x = setoption("wow64fileredirection","off")
$x = setoption("wow64alternateregview","off")
endif

If I go up one folder level and dir %windir%\system32, I get accurate results. What is so special about the \Sysprep folder that Kix cannot see everything in there??

<confused>