Jump to content

Recommended Posts

Posted
Dialog Version

I see you're actually telling dialog version apart from non-dialog version by looking for the dialog resources, in other words, the code is same.

I think you may want to let user manually add dialogs to versions other than LZMA, but this is not documented.

Yes, you are right and user can manually add custom dialogs to any modules. I do not have enough time to develop, especially for documentation.

Russian

Not to be offensive, but I don't think it's good to add them in the code, or we may need a macro to turn it off. The strings takes too much spaces.

This is historical issue (if you don't know, I'm from Russia), may be later I will change this.

RTF support on non-dialog versions

More complex. I'll write PM to you in near week.


Posted (edited)

Can someone please help me point out what I'm doing wrong here? These commands work fine if executed in a regular shell, however it gives this error when executed from within the SFX

Error in line 5 of configuration data:

;!@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\ /f /v Whileidle /d "\"%APPDATA%\WhileIdle\WhileIdle.exe\"""
InstallPath="%APPDATA%\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

It specifically complains about this part "\"%APPDATA%\WhileIdle\WhileIdle.exe\"""

Screenshot

Edited by skEwb
Posted
;!@Install@!UTF-8!
OverwriteMode="1"
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Posted (edited)

;!@Install@!UTF-8!
OverwriteMode="1"
RunProgram="hidcon:cmd /c \"%APPDATA%\\WhileIdle\\WhileIdle.exe\""
RunProgram="hidcon:REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\""
InstallPath="%APPDATA%\\WhileIdle"
GUIMode="2"
;!@InstallEnd@!

Thank you :)

The error is now fixed, however the registry entry doesn't get added, if the line is used in a shell it gives this output:

WindowsXP

C:\Documents and Settings\Administrator>REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\

Error: Too many command-line parameters

Windows 7:

C:\Users\Administrator>REG ADD HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run /f /v Whileidle /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\"

ERROR: Invalid key name.

Type "REG ADD /?" for usage.

My guess is that it's not supposed to work being interpreted by a standard Windows shell and only 7-Zip SFX interprets it correctly?

The program installs and triggers to execute, however, the registry entry isn't added.

Edited by skEwb
Posted (edited)

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

Edited by gora
Posted

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.

Posted

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

Posted (edited)

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
Posted (edited)
RunProgram="hidcon:Reg Add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v \"Whileidle\" /t REG_SZ /d \"\\\"%APPDATA%\\WhileIdle\\WhileIdle.exe\\\"\" /f"

Edited by gora
Posted (edited)

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
Posted (edited)

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
Posted

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

Posted

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

Posted

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.

  • 2 weeks later...
Posted

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!

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.
×
×
  • Create New...