You are here

Redirection of Desktop Folder?

32 posts / 0 new
Last post
solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Redirection of Desktop Folder?

I searched for this, but I didn't find anything resembling it...
Pardon my ignorance if this is sheer fantasy.

In Windows, the Desktop is a special folder in the profile folder of the logged-on user.
In a standard windows install, it is quite easy to redirect the folder in regedit in
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders - Desktop.

We routinely redirect folder paths that would normally be pointing toward the user profile folders so that they go to subfolders in the app directory; and I believe that we also add temporary registry entries, although I'm not sure of the details.

Can this be used to redirect the Desktop folder to a folder on the flash drive?
That could potentially add a portable desktop functionality to the menu without a lot of complex coding. Or maybe it can be done as a separate app, using a simple NSIS launcher.

Does this make sense, or am I just loony?

Drakkim
Offline
Last seen: 7 years 9 months ago
Joined: 2008-10-23 09:43
I'm going to stick my neck

I'm going to stick my neck out a bit and say, yes, it does make sense...

However... There are a number of problems.
1) Yes, some apps do write to the registry, but I'm 99% sure they try to avoid that as a rule.
2) I'm pretty sure you'd need admin access to edit that part of the registry (a no, no for Portable Apps)
3) If your app changed the desktop to a USB drive, and it crashed, or hte power went out, or some jerk kid yanks your thumbdrive out... What happens? How does Explorer cope with that? I'd bet it'd be a bit more than inconvenient.

All that said... I think I'd use the program anyway Wink (so long as I could switch it on and off as I wanted)

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Yeah, I thought of those probs...

Since the Wallpaper switcher in PAP has the tendency to permanently switch the background on the host if there's a crash.

Really, a portable Desktop shouldn't be too hard to make - if you could just have an app that makes a folder with no toolbars or borders, that can have its own background, and always runs maximized.

I made this half-pony, half-monkey monster to please you.

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Well... You can just do a

Well...

You can just do a Win+R and start regedit again Blum

And... I bet I could do it. But I have to see if changing that key in the registry requires administrative privileges.

I've also thought about if the program crashes, or if some dumb kid pulls out your flash drive (My BROTHER!!!) problem. NSIS has a function to finish up some stuff on reboot. So if that happens, rebooting will fix it.

Okay, I'm on ubuntu right now so I'll find out later. This is a really good idea though.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Thanks, gluxon. I appreciate

Thanks, gluxon.
I appreciate it.

I made this half-pony, half-monkey monster to please you.

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 5 months ago
Joined: 2007-01-12 19:22
.

We don't need to change desktop path, we need a virtual desktop Smile
A kind of program that simulates desktop, with wallpaper and icons, running on fullscreen, with PortableApps.com bar instead of Windows one. I think it's not hard to make a program like this.

gmbudwrench
gmbudwrench's picture
Offline
Last seen: 9 months 2 days ago
Joined: 2007-06-25 05:00
May not be

May not be what your looking for (or talking about) but search for convey portable. It redirects to the Documents folder of your PAp and usb stick.

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2007-07-31 15:07
If you're gonna do all that...

Maybe you need a virtual desktop environment. Linux has KDE and GNOME and they can run side by side, maybe not at the same time but they co-exist in a Linux system.

I'm not a programmer, but I've got a pretty wild imagination and I think I know what can and can't be done. Obviously someone who knows better is going to have to whittle this idea down to something more rational.

1) The app suspends explorer.exe or just hides it somehow, and starts a low-level script to check for the presence of the media it came from. Should it not be able to find the media, it restores explorer.exe, cleans up traces of itself, and deletes itself.

2) It then launches a basic shell which supports plugins, includes a basic file manager, and uses the PA.c menu as its launcher.

3) Our basic shell makes a virtual registry and virtual filesystem. Programs can be installed and most of them should work this way, including stuff like .NET.

4) Stuff like wallpapers and screen savers are managed within the shell.

5) Upon exit, everything's neatly packed away inside the app's directory on the removable device, the shell is closed, explorer.exe is restarted, and traces are cleaned up.

How is this a bad plan? Granted, it's far more ambitious than PA.c tends to go for (and almost describes CeeDo, doesn't it?), but seems like what the "virtual desktop" crowd really wants. Me, I'm fine just bringing Firefox and a few apps; the wallpaper switch doesn't even interest me (as) much, but I know some of you guys are looking for more, and this idea seems like the natural evolution of that, no?

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
That's quite a bit more than I'm proposing!

I really don't need a new file manager, or plugins, or any stuff like that.
Windows file system works well enough, and PAP has a built-in wallpaper swapper anyway.

I was thinking, what do I use my desktop for?
90% of the time, it's got files and folders that I'm currently working on; having them visible right on the desktop makes it easy to work with multiple files simultaneously.
In that regard, it really is a glorified folder, but quite useful!

By redirecting the Desktop folder, you automatically hide all the files and folders of the local user account, and replace it with your stuff. And you are simply pointing to a folder on the flash drive.

The other 10% of the time, I put shortcuts on the desktop - that could be an issue, since Windows shortcuts (*.lnk) require a drive letter. But the PA Menu has most of the shortcuts I need anyway.

I guess my point is, I've tried BB and LiteStep, but they are way more complicated than they need to be. I think this is a clean and simple concept that would be much more intuitive.

I made this half-pony, half-monkey monster to please you.

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2007-07-31 15:07
2 steps

1) Right click the desktop and find/select the option to hide the desktop icons. Cleared desktop.

2) Open your documents folder, click on the desktop folder you've made for this purpose, and drag it to the edge of the screen (provided a window isn't maximized). It'll make a toolbar.

Quick fix, included in Windows 2000 and XP at least, perhaps others, and unless you have a lot of files, it should be a good solution. Maybe not as clean, not as stylish, but functional?

Or am I missing the point? I used to do something like that a few years ago and it seems like the technique might be of some use.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
I've tried similar stuff.

I've tried similar stuff.
I've also used Cylog Toolbox, and even made a simple, customizable overlay app called DeskSkin that has its own wallpaper and shortcuts to important folders and apps (that supports relative paths)

But if gluxon is still willing to give it a go, I'd like to see how my Desktop folder redirection idea works out.

Why not?

I made this half-pony, half-monkey monster to please you.

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Yes, I'm still willing to

Yes,

I'm still willing to give it a try.

It's in the HKCU registry section so it shouldn't require admin privs (I just realized that :P).

I have one problem though.

Where does Windows store the folder/icon positions on the desktop?

If I know that, then this program will be really sucessful. Biggrin

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
I'll noodle around

I'll noodle around with RegShot when I get home and see if I can get it to cough up the key.

EDIT: RegShot didn't really show anything definitive - and I did a search for all files, and the only thing that seemed to change was the ntuser.log and software.log - but these are always locked cause the system is using them.

I made this half-pony, half-monkey monster to please you.

Bruce Pascoe
Offline
Last seen: 12 years 10 months ago
Joined: 2006-01-15 16:14
I'm fairly certain folder

I'm fairly certain folder layout information (icon positions, view mode, etc.) is stored in HKCU\Software\Microsoft\Windows\Shell, using a combination of the "BagMRU" and "Bags" keys (The data itself is packed, so good luck decoding it!).

And to complicate matters further, under XP, layout information for folders on removable drives is stored somewhere else--HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams (again, in tandem with StreamMRU)--and possibly in a different format. Incidentally, this is why in XP, doing "Apply to all folders" after changing the viewing settings doesn't carry over to already-visited portable folders, as that function only clears Bags, leaving Streams untouched.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Check my post below

titled "Another piece of the puzzle"

I'm on XP SP3.

I really only needed
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop "ColInfo"
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop "FFlags"
to remember the icon locations.

The biggest problem is that the only way I know to write these settings into the registry is to log off, at which point Windows saves these settings.
I don't know how to isolate that one part of the shutdown procedure to force the save whenever I need to.

I made this half-pony, half-monkey monster to please you.

Jimbo
Offline
Last seen: 4 years 10 months ago
Joined: 2007-12-17 05:43
LiteStep

What you're proposing with suspending explorer.exe and subsuming the entire shell is exactly what LiteStep does, so yes, perfectly possible.

You can find the current beta of the portable version at https://portableapps.com/node/18104 but I'm afraid that you may find the learning curve for using it a little steep.

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Alright... I've found

Alright...

I've found this...

http://www.softwareok.com/?seite=Freeware&SID=DesktopOK&language=english

I've tested it and it works well.

If anybody can find out how it's restoring and saving desktop icon positions, then...

gluxon's awesomely, cool programming skills + solanus's great idea + that dumb freeware program = Portable Desktop.

Yay!

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Excellent!

But I haven't a clue how that freeware program works.
I did find multiple references to a layout.dll and layout.reg file that can be used to save the desktop icon location.
Here's one:
http://www.howtogeek.com/howto/windows-vista/save-and-restore-desktop-ic...
and another:
http://users.rcn.com/taylotr/icon_restore.html

EDIT:Hey, there's another reg entry that controls the appearance of the icons and captions (size, font, etc)
HKCU\Control Panel\Desktop\WindowMetrics

Since it's HKEY CURRENT USER, you probably don't need admin rights for that...

I made this half-pony, half-monkey monster to please you.

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Thanks. I'll look into the

Thanks.

But I still don't know how it's doing it. What registry key is it saving?

I'll look into the second key too.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Another piece of the puzzle...

According to PCTools, windows saves the icon location upon exit.
http://www.pctools.com/guides/registry/detail/152/

