/build/static/layout/Breadcrumb_cap_w.png

executing bat in zip file in scripting

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?

Thanks

1 Comment   [ + ] Show comment
  • Please delete your duplicate post. - anonymous_9363 7 years ago
    • Not sure what you're talking about? I did not post any duplicates. - sam240 7 years ago

Answers (2)

Posted by: Nico_K 7 years ago
Red Belt
2
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

Comments:
  • 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. - sam240 7 years ago
Posted by: nowbout64 7 years ago
White Belt
1
Quite interesting code, I operated code like this, thanks...
 
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