My script looks like:
<script type="text/vbscript">
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a")
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status
</script>
The idea was to use explorer to open these files. The problem I'm having though is on the line:
Set WshShell = CreateObject("WScript.Shell")
I keep getting the message
ActiveX component can'开发者_高级运维t create object: 'WScript.Shell'
I'm totally confused because this exact same code runs fine if I write it in
a .htm
file.
Why does my browser treat my .asp
page differently than the .html
file?
Performing the following resolved the issue foe me.
Start --> Run --> Type "regsvr32.exe wshom.ocx" [without quotes] --> press enter.
problem solved. need to enable few things in internet options - security-custom level- activx
精彩评论