---
title: "Automation Server can't create Object"
author: "JavaFans"
date: "2010-07-02T14:43:39Z"
tags: []
categories: ["Web前端"]
slug: "automation-server-can-t-create-object"
draft: false
lastmod: "2010-07-02T14:43:39Z"
id: 704353
url: "https://javafans.iteye.com/blog/704353"
---

```java

var wshShell = new ActiveXObject("Wscript.Shell");
```

会报错，说：Automation Server can't create Object。

这个是因为IE的安全级别设置问题，修改可以解决：
选择：Internet Explorer , Tools, Internet options, Security, custom level，
选中： enable "Initializing and Script Activex controls not marked as safe" 
通过降低安全级别来正确运行。