And if you want the extension on the file Set oResult = oRSOP.GenerateReportToFile (oGpConst.ReportHTML, strPath & userName & “.html”)
From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of slkissin...@sbcglobal.net Sent: Monday, July 21, 2014 2:37 PM To: scripting@lists.myitforum.com Subject: Re: [scripting] VBScript Write file to Network path strPath = “\\Myserver\MyShare\<file:///\\Myserver\MyShare\>” instead of what strpath= now From: Marcum, John<mailto:jmar...@babc.com> Sent: Monday, July 21, 2014 1:27 PM To: scripting@lists.myitforum.com<mailto:scripting@lists.myITforum.com> What would I need to change in order for this script to a the file named userName.html to the path \\myserver\myshare<file:///\\myserver\myshare>? Dim objNetwork Dim userName Set objNetwork = CreateObject("WScript.Network") userName = objNetwork.UserName Set oGpm = CreateObject("GPMGMT.GPM") Set oGpConst = oGpm.GetConstants() Set oRSOP = oGpm.GetRSOP( oGpConst.RSOPModeLogging, "" , 0) strpath = Left(Wscript.ScriptFullName, InStrRev(Wscript.ScriptFullName,"\", -1, vbTextCompare) ) oRSOP.LoggingFlags = 0 oRSOP.CreateQueryResults() Set oResult = oRSOP.GenerateReportToFile (oGpConst.ReportHTML, strPath & userName) oRSOP.ReleaseQueryResults() WScript.Echo "Complete" WScript.Quit() ________________________________ John Marcum MCITP, MCTS, MCSA Desktop Architect Bradley Arant Boult Cummings LLP ________________________________ [H_Logo] ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer.