|
RE: error 80070034
"Paul" wrote:
> See below for the code I am running-
>
> The script run and displays a dialog window which reads "completed
> successfully" but then I get another with the error code 80070034, "You were
> not connected because a duplicate name exists on the network. Go to Control
> panel to change the computer name." I'm not sure which computer it is
> referencing.
> The error references line 72 (noted below).
> I know there is one machine per name on the network. Any idea what causes
> this dialog box?
>
> Thanks for the help,
> Paul
>
> ********************
> 'This script:
>
> 'Reads computer names from a text file
>
> 'Copies the installation and configuration scripts,
> 'from a network location to the local machine
>
> 'Connects to the computers in turn
>
> 'Launches install.cmd to start the installation process
>
> 'Before running the script change the scripts folder path, the computer.txt
> path and
> 'the install.cmd path to be correct for the environment
>
> 'Edit the value of CompTxtFile to configure the path to Computers.txt if
> required
> CompTxtFile = "\\remote servername\Disk1\_scan.ePO\scripts\computers.txt"
>
> 'The executable, *.*, needs to be present in the scripts folder
> 'Edit the value of SrcSrv to include the path to the scripts folder on the
> source server
> SrcSrv = "\\remote servername\Disk1\_scan.ePO\scripts"
>
> 'Edit the value of DestPath to include the destination path on the client if
> required
> DestPath = "\c$\temp"
>
> 'Edit the value of ScriptPath to include the path to Install.cmd if required
> ScriptPath = "\c$\temp\install.cmd"
>
> Set FileSys = CreateObject("Scripting.FileSystemObject")
>
> Set File = FileSys.GetFile(CompTxtFile)
>
> Set Words = File.OpenAsTextStream
>
> Do Until Words.AtEndOfStream
> StrComputer = Words.ReadLine
>
> 'The executable, *.*, needs to be present in the scripts folder.
> 'Edit this line to include the path to the scripts folder on the source
> server and the
> 'destination path on the client if required. Note: lines below here do not
> need to be altered.
> **LINE 72 FileSys.CopyFolder SrcSrv, "\\" & strComputer & DestPath, true
>
> Set objWMIService = GetObject("winmgmts:" &
> "{impersonationLevel=impersonate}!\\" _
> & strComputer & "\root\cimv2:Win32_Process")
>
> errReturn = objWMIService.Create("\\" & strComputer & ScriptPath, null,
> null, intProcessID)
>
> If errReturn = 0 Then
> Wscript.Echo "Script ran successfully"
> Else
> Wscript.Echo "The script failed due to error " & errReturn & "."
> End If
> Loop
|