Jump to content

Regegit Ayarlarını Aktive Etme


milano88
 Share

Recommended Posts

Meraha arkadaşlar canımı acayip derecede sıkmaya başlayan bir sorunum var şöyleki regedite bazı kayıtlar giriyorum ve butona basınca uygula diyince hemen aktive olmasını istiyorum bazı yolları denedim 5-10 saniye bazen 15 saniyede sonra falan aktive oldular butona bastığım anda uygulamanın yolunu bilen varsa yazsın rica ediyorum

denediğim bazı yollar

[code]ProcessClose("explorer.exe") Run("explorer.exe")[/code]
[code]$Hwnd = WinGetHandle("classname=Progman")
DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0)[/code]
[code]$RegKeyFolder = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"
$Folder = FileSelectFolder("Select a folder to use as desktop...","My computer")
RegWrite($RegKeyFolder,"Desktop","REG_EXPAND_SZ", $Folder)
ProcessClose("explorer.exe")
WinMinimizeAll()[/code]

[code]Run("rundll32 user32.dll,UpdatePerUserSystemParameters")[/code]

normalde şu kodla herşey sıfırlanıyor lakin 10-15 saniye falan sürüyor belkş biraz daha az

şu kodlada ams denedim oda fauda etmedi ne yapacağımı şaşırdım :(
[code]DLL.CallFunction(_SystemFolder.."\\SHELL32.DLL", "SHChangeNotify", "134217728, SHCNE_ALLEVENTS, NULL, NULL", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)[/code]

Edited by milano88
Link to comment
Share on other sites

[code]Registry.SetValue(HKEY_CURRENT_USER, "Control Panel\\Desktop", "TileWallpaper", 0, REG_SZ);
Registry.SetValue(HKEY_CURRENT_USER, "Control Panel\\Desktop", "WallpaperStyle", 2, REG_SZ);
Registry.SetValue(HKEY_CURRENT_USER, "Control Panel\\Desktop", "Wallpaper", secim[1], REG_SZ);
result = Dialog.Message("Uyarı !", "Resim Masaüstünüze Uygulandı ! Etkili Olması İçin Bilgisayarınızı Yeniden Başlatmanız Gerekmektedir ! Şimdi Yeniden Başlatmak İstiyormusunuz ?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
if result == 6 then
System.Reboot();
end
[/code]

olmuyor değil oluyor lakşn bazı resimlerde uygulama yapmıyor bende sistemi yeniden başlattırmak zorunda kalıyorum

[code]rundll32.exe user32.dll,UpdatePerUserSystemParameters", 1, True[/code]

normalde şu kodla reg ayarlarını girdikten sonra uygulatıyorum ama bazı resimlerde sorun çıkartıyor 5-6 kere uygula dediğimde uyguluyor sanırım sistemle alakalı bazı resimlerdede hemen tıkladığımda uygulama yapıyor

not: reg kodları ams için düzenledim bilginiz olsun normal reg girdilerine göre hesaplarsınız

Çalışma ile ilgili ufak bir video ekledim şöyle bişi yapıyorum

http://www.youtube.com/watch?v=l42PGnRM6ck

Edited by milano88
Link to comment
Share on other sites

@milano88

Videoyu izlemedim ama autoit forumundan şu kodu kullandığım xp üzerinde dendim.
Sorunsuz çalıştı bende!


[codebox]; Example usage.

_ChangeWallpaper('C:\WINDOWS\Web\Wallpaper\Bliss.bmp', 3)


; The BMP Wallpaperchanger Function below.
; $sFile is the address of the bmp picture to use.
; $iType is setting for the wallpaper. (stretched, etc)

Func _ChangeWallpaper($sFile, $iType)
If Not FileExists($sFile) Then
SetError(1)
Return -1
EndIf
If StringTrimLeft($sFile, StringInStr($sFile, '.', 0, -1)) <> 'bmp' Then
SetError(2)
Return -2
EndIf
Select
Case $iType = 1
RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '1')
RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0')
Case $iType = 2
RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0')
RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0')
Case $iType = 3
RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0')
RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '2')
Case Else
;
EndSelect
RegWrite('HKCU\Control Panel\Desktop', 'Wallpaper', 'reg_sz', $sFile)
DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $sFile, "int", 0)
Return 0
EndFunc[/codebox]

Edit:Konu Linki
[color="#0000FF"][u][b]http://www.autoitscript.com/forum/topic/10285-change-desktop-wallpaper/[/b][/u][/color]

Edited by blue_life
Link to comment
Share on other sites

evet sorunsuz çalışıyor lakin bunu exe haline gitirip herhangi bir yoldan gösterdiğim resmi açtıramazmıyız atıyorum videodaki gibi gözat diyince çıkardığım resmi masaüstüne uygulatsak ben autoitten fazla anlamamda burdaki exeyi amsde kullanmak amacım olurmu sizce?

Link to comment
Share on other sites

@milano88

Bende ams den anlamıyorum. Ama şöyle bir şey yapabilirsin.
Sen gerekli registry bilgisini ams ile yazdır.
Daha sonra değişikliğin uygulanması için autoit.exe sini çalıştır.

Ilgili autoit için komutları vermem gerekirse, aşağıdaki sana yeterli olacaktır.
[codebox]Local $Blue_Get_Walpaper = StringStripWS(RegRead('HKCU\Control Panel\Desktop', 'Wallpaper'),3)
DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $Blue_Get_Walpaper, "int", 0)[/codebox]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...