• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Oleg_Sch

7z SFX Modified Module and Tools

511 posts in this topic

I did not check your line for availability. I gave her the syntax of the module only. Write a string to add the registry entry for a batch file which you work and adds information to the registry correctly.

PS

Syntax strings in a module and a batch file are not equal

Thank you for the suggestion, I will do it this way. Thank you so much for your help again.

0

Share this post


Link to post
Share on other sites

write to the registry key is in the format of reg file, I will translate it into the syntax of the module

0

Share this post


Link to post
Share on other sites

write to the registry key is in the format of reg file, I will translate it into the syntax of the module

This regadd.bat works for now:

@echo off
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\""

Edited by skEwb
0

Share this post


Link to post
Share on other sites
RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f"

Edited by gora
0

Share this post


Link to post
Share on other sites

Hey this unfortunately does not add anything in the registry on WXP and W7.

RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f"

What is the proper way to call a bat file from withing the config.txt ? Does this look normal:

;!@Install@!UTF-8!
OverwriteMode="1"
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\regadd.bat\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Contents of bat file:

@echo off
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\""

That config.txt doesn't run the .bat file either, even though the .bat file is tested locally to be 100% working.

======Back to Registry Method==========

The following line has some edits that work on both WXP and W7.

cmd /c "reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v Whileidle /t REG_SZ /d \""%APPDATA%\WhileIdle\WhileIdle.exe"\""

I converted it over to the proper 7-zip SFX format and it gives 0 errors, but doesn't work:

;!@Install@!UTF-8!
OverwriteMode="1"
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:cmd /c \"reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"\"%APPDATA%\\WhileIdle\\WhileIdle.exe\"\"\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Thanks

Edited by skEwb
0

Share this post


Link to post
Share on other sites

Hi skEwb

Try this alternative

;!@Install@!UTF-8! 
OverwriteMode="1"
RunProgram="hidcon:cmd /c start \"NowaitStart\" \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:cmd /c reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Edited by Geej
0

Share this post


Link to post
Share on other sites

Hey this unfortunately does not add anything in the registry on WXP and W7.

What is the bit of your system, x64 or x86?

Test as follows:

;!@Install@!UTF-8!
InstallPath="%APPDATA%\\WhileIdle"
RunProgram="nowait:WhileIdle.exe"
RunProgram="hidcon:%%P:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%%T\\WhileIdle.exe\\\"\" /f"
MiscFlags="4"
OverwriteMode="1"
GUIMode="2"
;!@InstallEnd@!

0

Share this post


Link to post
Share on other sites

Hey this unfortunately does not add anything in the registry on WXP and W7.

I converted it over to the proper 7-zip SFX format and it gives 0 errors, but doesn't work:

;!@Install@!UTF-8!
OverwriteMode="1"
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:cmd /c \"reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v Whileidle /t REG_SZ /d \"\"%APPDATA%\\WhileIdle\\WhileIdle.exe\"\"\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Thanks

I'm sure, beside giving you a working config.txt , you would like to know why your own config.txt is failing and with no error.

Just a quick tip: Use Process Explorer from sysinternals to see if your own silent installer is hang silently

As in your case, whileidle.exe is started but your silent installer expect it to close before proceeding to execute the reg add command. Hence you do not see any registry added.

Also to add troubleshooting your own config, do not use hidcon:

Wait until you build your config.txt and tested fully functional, then start to hid those console box.

There is a slight error in my own config provided. I missed out the /f in reg add command. Running it once, it's okay. Running 2nd time, will hang. So modify as follow:

This is a functional config.txt, not as best as gora's config.txt. The whole idea is to keep it as close to your (skEwb) original config.txt as possible so you'll appreciate what went wrong.

;!@Install@!UTF-8! 
OverwriteMode="1"
RunProgram="hidcon:cmd /c start \"NowaitStart\" \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:cmd /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\" /f"
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

While on this thing, perhaps we (all users of this great tool) could share some common tips that can help user avoid mistake that user generally made. This way we learn faster & better in understanding/appreciating this tool capability & its limitation. (I hope these tips can make it into the help documentation eventually)

What I see right now is some user who have config.txt problem just doesn't know what to do or doesn't have a clue what went wrong.

Thanks for reading & Cheers

0

Share this post


Link to post
Share on other sites

