Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: ZD change user app data store location

  1. #21
    gracedman is offline Special Member
    Join Date
    May 2009
    Posts
    134
    Rep Power
    6

    Default

    Our notes are in comment #14. One does run the installation routine but then one must run the application for each desktop. The changes to the VBS script should be made before running the ZDC for the first time (when the accounts will be configured).
    www.spiritualoutreach.com
    Making Christianity intelligible to secular society

  2. #22
    foobaz is offline Active Member
    Join Date
    Sep 2009
    Posts
    47
    Rep Power
    5

    Default

    Quote Originally Posted by gracedman View Post
    Our notes are in comment #14. One does run the installation routine but then one must run the application for each desktop. The changes to the VBS script should be made before running the ZDC for the first time (when the accounts will be configured).
    OK, I finally got it working! I wasn't sure what your replacement line

    Code:
    sLocalAppDir = oShell.ExpandEnvironmentStrings("%APPDATA%")
    did, so I copied the first several lines from the '------------------------------- main --------------------------------- section in zdrun.vbs to another file, test.vbs, in the same directory, adding your line and commenting out the original line, adding a messagebox function to see what I'd get:

    Code:
    ------------------------------- main ---------------------------------
    
    Set oFso = CreateObject("Scripting.FileSystemObject")
    Set oShellApp = CreateObject("Shell.Application")
    Set oShell = CreateObject("WScript.Shell")
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
    
    sVersion="7.1.4 build 11299"
    aUserDirs = Array("index", "store", "sqlite", "log", "zimlets-properties", "zimlets-deployed")
    aUserFiles = Array("conf\keystore", "profile\prefs.js", "profile\persdict.dat", "profile\localstore.json")
    sScriptPath = WScript.ScriptFullName
    sScriptDir = Left(sScriptPath, InStrRev(sScriptPath, WScript.ScriptName) - 2)
    sAppRoot = oFso.GetParentFolderName(sScriptDir)
    'sLocalAppDir = oFso.getFolder(oShellApp.Namespace(&H1c&).Self.Path).ShortPath
    sLocalAppDir = oShell.ExpandEnvironmentStrings("%APPDATA%")
    MsgBox sLocalAppDir
    The messagebox gave:

    Code:
    C:\Documents and Settings\Administrator\Application Data
    which is slightly different from the original location but I had no control over where it would be. So I added a few lines after the commented out line in zdrun.vbs:

    Code:
    'sLocalAppDir = oFso.getFolder(oShellApp.Namespace(&H1c&).Self.Path).ShortPath
    
    Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    ' Get new location
    Set f = fso.GetFolder("C:\temp\Zimbra")
    ' Display long pathname
    MsgBox f
    ' Set sLocalAppDir to the short DOS 8.3 filename
    sLocalAppDir = f.ShortPath 
    ' Display short pathname
    MsgBox sLocalAppDir
    The messageboxes gave:

    Code:
    C:\temp\Zimbra
    In this case the short and long names are the same but since the short name is called for in the original line, it's best to set sLocalAppDir to the short name in case they are different.

    I made this change before running Zimbra Desktop for the first time. When I ran it, it wrote all data to the new location and not to the original one.

    I deleted the messagebox lines after testing since they were no longer needed.

    So that's it. Your method, or a modification of it, is the only one that worked. I will summarize the whole procedure in a new post for those looking for just the solution.

    Thanks for your help! I could never have done it alone.

    Actually, if I look back at post #17, Inshik1028 did do basically the same thing, but didn't specify where he did it. I put it at the beginning of the file and it did not work. Putting it where you specify did the trick.

  3. #23
    gracedman is offline Special Member
    Join Date
    May 2009
    Posts
    134
    Rep Power
    6

    Default

    Ah, sorry about that - that's because we are using folder redirection - %APPDATA% points to where we redirected the Application Data so that we could centrally manage our users' data and allow them to switch between Windows and Linux desktops. As you found out, you can hard code it to a specific location, too. Glad you got it working! - John
    www.spiritualoutreach.com
    Making Christianity intelligible to secular society

  4. #24
    foobaz is offline Active Member
    Join Date
    Sep 2009
    Posts
    47
    Rep Power
    5

    Default Summary of the solution

    Here is a summary of how to change the default location of all data, including mail, when you first install Zimbra Desktop. Thanks to Inshik1028 and gracedman for their help with this.

    1. Install Zimbra Desktop. Do not start it yet!
    2. Create the new directory where you want the data stored, e.g., D:\Data\Zimbra Desktop .
    3. Open the file, zdrun.vbs, in the installation directory, e.g., C:\Program Files\Zimbra\Zimbra Desktop\win32\, in a text editor.
    4. Find the line:

    Code:
    sLocalAppDir = oFso.getFolder(oShellApp.Namespace(&H1c&).Self.Path).ShortPath
    and comment it out with an apostrophe:

    Code:
    'sLocalAppDir = oFso.getFolder(oShellApp.Namespace(&H1c&).Self.Path).ShortPath
    5. After this line add:

    Code:
    Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(<your new data location name, e.g., "D:\Data\Zimbra Desktop" -- you need the outer quotes here.>)
    sLocalAppDir = f.ShortPath
    So in this example, you would write:

    Code:
    Set f = fso.GetFolder("D:\Data\Zimbra Desktop")
    6. Run Zimbra Desktop and it should now write all data, including mail, to the new location.

    It's that simple.

  5. #25
    Rems29 is offline New Member
    Join Date
    Nov 2011
    Posts
    4
    Rep Power
    3

    Default

    Ok foobaz, it works well.
    But the modification has to be done at each update of ZD !
    Is there a solution to avoid that ?

    Thx

  6. #26
    foobaz is offline Active Member
    Join Date
    Sep 2009
    Posts
    47
    Rep Power
    5

    Default

    Quote Originally Posted by Rems29 View Post
    Ok foobaz, it works well.
    But the modification has to be done at each update of ZD !
    Is there a solution to avoid that ?

    Thx
    If you just upgrade, it should keep the settings including the data location.

    UPDATE:

    I found out the hard way, this is not the case. The new install reverts back to the default location. So don't run the upgrade before making the same changes to the new zdrun.vbs.
    Last edited by foobaz; 09-26-2012 at 07:31 AM.

  7. #27
    alexdyas is offline Junior Member
    Join Date
    Jan 2012
    Posts
    8
    Rep Power
    3

    Default

    Anyone have a solution that works for OSX or Linux?

    Thanks.

    Alex

  8. #28
    alexdyas is offline Junior Member
    Join Date
    Jan 2012
    Posts
    8
    Rep Power
    3

    Default

    Quote Originally Posted by Trein View Post
    Ok, maybe you have to wait a little bit longer.
    Or start thinking about a different solution....

  9. #29
    annahal is offline Banned
    Join Date
    Aug 2014
    Posts
    1
    Rep Power
    0

    Default

    I absolutely love the look and feel of Zimbra but storing mail in the default location is insufficient for our company.

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. desktop zimbra pop3 account data folder location change
    By kirtan in forum General Questions
    Replies: 0
    Last Post: 09-19-2012, 04:37 AM
  2. Change Zimbra Desktop Data location
    By theboina in forum General Questions
    Replies: 2
    Last Post: 06-18-2012, 12:30 AM
  3. ZD change user app data store location
    By zzzperplexed99 in forum Installation Help
    Replies: 0
    Last Post: 11-05-2010, 11:34 AM
  4. UID STORE failed: UID STORE error; can't store that data
    By Metal Hurlant in forum Error Reports
    Replies: 20
    Last Post: 11-25-2008, 09:53 AM
  5. Alternate Index, Store and DB Location?
    By marrotte in forum Administrators
    Replies: 5
    Last Post: 08-16-2008, 05:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •