Jump to content

Recommended Posts

I need to refresh my desktop without closing explorer.exe

I am trying to change the desktop folder, I did this through a registry key, but for the change to happen, I need to restart explorer.exe. Is there another way to do this?

[right]~What can I say, I'm a Simplistic person[/right]

Link to post
Share on other sites

I did just now, and it doesn't work. thanks anyways.

F5 refresh all windows so have you tried :

send("{F5}")

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Link to post
Share on other sites

I know it's not hard. I don't even need to insert the Run("explorer.exe") code. But I don't like the fact that when closing explorer.exe I can't use the taskbar for about 3 seconds, AND all open folder windows close.

[right]~What can I say, I'm a Simplistic person[/right]

Link to post
Share on other sites

Try this:

$Hwnd = WinGetHandle("classname=Progman")
 DllCall("user32.dll", "long", "SendMessage", "hwnd", $hWnd, "int", 0x111, "int", 28931, "int", 0)
No, that is not working. And the code I have so far is relatively simple.

$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()

[right]~What can I say, I'm a Simplistic person[/right]

Link to post
Share on other sites

I need to refresh my desktop without closing explorer.exe

I am trying to change the desktop folder, I did this through a registry key, but for the change to happen, I need to restart explorer.exe. Is there another way to do this?

Hmm... maybe this will helps?

Const $WM_SETTINGCHANGE = 0x001A
Const $HWNDBROADCAST = 0xFFFF
Const $szParam = "Environment"

DllCall("user32.dll", "int", "SendMessage", _
                             "hwnd", $HWNDBROADCAST, _
                             "int", $WM_SETTINGCHANGE, _
                             "int", 0, _
                             "int", $szParam)

Run("rundll32 user32.dll,UpdatePerUserSystemParameters")
Link to post
Share on other sites

Ok, I understand this, but I feel like there must be some way around this... Can't I make explorer.exe recheck those values?

Not that this is a big problem for the functionality of my script, it's just something I'd like to have perfectioned.

[right]~What can I say, I'm a Simplistic person[/right]

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...