Вот то решение которое у меня работает сейчас. на старте работает следующий скрипт:
| Цитата |
|---|
'имя профайла profile_name = "work"
'имена ящиков которые надо подключать Dim accounts(6) accounts(1) = "xxx@mail.ru" accounts(2) = "xxx" accounts(3) = "xxx" accounts(4) = "xxx" accounts(5) = "yyy" accounts(6) = "zzz"
'имена ящиков для которых надо менять настройки 'настройки должны лежать в папке '...\mail\.profiles\имя_профиля\имя_ящика\Account.CFN Dim accounts_profiles(2) accounts_profiles(1) = "xxx@mail.ru" accounts_profiles(2) = "zzz"
set WSHShell = WScript.CreateObject("WScript.Shell") set fso = WScript.CreateObject("Scripting.FileSystemObject")
tb_exe = WSHShell.RegRead("HKCU\Software\RIT\The Bat!\EXE path") tb_mail = WSHShell.RegRead("HKCU\Software\RIT\The Bat!\Working Directory")
for i = 1 to UBound(accounts) WSHShell.RegWrite "HKCU\Software\RIT\The Bat!\Users Depot\User #" & i, accounts(i) WSHShell.RegWrite "HKCU\Software\RIT\The Bat!\Users Depot\Dir #" & i, "" next WSHShell.RegWrite "HKCU\Software\RIT\The Bat!\Users Depot\Count", UBound(accounts), "REG_DWORD"
for i = 1 to UBound(accounts_profiles) fso.CopyFile tb_mail & ".profiles" & profile_name & "" & accounts_profiles(i) & "" & "Account.CFN", _ tb_mail & accounts_profiles(i) & "" next
WSHShell.Run tb_exe |
таких скриптов у меня 2. один для дома, другой для работы