September 7, 200421 yr idle.newbieTried 5 or 6 times with different approaches... cmd doesn't work. Maybe because $Docs don't work in w2k and I have to place it in RunOnceEx, self-extracting archives and so on to get it in Profiles. Or may be there is some difference between applying the tweak in wxp or in w2k. I found that there is only one key in [HKEY_CURRENT_USER\Identities\{85E975CA-5280-4399-86EB-3795B21A5909}\Software\Microsoft\Outlook Express\5.0] before running Outlook express and the others appear after the first run. After applying .cmd the keys I added with two from the original sctript appear and don't change after starting OE but Store Folder.Well, I have to live with .js But anyway I'm really grateful for the idea! I've already added a few tweaks to the script and when I add the last tweak with opening .js scripts by notepad (so that no scripts can run automatically on my machine I'll be done.Best regards,Oleg 2PS By the way, I believe you may difine the WAB location with reg-tweak @T-12. Will check it later.
September 7, 200421 yr OE+WAB, this is all i have, except some dirty acl modification.var WshShell = WScript.CreateObject("WScript.Shell");var fso = WScript.CreateObject("Scripting.FileSystemObject");var home = WshShell.ExpandEnvironmentStrings("%HOME%");if (home == "%HOME%") home="D:\\Home";//check home exist, or create oneif (!fso.folderExists(home)) fso.createFolder(home);//check userHome exist, or create onevar userName = WshShell.ExpandEnvironmentStrings("%USERNAME%");var userHome = home + "\\" + userName;if (!fso.folderExists(userHome)) fso.createFolder(userHome);//check mail strore exist, or create onevar mailDir = userHome + '\\Mail';if (!fso.folderExists(mailDir)) fso.createFolder(mailDir);var oeDir = mailDir + '\\Outlook Express';if (!fso.folderExists(oeDir)) fso.createFolder(oeDir);//check user's address book dir/file exists, or create onevar wabDir = userHome + "\\Address Book";if (!fso.folderExists(wabDir)) fso.createFolder(wabDir);//OE mail store root regTweakvar identities = WshShell.regRead("HKCU\\Identities\\Default User ID");var key = "HKCU\\Identities\\" + identities + "\\Software\\Microsoft\\Outlook Express\\5.0";WshShell.regWrite(key+"\\Store Root", home + "\\%USERNAME%\\Mail\\Outlook Express\\", "REG_EXPAND_SZ");WshShell.regWrite(key+"\\NoSplash", 1, "REG_DWORD");//if wabFile not exist, WAB will create one on %APPDATA%\...\Address Book, need to touch a empty filevar wabFile = wabDir + "\\" + userName + ".wab"if (!fso.fileExists(wabFile)) fso.createTextFile(wabFile);//WAB regTweakWshShell.regWrite("HKCU\\Software\\Microsoft\\WAB\\WAB4\\Wab File Name\\", wabFile);//stubborn regTweakWshShell.regWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SmallIcons\\SmallIcons", 1, "REG_DWORD");WshShell.regWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\StartButtonBalloonTip", 0, "REG_DWORD");WshShell.regWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\ListviewWatermark", 0, "REG_DWORD");//kill itselffso.deleteFile(WScript.ScriptFullName);
September 13, 200421 yr idle.newbieI can confirm that reg-tweak works during unettanded:[HKEY_CURRENT_USER\Software\Microsoft\WAB\WAB4\Wab File Name]@="D:\\Docs\\Safe\\book.wab" and one Address Book is set for all users.I tried to run the .js script in RunOnceEx but it didn't work with wscript command. And it didn't work with cmd /q /c command too - strange? How can one run a .js script from RunOnceEx or should it be a .vbs?Regards,Oleg 2
September 14, 200421 yr WSH has two script engine WScript.exe(windowedDialog) and CScript.exe(cmdline). if your script didn't output any message(WScript.Echo), and runs from RunOnceEx, i'll suggest the WScript.exe.%SystemRoot%\system32\WScript.exe "path\to\your\script" anyArgumentsbut i don't think regTweak @RunOnceEx applies to all users, if you wanna make it to all users, why not add that WAB regTweak to your regTweak.reg @T-12, remember to touch an empty .wab before any user use WAB, or it will fall back to %UserProfile%\blah\blah\userName.wab.touch an empty file @T-12 in .cmd@TYPE>D:\Docs\Safe\book.wab 2>NUL
May 26, 200521 yr Dear friends,The .js script idle.newbie posted here works perfect.A guess batch file also works, I just don't use it at the moment but probably found out were my problem with it was.But now I wonder if it is possible to redirect mail store folder with inf-file?Or could somebody let me know how to define Current User ID in inf?Best regards,Oleg 2
Create an account or sign in to comment