RunProgram="hidcon:cmd /c reg add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run /v Whileidle /t REG_SZ /d \"%%T\\WhileIdle.exe\" /f" 

This line will run on x86 OS, but will not work on x64 OS. For x64 OS need to run x64 reg.exe, as x86 reg.exe not be able to add this registry key.

0

Share this post


Link to post
Share on other sites

Hey this unfortunately does not add anything in the registry on WXP and W7.

What is the bit of your system, x64 or x86?

Test as follows:

;!@Install@!UTF-8!
InstallPath="%APPDATA%\\WhileIdle"
RunProgram="nowait:WhileIdle.exe"
RunProgram="hidcon:%%P:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%%T\\WhileIdle.exe\\\"\" /f"
MiscFlags="4"
OverwriteMode="1"
GUIMode="2"
;!@InstallEnd@!

This finally works on both x86 and x64. I haven't updated this in a while sorry, but this one finally works on both!

0

Share this post


Link to post
Share on other sites

Oleg_Sch or gora,

Is there a complete list of parameters to use with the "Dialog" versions of the modified module with a few words explaining each parameter in English?

To use when composing the dialog text messages.

A link somewhere?

I have managed to guess many of the obvious parameters but a complete list with syntax use would be most helpful.

If there is no English version, throw a Russian version at me and I will try my best to translate it.

0

Share this post


Link to post
Share on other sites

Last Russian help file (version 1.5 build 2100 28.04.2011) http://7zsfx.info/files/7zsd_chm_150_2100_ru.7z

Old English help file (version 1.4 build 1501 07.09.2009) http://7zsfx.info/files/7zsd_chm_150_2100_en.7z

If there is no English version, throw a Russian version at me and I will try my best to translate it.

We will be glad to any help with transfer of help into English language. I hope, you lay out your variant of English help and will give on its the reference here.

Edited by gora
0

Share this post


Link to post
Share on other sites

Thanks gora for the Russian version Help for version 2100, that is nice to have.

But I think you misunderstood what I was looking for.

I am trying to use this:

7zsd_LZMA_Dialogs.sfx

The Dialog text parameters are different from those in:

7zsd_LZMA.sfx

For example, a line break in a text message in 7zsd_LZMA.sfx uses: \n

But in 7zsd_LZMA_Dialogs.sfx uses: \par

And there appear to many more parameters available in the "Dialogs" version for controlling appearance of text.

None of this is mentioned in the 7zSD_RU.CHM.

Anyway thanks for that updated version of the help manual. I will begin looking at it.

0

Share this post


Link to post
Share on other sites

Thanks gora for the Russian version Help for version 2100, that is nice to have.

But I think you misunderstood what I was looking for.

I am trying to use this:

7zsd_LZMA_Dialogs.sfx

The Dialog text parameters are different from those in:

7zsd_LZMA.sfx

For example, a line break in a text message in 7zsd_LZMA.sfx uses: \n

But in 7zsd_LZMA_Dialogs.sfx uses: \par

And there appear to many more parameters available in the "Dialogs" version for controlling appearance of text.

None of this is mentioned in the 7zSD_RU.CHM.

Anyway thanks for that updated version of the help manual. I will begin looking at it.

You can simply use Wordpad (that comes with Windows) to format the text the way you want it, save the RTF then open it in notepad....now copy the code and paste it in your config.txt and voila

Edited by ricktendo64
0

Share this post


Link to post
Share on other sites

Thanks ricktendo64!, That makes it really easy.

Argh, WordPad is trying to be a smartass. I find I still have manually edit some of the parameters to get things to look the way I want.

Edited by visegrip
0

Share this post


Link to post
Share on other sites

haiiiiiiiiiiiiiiiiii

I need to add file xxx.inf to instal silant by 7z sfx

What the code add to Config.txt????

And

I need to add file xxx.xml to instal silant by 7z sfx

I download Nod32 2.7 instal silant with file Config.xml (setting nod32 2.7)

the code use

RunProgram="setup.exe /forceold /silentmode /NORESTART /instmfc

/cfg=config.xml"

but

the program is nod32 v4

setup.msi

What the code add to Config.txt?????????

please help me

0

Share this post


Link to post
Share on other sites

Maybe that can help you adding inf file inside config.txt, with this example:

http://www.msfn.org/...post__p__947388

