[Bug 37895] New: PostgreSQL 9.3 VBScript based post-install steps fail due to parser errors (optional parameter between other parameters, pair of empty commas)
wine-bugs at winehq.org
wine-bugs at winehq.org
Wed Jan 14 16:34:26 CST 2015
https://bugs.winehq.org/show_bug.cgi?id=37895
Bug ID: 37895
Summary: PostgreSQL 9.3 VBScript based post-install steps fail
due to parser errors (optional parameter between other
parameters, pair of empty commas)
Product: Wine
Version: 1.7.34
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: vbscript
Assignee: wine-bugs at winehq.org
Reporter: focht at gmx.net
Distribution: ---
Hello folks,
as the summary says.
Installer log file:
--- snip ---
...
Initialising the database cluster (this may take a few minutes)...
Executing cscript //NoLogo "C:\Program
Files\PostgreSQL\9.3/installer/server/initcluster.vbs" "NT
AUTHORITY\NetworkService" "postgres" "****" "C:\Program Files\PostgreSQL\9.3"
"C:\Program Files\PostgreSQL\9.3\data" 5432 "DEFAULT" 0
Script exit code: 0
Script output:
Script stderr:
--- snip ---
Terminal output with script being executed standalone:
--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/PostgreSQL/9.3/installer/server
$ wine cscript //NoLogo initcluster.vbs
fixme:wscript:set_host_properties ignored L"nologo" switch
fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED
fixme:vbscript:parse_script parser failed around
L"2_OperatingSystem\",,48)\r\n\r\n For Each objItem In colItems\r\n
strVersion = Left(objItem.Version, 3)\r\n Next\r\n WScript.Echo \"
Version:\" & strVersion\r\n\r\n If InStr(strVersion, \".\") > 0 Then\r\n
majorVersion = CInt(Left(strVersion, InStr(strVersion, \".\") - 1"...
fixme:wscript:run_script ParseScriptText failed: 80004005
...
--- snip ---
Script function that fails to parse:
--- snip ---
' Is this Vista or above?
Function IsVistaOrNewer()
WScript.Echo "Called IsVistaOrNewer()..."
Set objWMI = GetObject("winmgmts:\\.\root\cimv2")
If objWMI Is Nothing Then
WScript.Echo " Couldn't create 'winmgmts:\\.\root\cimv2' object"
IsVistaOrNewer=false
ElseIf IsObject(objWMI) Then
WScript.Echo " 'winmgmts' object initialized..."
Else
WScript.Echo " 'winmgmts' object not initialized..."
End If
Set colItems = objWMI.ExecQuery("Select * from Win32_OperatingSystem",,48)
For Each objItem In colItems
strVersion = Left(objItem.Version, 3)
Next
WScript.Echo " Version:" & strVersion
If InStr(strVersion, ".") > 0 Then
majorVersion = CInt(Left(strVersion, InStr(strVersion, ".") - 1))
ElseIf InStr(strVersion, ",") > 0 Then
majorVersion = CInt(Left(strVersion, InStr(strVersion, ",") - 1))
Else
majorVersion = CInt(strVersion)
End If
WScript.Echo " MajorVersion:" & majorVersion
If majorVersion >= 6.0 Then
IsVistaOrNewer = True
Else
IsVistaOrNewer = False
End If
End Function
--- snip ---
The problem is parsing 'SWbemServices.ExecQuery' optional method parameters.
Signature MSDN:
http://msdn.microsoft.com/en-us/library/aa393866%28v=vs.85%29.aspx
--- quote ---
The ExecQuery method of the SWbemServices object executes a query to retrieve
objects. These objects are available through the returned SWbemObjectSet
collection.
This method is called in the semisynchronous mode. For more information, see
Calling a Method.
For an explanation of this syntax, see Document Conventions for the Scripting
API.
Syntax
VB
objWbemObjectSet = .ExecQuery( _
ByVal strQuery, _
[ ByVal strQueryLanguage ], _
[ ByVal iFlags ], _
[ ByVal objWbemNamedValueSet ] _
)
Parameters
strQuery
Required. String that contains the text of the query. This parameter cannot
be blank. For more information on building WMI query strings, see Querying with
WQL and the WQL reference.
strQueryLanguage [optional]
String that contains the query language to be used. If specified, this
value must be "WQL".
iFlags [optional]
Integer that determines the behavior of the query and determines whether
this call returns immediately. The default value for this parameter is
wbemFlagReturnImmediately. This parameter can accept the following values.
Value Meaning
wbemFlagForwardOnly
32 (0x20)
...
Causes WMI to return class amendment data with the base class definition.
For more information, see Localizing WMI Class Information.
objWbemNamedValueSet [optional]
Typically, this is undefined. Otherwise, this is an SWbemNamedValueSet
object whose elements represent the context information that can be used by the
provider that is servicing the request. A provider that supports or requires
such information must document the recognized value names, data type of the
value, allowed values, and semantics.
--- quote ---
'strQueryLanguage' = optional, needs to be passed in between pair of empty
commands as next parameter is explicitly given
'iFlags' = optional, 48 = WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY
(-> forward-only enumerator)
'objWbemNamedValueSet' = optional, no passing needed (last parameter)
$ sha1sum postgresql-9.3.5-3-windows.exe
e47b6569f86466da76199186aa1b63a94f040551 postgresql-9.3.5-3-windows.exe
$ du -sh postgresql-9.3.5-3-windows.exe
53M postgresql-9.3.5-3-windows.exe
$ wine --version
wine-1.7.34-36-g4493323
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list