Copying All files and Subfolders from _Download to another location

(imported topic written by ajdyer200091)

Hi,

I am using the software deployment wizard and it sucessfully extracts the installation files and folders to the _Download folder on the local machine and the install runs sucessfully.

The install needs to reboot to finish the install. The problem is the _Download folder gets cleared out after the reboot so the install program cannont find the files needed to complete the install.

I guess there would be 2 solutions. Could someone tell me how to do either or both?

Method 1

1: Create a new folder on the local drive.

2: Copy all files and subfolders from the _Download folder to the new folder

3: Run the Msiexec from the new folder.

Method 2

1: Extract the Installation files to a folder other than _Download

Thanks for you help

Alan

(imported comment written by JackCoates91)

The Fixlets generated by the new Software Distribution tool use a parameter:

// All SWD Files will go into a folder in the clients __BESData folder. This folder get cleared on every restart. 
parameter "baseFolder" =  "__Download\"

Then you can move the files before running them:

// Create specified zero-byte files. 
waithidden cmd.exe /C copy /y NUL "{parameter "baseFolder"}PatchRawsTemplate.lst"  >NUL
// Move files into subfolders and unescape file names
move "__Download\772ABF7101A90CC211584AC87590CF59BD166060" "{parameter "baseFolder"}1028.mst"

The key is then to cd into that new directory so your CWD is correct:

// Use .bat to set working directory to packages root, for setup command.
createfile until _end_
@ECHO OFF
cd "{parameter "baseFolder"}"
"Setup.exe" /s
_end_
 
move __createfile run.bat

(imported comment written by SystemAdmin)

For Method 1, do the following steps:

Create the target directory. After your download has been extracted, run this line, then execute your installer in the target path.

wait cmd /C xcopy /y /s /c /i __Download*.*

(imported comment written by ajdyer200091)

Thanks Guys I’ll try them out. As always, everyone here is great.

(imported comment written by SystemAdmin)

I think there might be a problem with the SWD “move” action. I’ve created a task with the SWD Dashboard and would like to change to a different “baseFolder”. That is I would like to run my install from a folder that I’ve created on the root of C:\ rather than the __Download folder.

I’ve modified the action as below:

waithidden cmd.exe /C md C:\Installs\Office

parameter “baseFolder” = “C:/Installs/Office/”

In my action I have 2 files and one big compressed file. The 2 stand alone files get moved into C:\Installs\Office OK as well as the files are are NOT in subfolders of the compressed file. However subdirectories of the compressed file are NOT copied to C:\Installs\Office and are left in the __Download folder.

It would seem that the “//move all the extracted files and folders to our new folder” does not actually included subfolders of compressed files!!

(imported comment written by SystemAdmin)

Thanks for pointing that out. I’ve filed a bug on it.

I think the action relies on the extract command to deal create the proper folders and place the files, however i believe the clients extract command can only extract things to the __download folder. You could probably work around this by not archiving your files… though something like office probably has too many separate files for that to be reasonable

-Zak

(imported comment written by Masso91)

I’ve also been doing some Office packages like that recently without any issues using:

parameter “baseFolder” = “C:\Sourcehost\Package_Name”

dos rmdir /S /Q “{parameter “baseFolder”}”

dos mkdir “{parameter “baseFolder”}”

Double checked after reading this, but compressed subfolders and files showed up fine on the host.