Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

7z SFX Modified Module and Tools

- - - - -

  • Please log in to reply
476 replies to this topic

#276
skEwb

skEwb
  • Member
  • 6 posts
  • Joined 19-July 11
  • OS:Windows 7 x64
  • Country: Country Flag

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.


How to remove advertisement from MSFN

#277
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag
write to the registry key is in the format of reg file, I will translate it into the syntax of the module

#278
skEwb

skEwb
  • Member
  • 6 posts
  • Joined 19-July 11
  • OS:Windows 7 x64
  • Country: Country Flag

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, 19 July 2011 - 01:15 PM.


#279
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag
RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f"


Edited by gora, 19 July 2011 - 01:34 PM.


#280
skEwb

skEwb
  • Member
  • 6 posts
  • Joined 19-July 11
  • OS:Windows 7 x64
  • Country: Country Flag
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, 19 July 2011 - 03:34 PM.


#281
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • Joined 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag
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, 19 July 2011 - 09:43 PM.


#282
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

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@!


#283
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • Joined 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

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

#284
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag

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.

#285
skEwb

skEwb
  • Member
  • 6 posts
  • Joined 19-July 11
  • OS:Windows 7 x64
  • Country: Country Flag


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!

#286
visegrip

visegrip

    Newbie

  • Member
  • 36 posts
  • Joined 19-October 08
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.

#287
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag
Last Russian help file (version 1.5 build 2100 28.04.2011) http://7zsfx.info/fi..._150_2100_ru.7z
Old English help file (version 1.4 build 1501 07.09.2009) http://7zsfx.info/fi..._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, 17 November 2011 - 02:22 AM.


#288
visegrip

visegrip

    Newbie

  • Member
  • 36 posts
  • Joined 19-October 08
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.

#289
ricktendo

ricktendo

    Group: Banned Members

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,309 posts
  • Joined 06-June 06
  • OS:Windows 7 x64
  • Country: Country Flag

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, 17 November 2011 - 01:26 PM.


#290
visegrip

visegrip

    Newbie

  • Member
  • 36 posts
  • Joined 19-October 08
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, 18 November 2011 - 05:59 AM.


#291
eltunisie

eltunisie

    Newbie

  • Member
  • 16 posts
  • Joined 17-February 11
  • OS:XP Pro x86
  • Country: Country Flag
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

#292
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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/...stall-problems/

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

Edited by myselfidem, 19 November 2011 - 04:42 PM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#293
eltunisie

eltunisie

    Newbie

  • Member
  • 16 posts
  • Joined 17-February 11
  • OS:XP Pro x86
  • Country: Country Flag
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, 21 November 2011 - 04:42 AM.


#294
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • Joined 06-January 10
  • OS:Windows 7 x64
  • Country: Country Flag
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, 05 December 2011 - 02:20 PM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#295
eltunisie

eltunisie

    Newbie

  • Member
  • 16 posts
  • Joined 17-February 11
  • OS:XP Pro x86
  • Country: Country Flag


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:[/size][/size]

Edited by eltunisie, 23 November 2011 - 03:32 AM.


#296
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developer
  • 8,829 posts
  • Joined 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag
@ = 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)

#297
ThePackager

ThePackager
  • Member
  • 6 posts
  • Joined 05-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
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@!

#298
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag
Update ( 21-01-2012 )
1.4.3.2367-Stable
1.5.0.2367-beta


#299
ThePackager

ThePackager
  • Member
  • 6 posts
  • Joined 05-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
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

#300
gora

gora

    Member

  • Member
  • PipPip
  • 154 posts
  • Joined 09-August 07
  • OS:Windows 7 x64
  • Country: Country Flag
testSFX.exe -InstallPath="C:\\Install\\Test"
Double slash in the path!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users