Hi all-

I'm just playing around in the Scripting module on the K1000 to get a feel for it but I seem to be having a problem doing something very basic. I've created an Offline KScript in which I would like for the script to verify if a folder exists and if it does, I'd like it to unzip a file that I've uploaded as a dependency and then copy it into the folder that it verified.

The system I'm running the script against is a Windows 7 x64 Professional machine. The current version on my K1000 is v5.4.76847

Everything suggests that the script is running correctly and executing properly but when I go to the System32 directory, I am not seeing the extracted file. I've attached a couple of screen captures of how I have it setup. Let me know if you see any blatant issue or if you think there is a better way of doing this. 

Thanks all. The help from this site is fantastic


Answer Summary:
0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



Try sending the file to “%WINDIR%\SysNative which should send it to the windows directory and the system32 on either windows 32bit or 64bit.

Answered 08/13/2013 by: ms01ak
Tenth Degree Black Belt

  • The above makes sense but I was unable to get the extraction and copying of the file to work with the path above. Using %Windir%\SysNative would cause the file to be copied to neither System32 or SysWOW64 folders. In the meantime, I've found an alternative folder that is the same on both platforms that I can use to host my file. Thank you for your input!
Please log in to comment
Answer this question or Comment on this question for clarity



I usually run into this issue on slower machines.  Found this to work if I do the Unzip a file... part as a Verify step followed by another Verify file exists of a key file that should have extracted.


Answered 10/10/2013 by: worzie
Third Degree Green Belt

Please log in to comment

So the kbox agent runs as a 32 bit app. When you run things like this that point to system32 in 64 bit windows it redirects it to %windir%\SysWOW64, so look in there and you should find your unzipped files.

Answered 08/12/2013 by: darkhawktman
Green Belt

  • Beautiful. But of course that leads to another question. My goal is to be able to extract this file to the System32 directory and this script needs to run against both XP and Windows 7 machines. Can I default the extraction and copy to go to System32 regardless of the OS?
Please log in to comment

I've stopped using this method for installing any software altogether. I realize that my method may not be suitable for all users.

All Installers go into a centralized file store. e.g. \\server\installers\
All installers are executed from a script. e.g. setup.cmd
All variables are set inside the script, the script installs from server as mapped drive

set tempvar=%variable% ; set variables like this

net use r: /delete ; deletes mapped drive letter, prevents errors
net use r: \\server\installers ; set mapped drive

r:\package\whatever.exe /s /k:%tempvar% ; execute installer package like this calling the tempvar as needed. 

net use r: /delete ; clears drive map

This way, I can move/update package easily. Every installer is built in the same way. Any changes are quickly done, and tested before changing the small file (setup.cmd) used for deployments. 

Bonus, there isn't a huge zip file plus all the installation files littering the workstation getting the package. AND it tends to install faster than copying / extracting / installing method above.   

Answered 08/13/2013 by: archangel michael
Orange Belt

Please log in to comment