With config.xml file I use config.txt for Office 2007 Standard, like this:

config.txt


;!@Install@!UTF-8!
GUIMode="2"
RunProgram="setup.exe /config .\STANDARDR.WW\config.xml"
;!@InstallEnd@!

The same temp path is writed inside my config.xml file!

More help using msi file, adapt with config.txt:

http://www.msfn.org/board/topic/111457-nod32-v30621-silent-install-problems/

http://www.en.nod32.ch/support/faq.php

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

about nod32 v4 silant instal with config.xml

What code I used from this:

RunProgram="setup.msi /qn /norestart /cfg=\"%%T\\config.xml"

RunProgram="setup.msi /qn /cfg=config.xml"

RunProgram="setup.msi /qn /REBOOT="ReallySuppress" ADMINCFG="%xmlfile.xml%"

RunProgram="setup.msi /qn /config .\STANDARDR.WW\config.xml"onfig.xml"

and What mean of \"%%T??????????????

I need to replace file prodect in program files with another

i need alike this code

rename %WinDir%\explorer.exe explorer.exe.1

copy explorer.exe %WinDir% /y

Edited by eltunisie
0

Share this post


Link to post
Share on other sites

More help: http://7zsfx.info/en/

%%T - full extraction path (temp folder=%temp%)

With my example working fine installing silently Microsoft OFFICE 2007 STANDARD:

RunProgram="setup.exe /config .\STANDARDR.WW\config.xml" ( .\ = temp folder [%temp%])

*Edit: Examples about the temp folders path.

Many thanks Kels

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

With my example working fine:

RunProgram="setup.exe /config .\STANDARDR.WW\config.xml" (.\ = temp folder [%temp%])

thanks for you

but nod32 v4 is setup.msi not setup.exe

if i use

RunProgram="setup.msi /qn /config .\STANDARDR.WW\config.xml

Is code is work????????????????????

pls help me :blushing:

Edited by eltunisie
0

Share this post


Link to post
Share on other sites

@ = eltunisie

You seem to have a couple of sticky buttons on your keyboard. Please look into it. (Stop typing so many of the same things it is quite annoying)

P.S. myselfidem = He was at wincert too. He is trying to make a warez installer (Using cracked files)

0

Share this post


Link to post
Share on other sites

Hi,

I'm trying to create a sfx that allows silent installs. additionally the directory can be defined in the cmd line. If it is defined, the install path defined in the config.txt will be ignored. I tried using the -o command but it does not work. No matter what I do, when I run the install through the cmd line, I am not able to change the install directory. Is there a way to do this or can this wonderful 7zsd.sfx (thanks Oleg) be updated to allow the install directory switch to be passed?

cmd line silent install.

test.EXE -y -aoa -o"C:\Install\Test"

My Config.txt:

;!@Install@!UTF-8!

Title="Utility Server Installation:"

BeginPrompt="Utility Server Installation:\n\n Created by 'me' on Fri 12/02/2011 at 13:45:52.77\n BUILD: Regression Build_20111010.1\n Please update 'Destination Folder' to point to 'DRIVE:\MyCompany\Client_CountryCode\ProductCode'\n For example if Test is being installed for Toys USA: 'D:\MyCompany\TOY_US\Test'"

CancelPrompt="Do you want to cancel the extraction?"

ExtractDialogText="Please, wait..."

ExtractPathText="Please, enter the extraction path:"

ExtractTitle="Extracting..."

GUIFlags="8+32+64+4096"

GUIMode="1"

InstallPath="C:\\\MyCompany\\TOY_US\\Test'"

OverwriteMode="0"

;!@InstallEnd@!

0

Share this post


Link to post
Share on other sites

Hi,

Is there a switch to specify the extract directory when running a sfx through the cmd line (I wasn't able to find one)? Or can this wonderful 7zsd.sfx (thanks Oleg) be updated to allow an extract directory switch to be passed? this is a critical feature I need due to automating deploys to different directories on multiple servers.

Example of a cmd I would run and what I'm trying to accomplish:

testSFX.exe -y -o"C:\Install\Test"

testSFX.exe's default extract location would be overridden and extracted to "C:\Install\Test".

Thanks

0

Share this post


Link to post
Share on other sites
testSFX.exe -InstallPath="C:\\Install\\Test"

Double slash in the path!

0

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.