|
Microsoft Usenet > > > Move "My Documents" to another directory by modifying Registry,but it does NOT take effect immediately
View Full Version : Move "My Documents" to another directory by modifying Registry,but it does NOT take effect immediately
Simon 11-02-2005, 04:00 AM Hi all,
I write a program to move "My Document" to another directory,
modifying the Registry Key about it.
("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell
Folders");
("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DocFolderPaths");
and I call RegFlushKey before RegCloseKey. The keys are all changed, but
When I double click the icon on my desktop, it opens the old one.
Is there any other things I should do?
--
Regards,
Simon
Ben-Zion Joselson 11-02-2005, 09:19 AM Hi,
Registry hacks do not take effect immediately. You have to restart the
computer first.
Of course I cannot comment on the Reg modification itself. I am not sure if
it should be done in HKLM or in HKCU for one user only.
If you have chosen to do the move "the hard way" by means of a Registry hack
just in order to become better acquainted with the Registry, why not try to
do the move the way it is usually done (right-click My Documents - Properties
- Target Tab - Move) and compare registry keys and values before and after
the move.
"Simon" wrote:
> Hi all,
>
> I write a program to move "My Document" to another directory,
> modifying the Registry Key about it.
>
> ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell
> Folders");
> ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders");
> ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DocFolderPaths");
>
> and I call RegFlushKey before RegCloseKey. The keys are all changed, but
> When I double click the icon on my desktop, it opens the old one.
>
> Is there any other things I should do?
> --
> Regards,
> Simon
>
>
>
Simon 11-02-2005, 10:25 AM I have the RegMon to monitor the processes accessing Registry.
and I only find the 3 keys I mentioned below. It doesn't take effect
imediately. Is there any trick here?
--
Regards,
Simon
"Ben-Zion Joselson" <BenZionJoselson@discussions.microsoft.com> wrote in
message news:89F398E5-09C2-4627-AFEA-D0239F6E4578@microsoft.com...
> Hi,
>
> Registry hacks do not take effect immediately. You have to restart the
> computer first.
>
> Of course I cannot comment on the Reg modification itself. I am not sure
> if
> it should be done in HKLM or in HKCU for one user only.
>
> If you have chosen to do the move "the hard way" by means of a Registry
> hack
> just in order to become better acquainted with the Registry, why not try
> to
> do the move the way it is usually done (right-click My Documents -
> Properties
> - Target Tab - Move) and compare registry keys and values before and after
> the move.
>
> "Simon" wrote:
>
>> Hi all,
>>
>> I write a program to move "My Document" to another directory,
>> modifying the Registry Key about it.
>>
>> ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell
>> Folders");
>> ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell
>> Folders");
>>
>> ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DocFolderPaths");
>>
>> and I call RegFlushKey before RegCloseKey. The keys are all changed, but
>> When I double click the icon on my desktop, it opens the old one.
>>
>> Is there any other things I should do?
>> --
>> Regards,
>> Simon
>>
>>
>>
Mark V 11-03-2005, 01:00 AM In microsoft.public.win2000.registry Simon wrote:
> I have the RegMon to monitor the processes accessing Registry.
> and I only find the 3 keys I mentioned below. It doesn't take
> effect imediately. Is there any trick here?
If per-user (HKCU), logoff and logon.
Simon 11-03-2005, 07:05 AM But if I right-click on My Document icon, select Property, Move,
when finishing , it takes effect right now. I am wondering if
there is any way to accomplish without re-logon.
--
Regards,
Simon
"Mark V" <notvalid@nul.invalid> wrote in message
news:Xns9702CB97B96CFz9zzaQ2btw@msnews.microsoft.com...
> In microsoft.public.win2000.registry Simon wrote:
>
>> I have the RegMon to monitor the processes accessing Registry.
>> and I only find the 3 keys I mentioned below. It doesn't take
>> effect imediately. Is there any trick here?
>
> If per-user (HKCU), logoff and logon.
>
>
>
Mark V 11-03-2005, 06:05 PM In microsoft.public.win2000.registry Simon wrote:
> But if I right-click on My Document icon, select Property, Move,
> when finishing , it takes effect right now. I am wondering if
> there is any way to accomplish without re-logon.
You could *try* killing and restarting the explorer.exe shell.
Not certain that will do it though. There are also some utilities
that can update user/system settings on demand... I'll see if I can
find the one I am thinking of.
Or try
%systemroot%\System32\rundll32 %systemroot%\System32\user32.dll,UpdatePerUserSystemParameters
....perhaps that will work. I do not know for sure.
But really, use 1 Admin account to "fix" all the other accounts,
reboot, then another Admin account to fix" the first one would be
my method. And only after a Full Registry Backup and files backups FWIW.
Simon 11-04-2005, 02:32 AM I tried rundll32 user32.dll,UpdatePerUserSystemParameter,
but it didn't help. Thanks any way.
Actually,I dont wanna reboot,because my program is
a plug-and-play one.
Killing the process explorer.exe is not a good way
I think.
I am run out...
--
Regards,
Simon
"Mark V" <notvalid@nul.invalid> wrote in message
news:Xns9703853CB2586z9zzaQ2btw@msnews.microsoft.com...
> In microsoft.public.win2000.registry Simon wrote:
>
>> But if I right-click on My Document icon, select Property, Move,
>> when finishing , it takes effect right now. I am wondering if
>> there is any way to accomplish without re-logon.
>
> You could *try* killing and restarting the explorer.exe shell.
> Not certain that will do it though. There are also some utilities
> that can update user/system settings on demand... I'll see if I can
> find the one I am thinking of.
>
> Or try
> %systemroot%\System32\rundll32
> %systemroot%\System32\user32.dll,UpdatePerUserSystemParameters
> ...perhaps that will work. I do not know for sure.
>
>
> But really, use 1 Admin account to "fix" all the other accounts,
> reboot, then another Admin account to fix" the first one would be
> my method. And only after a Full Registry Backup and files backups FWIW.
|
|
|