Jump to content

skEwb

Member
  • Posts

    6
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by skEwb

  1. 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!

  2. 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

  3. 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\""

  4. 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.

  5. ;!@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.

  6. 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

×
×
  • Create New...