ClientAgent.vbs Script error line:11 Char:5
Hello Peers,
We are getting this error on all desktop XP and maybe others when emd user logs in to PC. See error below I notice this error after accessing the "ClientAgent.vbs" on the server to see it content.
Script:\\melcolocal\SysVol\melco.local\ClientAgent.vbs Line:11 Char:5 Error:The system cannot find the file specified Code:80070002 Source:(null)
the contet is listed
----------------------
Path = UCase(Trim(WScript.Arguments(0)))
set argv = WScript.Argumentsif( Right(Path,4) = ".EXE" ) then
Set WshShell = WScript.CreateObject("WScript.Shell")
args = ""
For i = 0 to argv.Count - 1
args = args & Trim(argv(i)) & " "
NextWshShell.run args,0,True
else
DstPath = UCase(Trim(WScript.Arguments(1)))
set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile Path, DstPath, FALSE
end if
---------------------------------
Can anyone look at this script and see if it different from what is suppose to be?
Smarthost Design Technologies LLC
Smarthost Design Technologies LLC
Answers
- Hi,
The script has two functions.
1. If the first argument is .EXE file, it will compose the shell command as the combination of all but the last parameter. After that, it will execute the shell command
2. If the first argument is not .EXE file, it will perform copy file operation from the source file which is specified by the first argument to the destination file which is specified by the second argument.
Line:11 Char:5 is "WshShell.run args,0,True". It seems that the argument is not correct or cannot be found. Please let us know the detailed parameter for research.
As this issue is related to your custom script, I suggest that you initial a new post in The Official Scripting Guys Forum! to get further support there. They are the best resource for scripting related problems.
The Official Scripting Guys Forum!
http://social.technet.microsoft.com/Forums/en-US/ITCG/threads
Mervyn
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.- Marked As Answer byMervyn ZhangMSFT, ModeratorFriday, October 23, 2009 2:31 AM
All Replies
- This is a Server 2008 R2 forum.
From what I can tell, this script expects to be passed the full path to an .exe file. You need to determine whether that .exe file that is being passed, still exists. - Hi,
The script has two functions.
1. If the first argument is .EXE file, it will compose the shell command as the combination of all but the last parameter. After that, it will execute the shell command
2. If the first argument is not .EXE file, it will perform copy file operation from the source file which is specified by the first argument to the destination file which is specified by the second argument.
Line:11 Char:5 is "WshShell.run args,0,True". It seems that the argument is not correct or cannot be found. Please let us know the detailed parameter for research.
As this issue is related to your custom script, I suggest that you initial a new post in The Official Scripting Guys Forum! to get further support there. They are the best resource for scripting related problems.
The Official Scripting Guys Forum!
http://social.technet.microsoft.com/Forums/en-US/ITCG/threads
Mervyn
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.- Marked As Answer byMervyn ZhangMSFT, ModeratorFriday, October 23, 2009 2:31 AM

