Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Mar 30, 2020 11:32 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Win32 Cscripts fail unless a msgbox preceeds the she.execute
PostPosted: Thu Apr 19, 2012 3:41 pm 
Offline

Joined: Fri Jan 01, 2010 11:11 pm
Posts: 3
I am running RB 4.3 for MacOS Lion and do builds for MacOS and Win32. I then take the Win32 EXE and run it on a PC.

When I try to execute the following script, it fails and returns a null.

sh.execute "Cscript //NOLOGO Space_E.vbs"

When I place a msgbox before the script execution, everything runs fine.

msgbox "dummy message"
sh.execute "Cscript //NOLOGO Space_E.vbs"

In fact, anything other than a msgbox such as my Delay [sec], refresh, etc is no help. Very strange.
Here is the Space.vbs code in case it helps.

' Space.vbs
' Returns free space on drive specified
Dim objWMIservice, objLogicalDisk
Set objWMIservice = GetObject("winmgmts:")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='E:'")
' return result
Wscript.Echo objLogicalDisk.FreeSpace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group