#1
|
|||
|
|||
Can't use Wscript.Shell when moved to Win7 x64
Hello, I have a problem with this script i have ported.
We recently updated from winxp x32 to win7 x64, and my vbscript command is having problems running cmd commands. If i manually copy and paste the command, it works fine in cmd, but if i run it through vbscript wshell, it fails. I'm using VB 7.7a, do i need to upgrade? Thats the only thing i can think of that might cause it. Here's what a snip of the code looks like: Code:
Function ExecuteCommand(command) Dim oShell Set oShell = WScript.CreateObject("WSCript.shell") Builder.LogMessage "Executing command: " & command Builder.LogMessage "---------------------------------" Set result = oShell.Exec(command) Builder.LogMessage "---Console Output:" With result Do While .Status = 0 WScript.Sleep 10 Do While Not .StdOut.AtEndOfStream Builder.LogMessage "| " & .StdOut.ReadLine Loop Loop End With Builder.LogMessage "---------------------------------" End Function |
Thread Tools | |
Display Modes | Rate This Thread |
|
|