Link to home
Start Free TrialLog in
Avatar of Lab_Rat
Lab_RatFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Changing "My Documents" Location

Is it possible?
My G/F is making a little front end bit for the open access machines that 'logs in' a user (not really). It just changes the "My Documents" path, by adding a sub folder to it.

Well she changes the reg keys for Word, and Excel... etc... from: (P = My Documents)

P:/  to  P:/JohnBlogs
But it only works on those specific things.
We need it more global!

So the question: Is there a hack to make Windows use a subfolder of 'My Documents'... *AS* the root of 'My Documents'?
Avatar of jkr
jkr
Flag of Germany image

I'm not sure how that is related to MFC, but you'd change the value of 'Personal' under 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders'
Avatar of Lab_Rat

ASKER

Eeek, checked it out...

'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' = c:/

Yet the 'My Docs' folder is P:/ (A network folder)!!! When you look at it's propertise on the desktop.

Most amazingly awesome.

What does that mean?
Avatar of Lab_Rat

ASKER

Ah... after testing....

Opening Word changes the key back to what it was!
Er, Explorer ignores it.

Evil Windows.
You should log out and back in again. Apart from using the registry directly, TweakUI from MS (http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx) can change that.
You can change it by right clicking the My Documents folder on the desktop and setting the path there or else changing the following registry key

'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal

Avatar of Lab_Rat

ASKER

"You can change it by right clicking the My Documents folder on the desktop and setting the path there"

Hm, not good if your using VC 6++ in VisualStudio. =S

The logging out and in option again...not good.

The key question is, how does the code for right clicking on My Documents do what it does, it's more than just changing the single registry key... some apps don't appear to recognise the change.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lab_Rat

ASKER

julianH, thanks... that's what we both got after reseqarch too...SHSetFolderPath has about only 16 links in google!!!
Avatar of Lab_Rat

ASKER

Seems MS don't publish the shell32.dll API anywere no more... Visual C++ Windows Shell Programming by Dino Esposito, Wrox Press 1998 costs £170 second hand as it's not printed anymore.
Though there's a PDF kicking around.
you are welcome - thanks for the points