ConfusedScript
IS-IT--Management
Hey all....What I am trying to do is connect to the c (or d) drive of another pc on my network. Using a batch file I was able to just do Start explorer \\%targetpc%\C$
But I wanted to convert my batch file into a vbscript (eventually in hta...but one step at a time).
What I have is the following....can anyone see anything wrong with this? I left out the part where I prompt the user for the pc name to cut the size down.
Sub MapC()
Set objShell=CreateObject("Wscript.Shell")
Set objNetwork=CreateObject("Wscript.Network")
strremotedrive = "\\" & strcomputer & "\C$"
objShell.run("Explorer" & " " & strremotedrive & "\")
End Sub
Now this works...but is it doing something that I don't see(like leaving an open connection, etc...)?
THanks!
But I wanted to convert my batch file into a vbscript (eventually in hta...but one step at a time).
What I have is the following....can anyone see anything wrong with this? I left out the part where I prompt the user for the pc name to cut the size down.
Sub MapC()
Set objShell=CreateObject("Wscript.Shell")
Set objNetwork=CreateObject("Wscript.Network")
strremotedrive = "\\" & strcomputer & "\C$"
objShell.run("Explorer" & " " & strremotedrive & "\")
End Sub
Now this works...but is it doing something that I don't see(like leaving an open connection, etc...)?
THanks!