Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

7z SFX Modified Module and Tools


Oleg_Sch
 Share

Recommended Posts


Download 7zSD_En_Finall.cab (Mirrors (7): RapidShare, NetLoadIn, zShare, FileFactory, DepositFiles, Badongo, and 2Shared)

http://www.gazup.com/zoVeI-7zsd_en_finall.cab-download-mirrors

Link to comment
Share on other sites

Can an option be added to elevate privileges on Vista and Win7?

I found the easiest way to do this is using Resource Hacker to change the manifest default from level="asInvoker" to 'requireAdministrator' as shown below:

post-190609-1260583363_thumb.jpg

TommyK

Edited by TommyK
Link to comment
Share on other sites

Can an option be added to elevate privileges on Vista and Win7?

I found the easiest way to do this is using Resource Hacker to change the manifest default from level="asInvoker" to 'requireAdministrator' as shown below:

post-190609-1260583363_thumb.jpg

TommyK

Thanks I will give it a try.

***EDIT***

Works like a charm.

Thanks

Edited by Jonnyboy82
Link to comment
Share on other sites

nice i made a work around to use a vbs commands but this require administrator

just made my day thxxxx for the trick

yeah, I spent half a day trying to get a vbs script to do what took 5 seconds with this mod.

lool well it took me 1 day to make a script

here is a part of it

Set WshShell = WScript.CreateObject("WScript.Shell")

objSh.ShellExecute var1, var2 , "", "runas", 1

Set WshShell = Nothing

the var one is the file name and var 2 is -ai

what my script does after the tool extract it runs the script then recall the file with admin

but this way is much better and faster thx finally i can get over Winrar since now 7-zip can do all what i need

Link to comment
Share on other sites

  • 2 weeks later...

:hello: Hi everyone.

I have read this thread through but I still need some help.

Thank you all very much for your assistance so far.. :thumbup

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 Method;

The VB6 application;-

  1. Copies all files needed for the update, to a working folder, (C:\7-Zip\spUpdate\)
  2. Creates a .BAT file to create the archive and SFX file
  3. Runs the BAT File
  4. Uploads the resulting SFX file to the WebSite

The BAT File

@ echo off
C:
cd \7-Zip
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")

spUpdate\spDiary.exe
spUpdate\SP Utilities.exe
spUpdate\SPDIARY_TEMPLATE.MDB

The Config File ("C:\7Zip\spUpdate\spUpdateConfig.txt")

;!@Install@!UTF-8!
InstallPath="%PROGRAMFILES%\\spDiary"
ExtractTitle="Preparing the installation..."
;!@InstallEnd@!

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.

~Mike~

Link to comment
Share on other sites

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.

]

~Mike~

cd to the folder and call 7zip from there:

@echo off
cd /d C:\7-Zip\spUpdate
..\7za a ".\spUpdate.7z" @".\spZip.txt"
copy /b ..\7zsd.sfx + ".\spUpdateConfig.txt" + ".\spUpdate.7z" ".\spUpdate.exe

Modify your file list accordingly.

Now I have a question of my own. How do I specify that the folder I want to decompress into should be an ntfs-compressed folder? That would cut down enormously on the disk thrashing, and with today's processors it's virtually zero overhead. Unfortunately, it seems like I can't do anything or call any files pre-decompression, short of making my own loader. Is this possible now, or can it be put into the sfx?

Link to comment
Share on other sites

cd to the folder and call 7zip from there:

@echo off
cd /d C:\7-Zip\spUpdate
..\7za a ".\spUpdate.7z" @".\spZip.txt"
copy /b ..\7zsd.sfx + ".\spUpdateConfig.txt" + ".\spUpdate.7z" ".\spUpdate.exe

Modify your file list accordingly.

Thanks for the help foxyshadis.

I shall try this theory over Christmas (If I can sneak away from the family)

I have already learned something from you.... Its amazing... I have been writing .bat files since Dos 4.2 days and was not aware of the CD /D switch.. Saves an extra line of code :thumbup

Happy Christmas to you and all

~Mike~

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...