您的位置:首页 > 其它

DS Run Script task gives "Error 1 during script execution"

2008-05-26 11:35 615 查看
Article ID: 19060

DS Run Script task gives "Error 1 during script execution"

Applies To

• Deployment Solution 6.0, 6.1, 6.5, 6.8
Problem/Symptoms

Deployment Solution (DS) Run Script task/job gives "Error 1 during script execution" or possibly "Error 1 during Visual Basic script execution". Also, Error 255 has been related to this.
Environment

Deployment Solution 6.X (all versions)
Cause

Error 1 is essentially a failure of a script batch file to run in Windows/DOS. By default, whether run in Windows or DOS, the Run Script task will essentially open a command prompt and execute the tasks included in the script. Depending on the desired results of this, there may be a number of reasons this error would be generated:

The script is actually a Visual Basic Script (VBS), but is missing the line at the top telling DS that it should be executed as VBS.

The script is correctly executing as VBS, but the syntax in the VBS is in error.

The script has some sort of syntax error, such as an incorrect switch on a command (i.e. running an install with a bad switch)

There may be rights issues.

There may be a DNS issue within the script. If you're using the %DSSERVER% token within your script.

Resolution

To correct these errors, the script must be corrected. Consider as options the following relative to the above listed possible reasons for failure:

If it is a Visual Basic Script (VBS), be sure to include the text 'vbscript at the top of the script as a comment line. For example:
'vbscript - this simply pop-up a box on the client computer
msgbox "Hello World"

If the VBS is actually failing, trouble-shoot the script by copying the text into a true VBS file and testing it on the client computer.

Try copying the text into an actual batch file (that is, .bat, .cmd) and running it on the target computer (you may need to add “pause” lines in the batch file so you can capture errors). This will test the actual commands on the computer and leave the results of those exposed to plain view.

Do as indicated in option 3 above. By exposing the commands to view, this may show if rights are denied.

Verify that the client computer is able to resolve to the NetBIOS name of the DS. In the situation where this was seen, the Run Script would run when using the FQDN of the DS in place of the token but would not run when using the Netbios name in place of the token. The customer resolved the DNS issue and the error went away.

In all cases except for 1, the errors are external to the functionality of Deployment Solution, and should be diagnosed accordingly.

Note: Make sure the Specified user is a Domain or Local admin to run the script some scripts may need admin rights.

The information contained in the Altiris Knowledgebase is subject to the Terms of Use as outlined at http://www.altiris.com/legal/termsofuse.asp.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