Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14295

bat - file, reg, cmd - relative paths do not work when applying the background image.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      bat - file, reg, cmd - relative paths do not work when applying the background image.

      WallpaperTestBat.zip

       

      Test1.bat, code for the "temporary" desktop background, after a reboot it disappears:

      @echo off
      cd /d "%~dp0"
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "Fon1.bmp" /f >nul
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d 2 /f >nul
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d 0 /f >nul
      RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

       

      Test2.bat, the code works:

      @echo off
      cd /d "%~dp0"
      if not exist "%AllUsersProfile%\Desktop\Fon1.bmp*" copy /Y "Fon2.bmp" "%WINDIR%\Web\Wallpaper\Fon2.bmp" >nul
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "%WINDIR%\Web\Wallpaper\Fon2.bmp" /f >nul
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d 2 /f >nul
      reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d 0 /f >nul
      RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

       

      Before the reboot in ReactOS, the wallpaper is not visible, because there is one more mistake:

      CORE-14297
      The code does not work:

      RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

      Note.
      Both tests in WindowsXP work fine, without rebooting
      The use of wallpaper in this way is possible only with * .bmp files

       

      Attachments

        1. Windows_XP-Test1.PNG
          888 kB
          Start
        2. Windows_XP-Test2.PNG
          663 kB
          Start
        3. Test1-debug-dev-1016-ge05f08b.log
          34 kB
          Start

        Activity

          People

            bug zilla Bug Zilla
            Start Start
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: