View Issue Details

IDProjectCategoryView StatusLast Update
0001890CCdciel[All Projects] Generalpublic18-02-24 10:56
ReporterhanAssigned ToPatrick Chevalley 
Status assignedResolutionopen 
PlatformPCOSWindowsOS Version10 64bit
Product Version0.9 
Target Version2.0Fixed in Version 
Summary0001890: Win10 c:\windows\system32\bash.exe execution
DescriptionHello Patrick,

I try to test the Win10. There are still some problems. After loading an image and trying to solve it with right mouse I get an resolve error. Only if I give a valid path to the old \bin\bash.exe solver it executes the new c:\Windows\System32\bash.exe. I tried to follow it in the code and see some problems:

CCDciel trunk 774;

1) UTF8process, line 639 is always executed with ...\bin\bash.exe

2) cu_astronometry_engine In line 171:
         Kparam.Add('--login'); {???? not for win10 Bash}

3) cu_astronometry_engine In line 179:
         Kparam.Add('--login'); {???? not for win10 Bash}

4) cu_astronometry_engine It line 250, both CCDCiel 32 bit and 64bit can execute Win10 64 bit bash.exe. Remove {$ifdef cpu64}:
// {$ifdef cpu64}
  // Windows Subsystem for Linux cannot be called from a 32bit application
    if not FileExistsUTF8(fcmd) then begin
      if FileExistsUTF8(buf)then begin
// end;
// {$endif}
  else {new}
  Fparam.Add('--login'); {do not add for win10 Bash}

5) I installed the CCDciel 64 bit two days ago in the observatory. I warned that the 32 bit would be uninstalled but left the CCDciel 32 bit executable after removing some files. At the moment there is no much benefit with a 64 bit version and you could stick with the 32 bit for some time, or provide both 32 and 64 bit in one installer.

TagsNo tags attached.



18-01-31 15:18

reporter   ~0004425

Last edited: 18-01-31 15:18

View 2 revisions

I still don't think there is an urgent need for 64 bit, but I use the INNO installer as follows to install 32 and 64 bit depending of operating system:

; Setup will look in the registry to see if the same application is already installed, and if so, it will use the directory of the previous installation as the default directory presented to the user in the wizard
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
; On all other architectures it will install in "32-bit mode".

; Install MyProg-x64.exe if running in 64-bit mode (x64; see above),
; MyProg.exe otherwise.
Source: "c:\hnsky.fpc\install_large\hnsky64.exe"; DestDir: "{app}"; DestName: "hnsky.exe"; Check: Is64BitInstallMode; Flags: ignoreversion
Source: "c:\hnsky.fpc\install_large\hnsky.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode; Flags: ignoreversion

Patrick Chevalley

18-01-31 16:45

administrator   ~0004426

Maybe we have a slightly different installation of the Linux subsystem but for me bash.exe cannot be started from a 32bit program.

1) I not see a process execution at line 639, for me it is at 416. The C:\Windows\System32\ path is set in the {ifdef cpu64} between lines 250 and 259 if bash.exe is not found with the bin path.

2) and 3) beware this function is not to call but to kill the astrometry process if you select to stop the solving. But for me the --login is supported by System32\bash.exe and I not have to remove this option.

4) really this not work for me in 32bit. I try many workaround, like starting with a "cmd.exe /C" but with no solution.

Another problem I have with system32\bash.exe in 64bit is the process never exit if I use the poUsePipes process option to get the astrometry log. The quick and dirty fix is to not show the log if using system32\bash.exe for now.

5) Strange, from my test all the files where correctly removed. Maybe because you put a exe file you compiled yourself here?
Anyway this is a standard Inno Setup uninstall, just called from a startup script if the install is found in WOW6432Node.

I use the same kind of Inno Setup config as you to put the two binaries in the same installer.
The setup script is system_integration/Windows/installer/ccdciel/ccdciel_dual.iss

But I have to quickly revert to a 32bit only installer after I receive a number of report because most ASCOM driver are 32bit only, even on 64 bit system. This make connection to the camera or telescope impossible.

So for me WSL is not a solution for now.


18-02-01 00:20

reporter   ~0004430

Last edited: 18-02-01 08:13

View 5 revisions

This is a big problem for use of the Win10 Bash.

