Jump to content

Recommended Posts


Posted

2 Export your key to the.reg file and bring him here. I convert it to a line of a config

gora,

From command prompt run something like this:

reg add "HKCU\SOFTWARE\Some Software Name" /v Location /t REG_EXPAND_SZ /d "%%SYSTEMDRIVE%%\Program Files\Some Software Name" /f

Look at the resulting entry in the registry.

I want the same result when run from the config.txt.

The CHM manual says to get the variable name instead of its value use:

%^SYSTEMDRIVE%

But I can't get the correct syntax yet.

Posted

The CHM manual says to get the variable name instead of its value use:

%^SYSTEMDRIVE%

You do not carefully read the manual
Если в текстовых параметрах необходимо указать имя переменной, а не ее значение, то переменную нужно записать следующим образом:

%^PROGRAMFILES%

You see how bad that is not English manual! ;)

But I can't get the correct syntax yet.

A very severe case...

SetEnvironment="Var=%%^SYSTEMDRIVE%%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

Posted

Wow, thanks gora--I would not have got that.

Seems like I must read the manual more carefully.

Now I see one reason you often include a batch or cmd file in many of your releases.

Posted (edited)

for 7zsd

create a folder and context menu with batch file for create sfx module

http://www.axifile.com/en/D101DE0571 or

http://rapidgator.net/file/23278624/7zsfx_windows_XP_Vista_win7-new.exe.html

in this packet sfx container module 7zsd with resources hacker and cmenu and extraico

extract automatic in %programfiles%\7zsfx

into folder 7zsfx file .bat

with cmenu create context menu for .bat file

file bat compress folder in .7z and create file configsfx.txt for 7zsfx

open file configsfx.txt during process for modifier file when closing continue process

and create sfx with name folder and lunch file.exe

with extraico estract ico file from .exe and with reshacker change ico in the file sfx

problem cmenu dont work in win 7

don't create menu context for this utility

Edited by odar
Posted

SetEnvironment="Var=%%^SYSTEMDRIVE%%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

Interesting...

On my system I had to use:

SetEnvironment="Var=%^SYSTEMDRIVE%"

instead of:

SetEnvironment="Var=%%^SYSTEMDRIVE%%"

for it to work correctly.

Posted

1. XP SP3 x86

2.

SetEnvironment="Var=%^SYSTEMDRIVE%"
RunProgram="hidcon:cmd /V:ON /c Set Var=%Var:^=%& Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"!Var!\\Program Files\\Some Software Name\" /f"

Result for data in that registry key:

%SYSTEMDRIVE%\Program Files\Some Software Name

If I use your two lines, I get this for data:

%%SYSTEMDRIVE%%\Program Files\Some Software Name

which seems odd.

I hope that helps. Let me know if you need any more information.

Posted (edited)

2 visegrip

Yes. It's my fault. I did the code to add this variable in the double signs %

You have finished it and now it's your code. Congratulations! :)

Simpler variant:

RunProgram="hidcon:Reg Add \"HKCU\\Software\\Some Software Name\" /v \"Location\" /t REG_EXPAND_SZ /d \"\"%\"SYSTEMDRIVE\"%\"\\Program Files\\Some Software Name\" /f"

Edited by gora
  • 1 month later...
Posted

I was wondering, we have to use a backslash when using " so it becomes \" in the config file.

But what about the single quote? Is the backslash needed also?

Example:

'

becomes

\'

I have this problem with the malwarebytes silent installer that uses a ' in the name.

  • 4 weeks later...
Posted

I'm trying to create a silent installer for my Windows 7 theme, here's my Config.txt


;!@Install@!UTF-8!
GUIMode="2"
Path="%Windir%\Resources\Themes\"
Progress="No"
RunProgram="InstallUxStyle.cmd"
;!@InstallEnd@!

and here's my install script.


@ECHO OFF
GOTO DETECT

:INSTALL


:DETECT
%PROCESSOR_ARCHITECTURE%
IF AMD64 GOTO AMD64
IF x86 GOTO x86
IF IA64 GOTO IA64

:AMD64
Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex64.msi" /j m
GOTO END

:x86
Msiexec.exe /i "%Windir%\Resources\Themes\Cloud7\UxStyle\UxStylex86.msi" /j m
GOTO END

:IA64
Sorry, your architecture isn't supported.
GOTO END

:END
Del "%Windir%\Resources\Themes\Cloud7\UxStyle\"
Exit

I'm on Win8 atm because my win7 partition died, is this correct, and more importantly, how do I make this actually execute the scripts and programs and everything?

Posted (edited)

Why use a CMD when you can use the SFX to install and detect what arch to use

 ;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%Windir%\\Resources\\Themes"
RunProgram="x64:%%T\\Cloud7\\UxStyle\\UxStylex64.msi [switches_here]"
RunProgram="x86:%%T\\Cloud7\\UxStyle\\UxStylex86.msi [switches_here]"
Delete="%%T\\Cloud7\\UxStyle"
;!@InstallEnd@!

Note: you dont need Progress=No with GUIMode=2 and you have to use two backslashes (\\) in the path(s)

Also:

x86: will only execute on 32bit

x64: will only execute on 64bit

%%T variable is equal to the InstallPath

Edited by ricktendo64
Posted

So a little shorter:


;!@Install@!UTF-8!
GUIMode="2"
InstallPath="%Windir%\\Resources\\Themes"
RunProgram="%%P:Cloud7\\UxStyle\\UxStyle%%P.msi [switches_here]"
Delete="%%T\\Cloud7\\UxStyle"
;!@InstallEnd@!

If you need the full path for the MSI, then this:


...
RunProgram="%%P:\"%%T\\Cloud7\\UxStyle\\UxStyle%%P.msi\" [switches_here]"
...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...