Scripting Question

executing bat in zip file in scripting

10/25/2016 1316 views
How do you executing a bat file inside a zip? 

Long story short, I have a dll file that I have to replace under %ProgramFiles(x86)%\Solo 

Zip file contains install.bat and 2.dll file.

Batch file name install.bat reads 
SET FileToDelete="%ProgramFiles(x86)%\Solo\2.dll"

IF EXIST %FileToDelete% del /F %FileToDelete%

IF EXIST %FileToDelete% exit 1

xcopy "%CD%\2.dll" "%ProgramFiles(x86)%\Solo\"

I can make this work under manage install but I'm wondering how I can make it for run now situations under scripting?

1 Comment   [ + ] Show comment


  • Please delete your duplicate post.
    • Not sure what you're talking about? I did not post any duplicates.

Community Chosen Answer

you have a few possibilities:
1. you can unzip the zip in the script first
2. you can copy the dll directly in the script (if this is really the only task)
3. you can use file sync under Distribution to copy the file to the right location
Answered 10/26/2016 by: Nico_K
Red Belt

  • Hi Nick,
    The trouble I'm having is that the unzip does not work unless I unzip it to $(KACE_DEPENDENCY_DIR) and then tell the bat file to copy from $(KACE_DEPENDENCY_DIR) to %ProgramFiles(x86)%\Solo.

    The whole reason why I wanted to use scripting is because of the offline feature but seems like that feature hardly ever works for me.

All Answers

Quite interesting code, I operated code like this, thanks...
Answered 10/26/2016 by: nowbout64
White Belt

Don't be a Stranger!

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

Sign up! or login

View more:


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