Prev: £74.87 Save: 38% off,Classic Mini UGG Boots,http://www.uggskyonline.com, free shipping, no taxes
Next: Zip Creation through VBScript
From: fu hu on 4 Oct 2010 09:11 Want To Find Cheap shoes ?The Faithworthy Shoes From The Official Appointed Factory In China?Enjoy The Authentic Shoes With the Fake Price!Low to $55,Free Delivery In One Week And No Sale Tax! www.findsoso.com We offer a large rank of shoes. All of them are original level and cheap,either retail or wholesale is accept on findsoso.com,we can offer the lowest price with the Original shoes, if your order is up to 50PCS,the Price will be more favorable.We provid perfect after sale service,Delivery Free and No Sake Tax.Please trust to purchase! www.findsoso.com > On Saturday, May 24, 2008 10:26 AM GM wrote: > I developed a small script that changes the key relative to "My Documents" > folder AFTER the user logon. > It is a win2003 server with citrix metaframe, so many user are connected at > the same time (that's why i have to get the right explorer pid to kill) > I noticed that after changing this key, the actual folder pointed by "My > Documents" is not affected unless the user log off and then back on. > Another way to apply the change, beside logging off/on, is to kill > "explorer.exe" and run it again. > > This is the code: > > Dim WSHShell > Set WSHShell = CreateObject("WScript.Shell") > strComputer = "." > > Set objWMIService = GetObject("winMgmts:\\localhost") > Set colItems = objWMIService.ExecQuery("Select * From Win32_Process where > Name='explorer.exe'") > Dim strUserName, strDomain, pid, base > > base=WScript.Arguments.Item(0) > > For Each objItem in colItems > > objItem.GetOwner strUser, strDomain > > If (strUser=WSHShell.ExpandEnvironmentStrings("%USERNAME%")) Then > pid=objItem.ProcessID > End If > > Next > > WSHShell.RegWrite > "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User > Shell Folders\Personal", "w:\firma\"& base > WSHShell.Run "taskkill /pid "&pid&" /f" > WSHShell.Run "explorer.bat" 'runs explorer.exe > > But i would like to find a way to apply this change without such brutal > killing.. anyone has an idea on how doing this? > > Thank you for your consideration! > Submitted via EggHeadCafe - Software Developer Portal of Choice > Autocorrelation method in C# for signal analysis > http://www.eggheadcafe.com/tutorials/aspnet/d39ee525-a402-46cf-9989-72b7256f76b1/autocorrelation-method-in-c-for-signal-analysis.aspx |