/build/static/layout/Breadcrumb_cap_w.png

File Not Being Unzipped - K1000 Scripting

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

 


0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: ms01ak 11 years ago
10th Degree Black Belt
2

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


Comments:
  • 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! - dtobias_keenan 11 years ago
Posted by: worzie 11 years ago
Fourth Degree Brown Belt
1

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.

 

Posted by: darkhawktman 11 years ago
Green Belt
1

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.


Comments:
  • 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? - dtobias_keenan 11 years ago
Posted by: archangel michael 11 years ago
Orange Belt
1

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.   

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