I have read this thread through but I still need some help.
Thank you all very much for your assistance so far..
I am a retired VB6 Programmer and am looking toward making the creation of an update sfx as automated as possible
The Theory is.... A piece of software that, after selecting updated files from a list (Mainly a few exe's and help files), one click will Create an archive, convert it to an SFX and upload it to my web site for users to download and install.
So far, with a vast amount of assistance from this thread (And lots of cussing), I have achieved my aim with one small problem... the archive carries the original path and installs to that directory.
I have tried to find the switch that will prevent this but up to now, I haven't found it.
The VB6 application;-
- Copies all files needed for the update, to a working folder, (C:\7-Zip\spUpdate\)
- Creates a .BAT file to create the archive and SFX file
- Runs the BAT File
- Uploads the resulting SFX file to the WebSite
The BAT File
@ echo off
7za a ".\spUpdate\spUpdate.7z" @".\spUpdate\spZip.txt"
copy /b 7zsd.sfx + ".\spUpdate\spUpdateConfig.txt" + ".\spUpdate\spUpdate.7z" ".\spUpdate\spUpdate.exe
The File Name List ("C:\7-Zip\spUpdate\spZip.txt")
The Config File ("C:\7Zip\spUpdate\spUpdateConfig.txt")
ExtractTitle="Preparing the installation..."
There are probably faults with the above as I find all the different 7z and sfx versions a little confusing and have probably used conflicting versions of each. I am hoping someone can correct me on any mistakes I have made..
In saying this, It Actually works.
My problem is;-
On the Target Machine, although the sfx finds "C:\Program Files\spDiary\" as requested in the Config command: Installpath="%PROGRAMFILES%\\spDiary", it creates an additional "spUpdate\" folder and places the files in there.
ie: "C:\Program Files\spDiary\spUpdate\"
As a work around, I can use the root of one of the hard drives as a 'Work Folder' but don't like that idea.
Your assistance with this will be greatly appreciated.