pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eric Borts <eborts@bltek.com>
To: Dharmendra Goyal <dharmendra.goyal@enterprisedb.com>
Cc: Dave Page <dpage@pgadmin.org>
Cc: 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)
Date: Fri, 27 Jan 2012 13:16:00 -0700
Message-ID: <4F230600.7030902@bltek.com> (raw)
In-Reply-To: <4F22FDD8.1020708@bltek.com>
References: <4F209FF1.3080209@bltek.com>
	<CA+OCxoxW9CxCHeAdUEGULJoXzZQiHnePYXA9vsj4eQrvkWsn4Q@mail.gmail.com>
	<4F219D77.9050800@bltek.com>
	<4F21A163.8060004@bltek.com>
	<CA+OCxozr353CoJjsYgbBFZnzo_cyv7Kj4qUaWxOwE1MaZcs+OA@mail.gmail.com>
	<CAOh5NjzpxsxSwKvX=ybeD6DxLh=Z-HR2QJEuZMsJbWrM9Dmdmg@mail.gmail.com>
	<4F22FBC7.2000902@bltek.com>
	<4F22FDD8.1020708@bltek.com>

I found the problem with my computer here 
<http://help.lockergnome.com/windows/BAT-File-Association-Broken--ftopict514456.html;. 
It turns out this registry entry was causing my problem:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat
     \UserChoice
         Progid REG_SZ (Applications\cmd.exe)

Deleting the \UserChoice key restored my context menu and ability to run 
a ".bat" directly instead of using %COMSPEC%.

I am going to un-install an re-install postgres to verify that this 
solves my installation issues.

Eric







On 1/27/2012 12:41 PM, Eric Borts wrote:
> Regarding my final point:
>
> "Similarly, you may prefer to have the default action for a batch file 
> (.bat) changed to Edit instead of Open. Double-clicking the file will 
> not run the commands in the file, and if users want to run the file, 
> they can use the*Open*command on the shortcut menu."
> http://support.microsoft.com/kb/320036
>
> This advice would be likely to hang the PostgreSQL installer.
>
> Cheers,
> Eric
>
>
> On 1/27/2012 12:32 PM, Eric Borts wrote:
>> 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 
>> <http://technet.microsoft.com/en-us/library/ee156605.aspx;). 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 
>> <http://classicasp.aspfaq.com/general/how-do-i-execute-a-dos-command/batch-file/exe-from-asp.html; 
>> 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 
>> <http://stackoverflow.com/questions/9038927/vbscript-hangs-when-launching-batch-file-with-wshell-scri...; 
>> 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
>

view thread (15+ messages)  latest in thread

Message-ID: <4F230600.7030902@bltek.com>
Permalink:  ../4F230600.7030902@bltek.com/
Also on:    postgresql.org/message-id/4F230600.7030902@bltek.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: eborts@bltek.com, dharmendra.goyal@enterprisedb.com, dpage@pgadmin.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)
  In-Reply-To: <4F230600.7030902@bltek.com>
  References: <4F209FF1.3080209@bltek.com> <CA+OCxoxW9CxCHeAdUEGULJoXzZQiHnePYXA9vsj4eQrvkWsn4Q@mail.gmail.com> <4F219D77.9050800@bltek.com> <4F21A163.8060004@bltek.com> <CA+OCxozr353CoJjsYgbBFZnzo_cyv7Kj4qUaWxOwE1MaZcs+OA@mail.gmail.com> <CAOh5NjzpxsxSwKvX=ybeD6DxLh=Z-HR2QJEuZMsJbWrM9Dmdmg@mail.gmail.com> <4F22FBC7.2000902@bltek.com> <4F22FDD8.1020708@bltek.com> <4F230600.7030902@bltek.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox