China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-18 17:25
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Setting Outlook Express path problem View 1,628 Replies 6
Original Poster Posted 2006-11-20 03:05 ·  中国 广东 梅州 电信
中级用户
★★
Credits 421
Posts 111
Joined 2003-08-29 00:00
22-year member
UID 9153
Gender Male
Status Offline
To create a CD to preserve user email data, I plan to move Outlook Express and the address book to drive D. The code used is:
reg add "HKEY_CURRENT_USER\Identities\{F4E98C86-4D9A-463F-920C-1DF555C3B434}\Software\Microsoft\Outlook Express\5.0" /v "Store Root" /t REG_EXPAND_SZ /d "D:\\Personal\\Outlook Express" /f

Has everyone used such code? Actually, there are great limitations. {F4E98C86-4D9A-463F-920C-1DF555C3B434} is different for each system. How to read this value according to the system code?
Also, there is a batch processing solution for the address book problem.
Floor 2 Posted 2006-11-20 04:34 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  To find this, you need to be very familiar with the CLSID of the system registry, but it can still be baidu-ed. =_=   
  I don't know in what form this address book is saved.?
Floor 3 Posted 2006-11-20 04:52 ·  中国 广东 梅州 电信
中级用户
★★
Credits 421
Posts 111
Joined 2003-08-29 00:00
22-year member
UID 9153
Gender Male
Status Offline
I think it should be more practical to read the CLSID and use it as a variable, which makes writing the registry very easy.
Floor 4 Posted 2006-11-20 07:35 ·  中国 陕西 咸阳 电信
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
I provide a fragment of my batch processing for reference:



...

:: Define the storage location of Outlook Express files
set outlook="D:\My Documents\My Mails\Outlook Express"

:: Modify the default save location of Outlook Express
set userid=
tfind > nul
reg query "HKCU\Identities" /v "Default User ID" | tfind "Default User ID" | lmod set USERID= > temp.bat
call temp.bat
del temp.bat
if "%userid%"=="" goto _quit
reg add "HKCU\Identities\%USERID%\Software\Microsoft\Outlook Express\5.0" /v "Store Root" /d %outlook% /f

:_quit
...


This batch processing was written a long time ago. Now it can completely use find or for instead of third-party software like tfind and lmod.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 5 Posted 2006-11-20 08:33 ·  中国 广东 梅州 电信
中级用户
★★
Credits 421
Posts 111
Joined 2003-08-29 00:00
22-year member
UID 9153
Gender Male
Status Offline
This code is relatively complex, and using third-party software is quite troublesome. Can Climbing provide a code that doesn't use third-party software?
Floor 6 Posted 2006-11-20 10:14 ·  中国 陕西 咸阳 电信
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
Replace the following lines in the above batch:


tfind > nul
reg query "HKCU\Identities" /v "Default User ID" | tfind "Default User ID" | lmod set USERID= > temp.bat
call temp.bat
del temp.bat


with:


for /f "usebackq tokens=4,*" %%i in (`reg query "HKCU\Identities" /v "Default User ID" ^| find /i "Default User ID"`) do set UserID=%%j


This way, there are no third-party software.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
ronin +4 2006-11-20 23:29
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 7 Posted 2006-11-20 22:50 ·  中国 广东 梅州 电信
中级用户
★★
Credits 421
Posts 111
Joined 2003-08-29 00:00
22-year member
UID 9153
Gender Male
Status Offline
Thanks Climbing, the code is as follows, including address book backup

:: Modify the default save location of Outlook Express
set userid=
for /f "usebackq tokens=4,*" %%i in (`reg query "HKCU\Identities" /v "Default User ID" ^|

find /i "Default User ID"`) do set UserID=%%j
if "%userid%"=="" goto _quit
reg add "HKCU\Identities\%USERID%\Software\Microsoft\Outlook Express\5.0" /v "Store Root" /d

"D:\Personal Important Data\Outlook Express" /f

:: Modify the default save location of Outlook Express address book
reg add "HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name" /v "" /t REG_SZ /d "D:\Personal Important Data\Outlook Express\Address Book\Administrator.wab" /f >nul 2>nul

:: Transfer Outlook Express address book
xcopy %USERPROFILE%\Application Data\Microsoft\Address Book\*.wab "D:\Personal Important Data\Outlook Express\Address Book" /e /y >nul 2>nul

[ Last edited by ronin on 2006-11-20 at 11:29 PM ]
Forum Jump: