Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: drdoppler.no-ip.biz
I ran this command:
"C:\Program Files\Certbot\bin\certbot.exe" --standalone renew --post-hook 'd:\batch\test.ps1' -v --dry-run
with various quote combinations around d:\batch\test.ps1
It produced this output:
it created the certificate great and it makes my site happy. My problem is I want to schedule the renewal and automate the post cerbot activities using post-hook or post-deploy, Either way I get this error, I have tried many combinations of things and no cigar. I am not a python person,
2023-10-08 19:21:15,783:INFO:certbot.compat.misc:Running post-hook command: d:\batch\test.ps1
2023-10-08 19:21:15,783:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "runpy.py", line 197, in _run_module_as_main
File "runpy.py", line 87, in run_code
File "C:\Program Files\Certbot\bin\certbot.exe_main.py", line 29, in
sys.exit(main())
File "C:\Program Files\Certbot\pkgs\certbot\main.py", line 19, in main
return internal_main.main(cli_args)
File "C:\Program Files\Certbot\pkgs\certbot_internal\main.py", line 1864, in main
return config.func(config, plugins)
File "C:\Program Files\Certbot\pkgs\certbot_internal\main.py", line 1638, in renew
hooks.run_saved_post_hooks()
File "C:\Program Files\Certbot\pkgs\certbot_internal\hooks.py", line 155, in run_saved_post_hooks
_run_hook("post-hook", cmd)
File "C:\Program Files\Certbot\pkgs\certbot_internal\hooks.py", line 240, in _run_hook
returncode, err, out = misc.execute_command_status(
File "C:\Program Files\Certbot\pkgs\certbot\compat\misc.py", line 163, in execute_command_status
proc = subprocess.run(line, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
File "subprocess.py", line 505, in run
File "subprocess.py", line 951, in init
File "subprocess.py", line 1420, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application
2023-10-08 19:21:15,783:ERROR:certbot._internal.log:An unexpected error occurred:
2023-10-08 19:21:15,783:ERROR:certbot._internal.log:OSError: [WinError 193] %1 is not a valid Win32 application``
This is the contents of test.ps1
Write-Host 'Hello, World!'
'Hello, World!' | Write-Host
Write-Output "Press any keyto continue ..."
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | Out-Null
My web server is (include version): Netcam studio
The operating system my web server runs on is (include version):
OS Name | Microsoft Windows 11 Pro |
---|---|
Version | 10.0.22621 Build 22621 |
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know): admin in windows yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 2.6.0