Hi
I've created a working package to change wallpaper on all windows WHEN user has no rights to change it (non admin).
It's here:
name="Papel de Parede Corporativo"
<variable name="VERSAO" value="2017-01-28" />
<check type="file" condition="exists" path="c:\util\PapelParede_%VERSAO%.txt" />
<install timeout="60" cmd='reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\PapelParedeAntinsect" /v "Version" /d "%VERSAO%" /t REG_SZ /f' />
<install timeout="60" cmd='reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\PapelParedeAntinsect" /v "StubPath" /d "\\servidor\netlogon\PapelParede.bat %VERSAO%" /t REG_EXPAND_SZ /f' />
<install timeout="60" cmd='reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\PapelParedeAntinsect" /v "@" /d "Papel de Parede Corporativo" /t REG_SZ /f' />
<upgrade include="install"/>
<remove timeout="15" cmd='%COMSPEC% /C del /q "c:\util\PapelParede_*.txt"'/>
<remove timeout="60" cmd='reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\PapelParedeAntinsect" /f' />
I just have one problem (hehehe): I cannot have it to verify it's installed!
My check condition APPEARS to be working (it's just a file check!)
My batch called from StubPath works (I've run it manually and it works).
This batch change wallpaper using this:
reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "" /f >NUL
reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "\\servidor\netlogon\PapelParede.bmp" /f >NUL
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "\\servidor\netlogon\PapelParede.bmp" /f >NUL
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d 0x00000000 /f >NUL
REM reg delete "HKCU\Software\Microsoft\Internet Explorer\Desktop\General" /v WallpaperStyle /f >NUL
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /d 0x00000000 /f >NUL
reg add "HKEY_CURRENT_USER\Control Panel\Colors" /v Background /t REG_SZ /d "00 80 00" /f >NUL
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters >NUL
echo %VERSAO% > c:\util\PapelParede_%VERSAO%.txt
So... all parts works... but the last command do not executes WHEN runned by system on ActiveSetup.
I'm not sure if it's a BIOS problem (ME!), a ActiveSetup problem, or something I just do not understand on ActiveSetup mechanism!
Have someone already used it ?
BTW: I do know how to name the JOB of ActiveSetup, I see it as (Standard) and as first item on regedit when looking for other ActiveSetups IDs. But I'm unable to mimic that! Any tips is appreciated. I've created a entry using "@" on regedit last command of package!
Regards