Hi,
Google once again proved to be of no help. So I am hoping someone can help me out with something I think is easy.
Const Hidden=0
Const WaitonReturn=True
Dim FSO
Set FSO=CreateObject("Scripting.FileSystemObject")
set objNetwork=CreateObject("Wscript.Network")
Set WshShell=CreateObject("Wscript.Shell")
strComputerName = wshShell.ExpandEnvironmentStrings
wshshell.CurrentDirectory="c:\windows\"
FSO.CopyFile "c:\windows\windowsxp-kb936929-sp3-x86-enu.log", "c:\%computername%.txt"
Set FSO=nothing
What I want is when executing FSO.CopyFile is to have a file created using the actual computername (i.e, Mycomputer.txt). It is not working. Do I need to do read/write with the vb code? Can you give me as example? I just don't know how to code this. Thanks!
Google once again proved to be of no help. So I am hoping someone can help me out with something I think is easy.
Const Hidden=0
Const WaitonReturn=True
Dim FSO
Set FSO=CreateObject("Scripting.FileSystemObject")
set objNetwork=CreateObject("Wscript.Network")
Set WshShell=CreateObject("Wscript.Shell")
strComputerName = wshShell.ExpandEnvironmentStrings
wshshell.CurrentDirectory="c:\windows\"
FSO.CopyFile "c:\windows\windowsxp-kb936929-sp3-x86-enu.log", "c:\%computername%.txt"
Set FSO=nothing
What I want is when executing FSO.CopyFile is to have a file created using the actual computername (i.e, Mycomputer.txt). It is not working. Do I need to do read/write with the vb code? Can you give me as example? I just don't know how to code this. Thanks!