ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Change Desktop Folder

<< < (4/11) > >>

belkira:
as far as I can tell, that link only shows how to "refresh" the desktop same as pressing F5.

I tried the code in the script, but it didnt work. So back to my original thought, I don't think there is
a way to reload the desktop with the new folder without killing explorer.exe.

Again if I am wrong please let me know.

icekin:
I tried changing the folder using TweakUI. What ever files I saved to desktop got sent to that folder. Moreover, the did not show on the actual desktop anymore. It seems like C:\Documents and Settings\<User>\Desktop is the only folder whose contents are displayed as icons on the actual desktop. Anyone else had this problem?

togikun:
Here, try this. It should work. (At least it worked on my computer, running Windows XP SP2)


--- ---;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
;
;
; Script Function:
; Change the location of the Default Desktop Folder through right-click menu on the systray icon.
;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
Regread, current, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop
GoSub,INIREAD
GoSub,TRAYMENU

INIREAD:
IfNotExist,%A_ScriptName%.ini
{
  IniWrite,%current%,%A_ScriptName%.ini,Locations,dir1
  IniWrite,Location 2,%A_ScriptName%.ini,Locations,dir2
  IniWrite,Location 3,%A_ScriptName%.ini,Locations,dir3
  IniWrite,Location 4,%A_ScriptName%.ini,Locations,dir4
}
IniRead,dir1,%A_ScriptName%.ini,Locations,dir1
IniRead,dir2,%A_ScriptName%.ini,Locations,dir2
IniRead,dir3,%A_ScriptName%.ini,Locations,dir3
IniRead,dir4,%A_ScriptName%.ini,Locations,dir4
Return




TRAYMENU:

Menu,Tray,NoStandard
Menu,Tray,DeleteAll
Menu,Tray,Add,%current%,CURRENT
Menu,Tray,Add,
Menu,Tray,Add,"%dir1%",DIR1
Menu,Tray,Add,"%dir2%",DIR2
Menu,Tray,Add,"%dir3%",DIR3
Menu,Tray,Add,"%dir4%",DIR4
Menu,Tray,Add,
Menu,Tray,Add,Edit,EDIT
Menu,Tray,Add,Reload,RELOAD
Menu,Tray,Add,
Menu,Tray,Add,E&xit,EXIT
Menu,Tray,Tip,%A_ScriptName%
Menu,Tray,Check,%current%
Return

CURRENT:

DIR1:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir1%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR2:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir2%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR3:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir3%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntP, 0)
Reload
Return

DIR4:
RegWrite, REG_EXPAND_SZ, HKCU, Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, Desktop, %dir4%
DllCall("Shell32\SHChangeNotify", UInt, 0x08000000, UInt, 0, UIntP, 0, UIntÃ…, 0)
Reload
Return

EDIT:
Runwait,%A_ScriptName%.ini
Return

RELOAD:
Reload

EXIT:
ExitApp

apfel:
Looks like the script, which belkira already made?
No, Desktop refresh with new Files/Folders of new Location.

Edit: User with Vista can test this jap. program for this purpose.
http://fox.flop.jp/tool/deskchange.zip

1.Right-click on icon in systray. Second Menu Item Options.
2 New window with 3 buttons below and one in the middle. Click on middle one to add a new DesktopLocation.
First field: FolderLocation.Second field: wallpaper for new Desktop Location.

togikun:
The code i pasted is a modified version of belkiras script. I added a call to SHChangeNotify, which forces explorer to refresh the desktop. And like I said, it works on my computer perfectly (the original script needed a manual refresh, either by F5 or by restarting explorer. this version doesn't)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version