Bonjour a tous,
Je suis étudiant et il y a un proxy a activer lorsque l'on veux se connecte au réseau de l'établissement. J'ai modifier un code batch que j'ai trouver, et je souhaiterais maintenant avoir une information visuel sur mon bureau. J'ai donc fait 2 fond d'écran avec la même image et juste rajouter un logo allume ou éteint sur l'un et l'autre. Problème maintenant je n'arrive pas a "actualiser" mon fond d'écran. Je suis souvent tomber sur la même fonction "RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True" après mettre renseigner sur celle si j'ai découvert qui fallait être administrateur pour l'utilise ore je ne suis pas et ne connait pas les code admin de ma machine. Auriez vous une idée pour m'aider?
Mon code actuel:
[@echo off
CHOICE /C ML /M "Entrer [M] MAISON ou [L] LYCEE"
IF %ERRORLEVEL% EQU 1 goto MAISON
IF %ERRORLEVEL% EQU 2 goto LYCEE
:MAISON
FOR /F "tokens=3" %%i in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable ^| find "ProxyEnable"') do set enable=%%i
if %enable% == 0x1 (
Reg Add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
Reg Add "HKEY_CURRENT_USER\Control Panel\Desktop" /V WallPaper /t REG_SZ /d "C:\Users\williamducellier\Documents\ecranon.bmp" /f
)
GOTO :END
:LYCEE
FOR /F "tokens=3" %%i in ('reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable ^| find "ProxyEnable"') do set enable=%%i
if %enable% == 0x0 (
Reg Add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
Reg Add "HKEY_CURRENT_USER\Control Panel\Desktop" /V WallPaper /t REG_SZ /d "C:\Users\williamducellier\Documents\ecranoff.bmp" /f
)
GOTO :END
:END
Merci beaucoup pour votre temp a tous.![]()
Partager