I think it may be somewhere in the HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\Bags
They seem to have position location in there.
But it's a real mess in there - if this is it, I don't know that it's worth all that!

Here's what you might do with regshot:
Take a shot and save it.
Move the icons and reboot to save the settings.
Take the second shot and compare.

There's sure to be lots of other crap in there too, but maybe that can narrow it down.

EDIT:Found something!
It seems that Windows saves icon positions to HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop upon exit.

I exported HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\ at bootup to a reg file.
Then I rearranged the icons, and rebooted.
Then I exported the same to another reg file.

I re-imported the first reg file, stopped and started explorer.exe, and voila!
The first icon arrangement appeared!

In this way, I could switch back and forth between icon layouts.

I compared the two, and the only things that were different were
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop "ColInfo"
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop "FFlags"

OK, I think I've earned some ice cream!

I made this half-pony, half-monkey monster to please you.

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2007-07-31 15:07
Unreliable

I played with that stuff a couple years back. It's not as reliable as they let on. It works mostly like they say... until it doesn't and it puts your icons back in some random order. Or you go to restore after a resize messes everything up and it just does a whole lot of nothing. That's always fun. Not trying to spoil the mood, just saying that I was after something like this before, and I think one of those was the one I used.

brum74
Offline
Last seen: 11 years 8 months ago
Joined: 2009-04-11 11:29
Try ProcMon to watch what is going on

This will monitor the registry and file system for changes. It should give you some insight as to what it is doing. You may have to do some sifting through the output.

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Once you go portable...

dragonmage
Offline
Last seen: 1 year 10 months ago
Joined: 2007-01-15 02:25
RocketDock + Stacks Docklet

RocketDock + Stacks Docklet + Substitute Drives should work for what you need.

EDIT: I might remember something about StacksDocklet writing to registry though Sad

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Alright, let me get something

Alright, let me get something clear.

We're not looking for another desktop environment.

A lot of people have been telling us to just use LiteStep or some other program (example: the post above).

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Wanna take this offline?

I don't mind communicating by e-mail if you want to discuss this outside of these posts.
I've got a Q&D way of saving and restoring icon locations using some reg files and a batch file.

I made this half-pony, half-monkey monster to please you.

gluxon
gluxon's picture
Offline
Last seen: 4 years 2 months ago
Developer
Joined: 2008-06-21 19:26
Sure..

I've seen you 1 time on the IRC.

Mind going in again sometime?

jwaxman
Offline
Last seen: 14 years 5 months ago
Joined: 2008-05-13 07:26
TinyDesk

Tiny Desk is a freeware program that comes really close to being perfect for this.
It's freeware and portable but not open source.
By default it shows the icons on the actual desktop but it can be configured to point to another directory.
http://www.xworks.ca/tinydesk/index.html

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Cool, but a little buggy

You can specify a relative path for the folder in the ini file, which is cool - but then it breaks a lot of the basic functions, like drag and drop, context menus, and well, opening files!

You have to specify the drive letter in the folder path in order for it to work correctly.

It uses code from bblean.

If it weren't for the relative path thing, and the fact that you can't set a background image, it could be close.

Thanks!

I made this half-pony, half-monkey monster to please you.

jwaxman
Offline
Last seen: 14 years 5 months ago
Joined: 2008-05-13 07:26
Found another contender -- QuickWayToFolders

http://jacquelin.potier.free.fr/QuickWayToFolders/

One of this small portable open source program's features is the ability to present any folder in a desktop view with arrangeable icons. There are a few things that are less than perfect but its the closest I've seen to the portable desktop for Windows yet.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
Looks cool but

It does not yet support relative paths for the folder!
I've contacted the dev with that feedback.

I made this half-pony, half-monkey monster to please you.

jwaxman
Offline
Last seen: 14 years 5 months ago
Joined: 2008-05-13 07:26
QuickWayToFolders

... and now it does!

The author was very responsive to suggestions for improvements.
As a result it now has relative paths and an "always on bottom" setting.

As a result you can now set this program up just like rainmeter or rainlender. You can really have a full screen or partial screen portable desktop pointing to a folder on your usb drive.

From the author's site:
QuickWayToFolders provides quick folder content access.
The four display possibilites are
- Desktop : Act like your desktop, with possibility of navigate through subfolders
- Small Browser : Act like windows explorer
- Menu : Display folder content in menu
- Multiple Folders Menu : Display multiple folders content in a single menu
Each entry is added to the taskbar notification area (near to windows clock).

http://jacquelin.potier.free.fr/QuickWayToFolders/

t2wave
Offline
Last seen: 15 years 4 months ago
Joined: 2009-04-03 00:24
DeskSkin?

Would this work?
https://portableapps.com/node/18109

It needs work, but it's customizable.

Log in or register to post comments