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."
This advice would be likely to hang the PostgreSQL installer.
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
> 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
> 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.
In response to
pgsql-bugs by date
|Next:||From: Phil Sorber||Date: 2012-01-27 20:02:57|
|Subject: Re: Segfault in backend CTE code|
|Previous:||From: Eric Borts||Date: 2012-01-27 19:32:23|
|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)|