Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-09-2013, 09:50 AM
makotech222 makotech222 is online now
Registered User
 
Join Date: 10-01-2013
Posts: 2
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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 02:21 AM.


Copyright © 1999-2023 Kinook Software, Inc.