
Originally Posted by
gracedman
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:
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.