Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id E40E31259185 for ; Fri, 27 Jan 2012 15:32:44 -0400 (AST) Received: from omr11.networksolutionsemail.com ([205.178.146.61]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RqrXL-0001UN-Q9 for pgsql-bugs@postgresql.org; Fri, 27 Jan 2012 19:32:44 +0000 Received: from cm-omr3 (mail.networksolutionsemail.com [205.178.146.50]) by omr11.networksolutionsemail.com (8.13.8/8.13.8) with ESMTP id q0RJWPGa021551 for ; Fri, 27 Jan 2012 14:32:26 -0500 Authentication-Results: cm-omr3 smtp.user=eborts@bltek.com; auth=pass (CRAM-MD5) X-Authenticated-UID: eborts@bltek.com Received: from [64.25.231.138] ([64.25.231.138:50815] helo=[192.168.2.112]) by cm-omr3 (envelope-from ) (ecelerity 2.2.2.41 r(31179/31189)) with ESMTPSA (cipher=AES256-SHA) id FC/B8-04181-8CBF22F4; Fri, 27 Jan 2012 14:32:25 -0500 Message-ID: <4F22FBC7.2000902@bltek.com> Date: Fri, 27 Jan 2012 12:32:23 -0700 From: Eric Borts User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Dharmendra Goyal CC: Dave Page , pgsql-bugs@postgresql.org Subject: Re: Windows x86-64 One-Click Install (9.1.2-1, 9.0.6-1) hangs on "initialising the database cluster" (with work-around) References: <4F209FF1.3080209@bltek.com> <4F219D77.9050800@bltek.com> <4F21A163.8060004@bltek.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------070406060208080101030804" X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/204 X-Sequence-Number: 32271 This is a multi-part message in MIME format. --------------070406060208080101030804 Content-Type: multipart/alternative; boundary="------------090504060107080801060900" --------------090504060107080801060900 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Dave and Dharmendra, It is not the "%COMSPEC% /c" call that causes the window to popup, but the WindowStyle parameter to WShell.Run (see Table 3.9 in MS TechNet WSH Objects / Running Programs ). Setting WindowStyle to "0" creates a hidden window. This is how the code in the installer is currently written. Setting it to "1" creates a visible window. This happens when using "%COMSPEC% /c" or when calling the batch file directly. Here is a another site recommending the use of "%COMSPEC% /c" with a "0" second parameter, along with a note about the window (in)visibility: "[...] do not run any command that raises a prompt, dialog, msgbox or any other GUI. This [...] could hang your entire system (since the invisible GUI will be waiting for a reply [...]" Test code is attached that demonstrates using COMSPEC with a "0" versus a "1". Output from SET command is also attached. Note that I've verified that this problem still occurs in Safe Mode. Any other suggestions? I've also posted to StackOverflow for adivce. A separate line of reasoning for using COMSPEC is that the calling of the .bat directly assumes that default action is to execute the batch file. If a user has modified their default .bat actions (which I have not), the postgres installer will fail. Using COMSPEC will avoid that pitfall. I'll keep you posted if I discover why my machine doesn't execute batch files by default, or how it ended up in this condition. The computer is only about 2 months old, so I haven't had *that* much time to overwhelm it with installs. Eric On 1/27/2012 3:15 AM, Dharmendra Goyal wrote: > Installer works at our end without any issue. > > I remember we had considered using "%COMSPEC% /c" earlier but dropped > it because command windows opens up for every new file execution. > > On Fri, Jan 27, 2012 at 3:40 PM, Dave Page > wrote: > > iirc, using %COMSPEC% /c will cause the scripts to run in a visible > command window, which is pretty ugly, and doesn't seem to be necessary > anywhere except on your machine! > > What's the output from the "set" command on that box? > > On Thu, Jan 26, 2012 at 6:54 PM, Eric Borts > wrote: > > Also, here is a link to the same issue on StackOverflow: > > > http://stackoverflow.com/questions/3559719/wscript-shell-run-doesnt-work-consistently > > > > Also solved using %COMSPEC% /c, though it doesn't say why this > is a problem. > > > > Cheers, > > Eric > > > > > > On 1/26/2012 11:37 AM, Eric Borts wrote: > > > > On 1/26/2012 1:17 AM, Dave Page wrote: > > > > Dharmendra, can you look into this please? > > > > Eric, is there anything unusual about the configuration of your > > machine? Suffice it to say, this doesn't normally happen. > > > > Hi Dave, I'm guessing the answer to that question is "yes". The > machine came > > preinstalled with Norton Internet Security, but this was turned > off when I > > ran the install. After further investigation to the .bat file, I > realized > > that I am also missing the "Edit" option when I right click a > batch file. > > > > I investigated, uninstalled stuff, disabled a lot of stuff in my > registry, > > and nearly bricked my computer. After three hours, I'm going to > have to ask > > for suggestions. Here's what I found/tried: > > > > 1. uninstalled Norton Internet Security (and rebooted) > > 2. uninstalled Acrobat Reader > > 3. disabled all ContextMenuHandlers by > > a. renaming HKCR/*/shellex to oldshellex > > b. renaming HKCR/AllFileSystemsObjects/shellex to oldshellex > > c. tried, but was unable to rename HKCR/batfile/ShellEx, so > renamed > > HKCR/batfile/ShellEx/ContextMenuHandlers to oldContextMenuHandlers > > 4. disabled all non-Microsoft shell extensions using ShellExView > > 5. rebooted - computer bricked (black screen when Windows should > be loading) > > 6. booted in safe mode > > 7. tested script (from my original response) and right click. > > a. no Edit option in batch file context menu > > b. script hung as before > > 8. Undid steps 3 and 4 in safe mode > > 9. Rebooted - booted into windows properly > > 10. Still no Edit in context menu and script still hangs > > > > I'm open to suggestions. I think it might be related to Edit > menu missing > > from my batch file, as this is the only odd thing that I can > tell about my > > machine. I have another similar machine (earlier model Vaio) > that both has > > the Edit menu and runs the test script successfully. I compared the > > HKCR/batfile registry trees (using TortoiseSVN diff) and they > are identical. > > Short of comparing the entire registry I'm at a loss. > > > > Would it be too dangerous to use WScript.Shell.Exec or to use > > WScript.Shell.Run "%COMPSEC% /c" ? This has been an 11 hour > struggle for me > > so far, and I know at least a few others have had this same > problem. Here is > > a link to my work around on enterprisedb. > > > > Thanks, > > Eric > > > > Reference Links: > > > http://www.pcreview.co.uk/forums/edit-print-open-missing-shell-context-menu-cmd-and-bat-files-t2551124.html > > http://windowsxp.mvps.org/slowrightclick.htm > > http://www.nirsoft.net/utils/shexview.html > > > > > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > > > -- > Dharmendra Goyal > Senior Software Engineer > EnterpriseDB Corporation > The Enterprise Postgres Company > > Phone: +91-20-30589493 > Mobile: +91-9552103323 > > Website: http://www.enterprisedb.com > EnterpriseDB Blog: http://blogs.enterprisedb.com/ > Follow us on Twitter: http://www.twitter.com/enterprisedb > > This e-mail message (and any attachment) is intended for the use of > the individual or entity to whom it is addressed. This message > contains information from EnterpriseDB Corporation that may be > privileged, confidential, or exempt from disclosure under applicable > law. If you are not the intended recipient or authorized to receive > this for the intended recipient, any use, dissemination, distribution, > retention, archiving, or copying of this communication is strictly > prohibited. If you have received this e-mail in error, please notify > the sender immediately by reply e-mail and delete this message. > --------------090504060107080801060900 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Dave and Dharmendra,

It is not the "%COMSPEC% /c" call that causes the window to popup, but the WindowStyle parameter to WShell.Run (see Table 3.9 in MS TechNet WSH Objects / Running Programs). Setting WindowStyle to "0" creates a hidden window. This is how the code in the installer is currently written. Setting it to "1" creates a visible window. This happens when using "%COMSPEC% /c" or when calling the batch file directly.

Here is a another site recommending the use of "%COMSPEC% /c" with a "0" second parameter, along with a note about the window (in)visibility:

    "[...] do not run any command that raises a prompt, dialog, msgbox or any other GUI. This [...] could hang your entire system (since the invisible GUI will be waiting for a reply [...]"

Test code is attached that demonstrates using COMSPEC with a "0" versus a "1".

Output from SET command is also attached. Note that I've verified that this problem still occurs in Safe Mode.

Any other suggestions? I've also posted to StackOverflow for adivce.

A separate line of reasoning for using COMSPEC is that the calling of the .bat directly assumes that default action is to execute the batch file. If a user has modified their default .bat actions (which I have not), the postgres installer will fail. Using COMSPEC will avoid that pitfall.

I'll keep you posted if I discover why my machine doesn't execute batch files by default, or how it ended up in this condition. The computer is only about 2 months old, so I haven't had *that* much time to overwhelm it with installs.

Eric




On 1/27/2012 3:15 AM, Dharmendra Goyal wrote:
Installer works at our end without any issue. 

I remember we had considered using "%COMSPEC% /c" earlier but dropped it because command windows opens up for every new file execution.

On Fri, Jan 27, 2012 at 3:40 PM, Dave Page <dpage@pgadmin.org> wrote:
iirc, using %COMSPEC% /c will cause the scripts to run in a visible
command window, which is pretty ugly, and doesn't seem to be necessary
anywhere except on your machine!

What's the output from the "set" command on that box?

On Thu, Jan 26, 2012 at 6:54 PM, Eric Borts <eborts@bltek.com> wrote:
> Also, here is a link to the same issue on StackOverflow:
> http://stackoverflow.com/questions/3559719/wscript-shell-run-doesnt-work-consistently
>
> Also solved using %COMSPEC% /c, though it doesn't say why this is a problem.
>
> Cheers,
> Eric
>
>
> On 1/26/2012 11:37 AM, Eric Borts wrote:
>
> On 1/26/2012 1:17 AM, Dave Page wrote:
>
> Dharmendra, can you look into this please?
>
> Eric, is there anything unusual about the configuration of your
> machine? Suffice it to say, this doesn't normally happen.
>
> Hi Dave, I'm guessing the answer to that question is "yes". The machine came
> preinstalled with Norton Internet Security, but this was turned off when I
> ran the install. After further investigation to the .bat file, I realized
> that I am also missing the "Edit" option when I right click a batch file.
>
> I investigated, uninstalled stuff, disabled a lot of stuff in my registry,
> and nearly bricked my computer. After three hours, I'm going to have to ask
> for suggestions. Here's what I found/tried:
>
> 1. uninstalled Norton Internet Security (and rebooted)
> 2. uninstalled Acrobat Reader
> 3. disabled all ContextMenuHandlers by
>     a. renaming HKCR/*/shellex to oldshellex
>     b. renaming HKCR/AllFileSystemsObjects/shellex to oldshellex
>     c. tried, but was unable to rename HKCR/batfile/ShellEx, so renamed
> HKCR/batfile/ShellEx/ContextMenuHandlers to oldContextMenuHandlers
> 4. disabled all non-Microsoft shell extensions using ShellExView
> 5. rebooted - computer bricked (black screen when Windows should be loading)
> 6. booted in safe mode
> 7. tested script (from my original response) and right click.
>     a. no Edit option in batch file context menu
>     b. script hung as before
> 8. Undid steps 3 and 4 in safe mode
> 9. Rebooted - booted into windows properly
> 10. Still no Edit in context menu and script still hangs
>
> I'm open to suggestions. I think it might be related to Edit menu missing
> from my batch file, as this is the only odd thing that I can tell about my
> machine. I have another similar machine (earlier model Vaio) that both has
> the Edit menu and runs the test script successfully. I compared the
> HKCR/batfile registry trees (using TortoiseSVN diff) and they are identical.
> Short of comparing the entire registry I'm at a loss.
>
> Would it be too dangerous to use WScript.Shell.Exec or to use
> WScript.Shell.Run "%COMPSEC% /c" ? This has been an 11 hour struggle for me
> so far, and I know at least a few others have had this same problem. Here is
> a link to my work around on enterprisedb.
>
> Thanks,
> Eric
>
> Reference Links:
> http://www.pcreview.co.uk/forums/edit-print-open-missing-shell-context-menu-cmd-and-bat-files-t2551124.html
> http://windowsxp.mvps.org/slowrightclick.htm
> http://www.nirsoft.net/utils/shexview.html
>
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



--
Dharmendra Goyal
Senior Software Engineer
EnterpriseDB Corporation
The Enterprise Postgres Company

Phone: +91-20-30589493
Mobile: +91-9552103323

Website: http://www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.


--------------090504060107080801060900-- --------------070406060208080101030804 Content-Type: application/x-zip-compressed; name="window_test.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="window_test.zip" UEsDBBQAAAAAACpdO0AGkmoNEwAAABMAAAAWAAAAd2luZG93X3Rlc3QvZG9waW5nLl9hdHBp bmcgd3d3Lmdvb2dsZS5jb21QSwMEFAAAAAgAt1g7QOof0KhgAAAAdQAAABkAAAB3aW5kb3df dGVzdC9ub193aW5kb3cuX2Jzc8nMVchPygrOSM3J4eUKTi2B8xRsFcKDk4syC0r0nItSE0tS /ZOyUpNLNJRgomBVSpq8XD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2luZG93X3Rlc3Qvd2luZG93X3Rlc3QuX2F0UEsFBgAAAAAFAAUAhQEA AG4CAAAAAA== --------------070406060208080101030804 Content-Type: text/plain; name="_set.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="_set.txt" ALLUSERSPROFILE=3DC:\ProgramData APPDATA=3DC:\Users\Eric\AppData\Roaming AWE_DIR=3DC:\Program Files (x86)\Khrona LLC\Awesomium SDK\1.6.3\ com.adobe.versioncue.client.applocale=3Den_US com.adobe.versioncue.client.appname=3DAdobeDrive com.adobe.versioncue.client.appversion=3D1.0.0 CommonProgramFiles=3DC:\Program Files\Common Files CommonProgramFiles(x86)=3DC:\Program Files (x86)\Common Files CommonProgramW6432=3DC:\Program Files\Common Files COMPUTERNAME=3DERIC-VAIO ComSpec=3DC:\Windows\system32\cmd.exe configsetroot=3DC:\Windows\ConfigSetRoot FDEVELOP_PATH=3DC:\Program Files (x86)\FlashDevelop FLEX_SDK_PATH=3Dd:\Bin\flex_sdk\4.1.0.16076 FP_NO_HOST_CHECK=3DNO HAXEPATH=3DD:\Bin\haxe\2_07 HOMEDRIVE=3DC: HOMEPATH=3D\Users\Eric LAMEPATH=3DD:\code\lib\lame\3_99 LOCALAPPDATA=3DC:\Users\Eric\AppData\Local LOGONSERVER=3D\\ERIC-VAIO NUMBER_OF_PROCESSORS=3D8 OS=3DWindows_NT Path=3DC:\Program Files (x86)\ActiveState Komodo Edit 6\;C:\Program Files= \Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common= Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corpor= ation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbe= m;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bl= uetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:= \Program Files\Broadcom\WHL\;C:\Program Files\Broadcom\WHL\syswow64;C:\Pr= ogram Files\Broadcom\WHL\SysWow64\;C:\Program Files\Broadcom\WHL\SysWow64= \syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Prog= ram Files (x86)\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin;D:\B= in\haxe\2_07;C:\Program Files (x86)\Autodesk\Backburner\;D:\Bin\Python;C:= \Program Files (x86)\Graphviz 2.28\bin;D:\code\lib\lame\3_99;C:\Program F= iles\Microsoft Windows Performance Toolkit\;C:\Program Files\sox\14.3.2;C= :\Program Files (x86)\7-Zip;C:\PostgreSQL\9.1\bin PATHEXT=3D.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=3DAMD64 PROCESSOR_IDENTIFIER=3DIntel64 Family 6 Model 42 Stepping 7, GenuineIntel= PROCESSOR_LEVEL=3D6 PROCESSOR_REVISION=3D2a07 ProgramData=3DC:\ProgramData ProgramFiles=3DC:\Program Files ProgramFiles(x86)=3DC:\Program Files (x86) ProgramW6432=3DC:\Program Files PROMPT=3D$P$G PSModulePath=3DC:\Windows\system32\WindowsPowerShell\v1.0\Modules\ PUBLIC=3DC:\Users\Public SESSIONNAME=3DConsole SystemDrive=3DC: SystemRoot=3DC:\Windows TEMP=3DC:\Users\Eric\AppData\Local\Temp TMP=3DC:\Users\Eric\AppData\Local\Temp USERDOMAIN=3DERIC-VAIO USERNAME=3DEric USERPROFILE=3DC:\Users\Eric VS100COMNTOOLS=3DC:\Program Files (x86)\Microsoft Visual Studio 10.0\Comm= on7\Tools\ VS90COMNTOOLS=3DC:\Program Files (x86)\Microsoft Visual Studio 9.0\Common= 7\Tools\ windir=3DC:\Windows windows_tracing_flags=3D3 windows_tracing_logfile=3DC:\BVTBin\Tests\installpackage\csilogfile.log XNAGSShared=3DC:\Program Files (x86)\Common Files\Microsoft Shared\XNA\ XNAGSv4=3DC:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\ --------------070406060208080101030804--