Okay resume:
a) CCDciel has to be 32 bit only.
b) Win10 Bash can't be executed from a 32 bit application,
c) Problem with capturing the reporting of

b) I also failed to find a way to execute the Win10 Bash from a 32 bit application. ShellApi, even batch files fail to execute \Windows\System32\bash.exe if called from a 32 bit application. Even the Fileexists function in 32 bit fails to report c:\Windows\System32\bash.exe

c) In Linux to monitor I also use Tprocess in my stacking program. However with Win10 Bash after a few lines of the program "solve-field", the remaining output is garbage text. I assume from the next program, but I
never managed to solve this, so I don't use Tprocess in the Windows version, only Linux.

My stacking program is only distributed as 64 bit since 2 months no, so I didn't notice the barrier between 32bit and 64 bit applications.

The only way to a solution could be a separate 64 bit program something similar as "ansvr" communicating via a local server or other way. Is that something you want support? I have no problem to make an interface program. I have still problems as c) but could run the application in text window. For CCDciel it could look similar as the PlateSolve2 interface.

Or you could distribute two separate 32 and 64 bit CCDciel versions and provide Win10 Bash support in the 64 bit version only. I assume separate 32 bit and 64 bit version will raise a lot of question and problems. Probably a CCDciel 32 bit only is a saver and better route.

There is one strange thing I have to investigate. In de compiler CCDciel 32 bit manages to start Win10 Bash if there is a link to the old bash. Thats why I initially proposed to remove the {$ifdef cpu64}


18-02-01 09:23

reporter   ~0004431

Last edited: 18-02-01 10:40

View 5 revisions

After some testing, I noticed that a 32 bit application can execute a 64 bit application but not in c:\Windows\System32 If I copy my own 64 bit application to c:\Windows\System32 then the 32 bit application fails to execute it. So it is a build-in Microsoft protection for c:\Windows\System32 folder

I also know why CCdciel 32bit could execute Win10 Bash on my system!!!!!!. I had entered a link to my Bash replacement utility. My little 64 bit Bash utility redirects a classic Bash call to Win10 Bash. I forgot totally that this utility was installed on my system. Anyhow this utility works. So CCdciel 32 bit can access Win10 Bash via a 64 bit utility program. Link and source:

direct download source:

The pages:

ccdciel 32bit (95,566 bytes)


18-02-05 09:21

reporter   ~0004432

I have contact with the programmer of ANSVR tool, Andy. He is considering releasing an updated Cygwin & 0.73 solution.

Patrick Chevalley

18-02-24 10:56

administrator   ~0004490

Getting an updated ANSVR is probably a better solution for most users.
Many are probably not ready to have to manage a Linux install on their Windows.

I let this issue open for an eventual support by default in the future.
For now this two solutions are working:
1- recompile ccdciel for 64bit
2- keep 32bit ccdciel and use your bash interface

Issue History

Date Modified Username Field Change
18-01-31 14:32 han New Issue
18-01-31 15:18 han Note Added: 0004425
18-01-31 15:18 han Note Edited: 0004425 View Revisions
18-01-31 16:45 Patrick Chevalley Note Added: 0004426
18-01-31 16:49 Patrick Chevalley Assigned To => Patrick Chevalley
18-01-31 16:49 Patrick Chevalley Status new => assigned
18-02-01 00:20 han Note Added: 0004430
18-02-01 00:32 han Note Edited: 0004430 View Revisions
18-02-01 00:35 han Note Edited: 0004430 View Revisions
18-02-01 08:12 han Note Edited: 0004430 View Revisions
18-02-01 08:13 han Note Edited: 0004430 View Revisions
18-02-01 09:23 han File Added: ccdciel 32bit
18-02-01 09:23 han Note Added: 0004431
18-02-01 09:43 han Note Edited: 0004431 View Revisions
18-02-01 10:28 han Note Edited: 0004431 View Revisions
18-02-01 10:31 han Note Edited: 0004431 View Revisions
18-02-01 10:40 han Note Edited: 0004431 View Revisions
18-02-05 09:21 han Note Added: 0004432
18-02-24 10:56 Patrick Chevalley Target Version => 2.0
18-02-24 10:56 Patrick Chevalley Note Added: 0004490