abbodi1406/vcredist

Is it possible to add autocomplete somehow?

RemixPL1994 opened this issue · 10 comments

Is it possible to add autocomplete somehow?

obraz

Would it be possible to take advantage of this or some other alternative external application or script that detects when there is an "OK" prompt and would press it automatically then?

https://www.autohotkey.com/

https://www.autoitscript.com/site/autoit/downloads/

Of course, this doesn't have to be the default behavior though it can be

but although alternatively adding a switch for autocomplete

EDIT:

Or use powershell for this purpose. That's what chatgpt suggested to me xd:

Set the path to the .exe or .bat/.cmd file

$programPath = "C:\path\file.exe"

Starting the program from the .exe or .bat/.cmd file

Start-Process -FilePath $programPath -Wait

Waiting for the dialog box to appear

Start-Sleep -Seconds 5

Find the dialog by title and action

$dialogBox = Get-Process | Where-Object {$_.MainWindowTitle -eq "Nazwa okna dialogowego"} | Select-Object -First 1
$okButton = $dialogBox.MainWindowHandle

Clicking the "OK" button

[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")

Use unattended switches, they install packages silently, and if runtime files are currently in use, the files will be scheduled for replace after system restart

auto closing the User programs without consent is bad practice

Okay. Having already in mind that auto-closing programs is a bad practice..

.. if I am willing and interested anyway - is there a way to get it?

e.g. are you able to somehow add it as a switch and add that it is independent of use etc but it can be used

or another way by editing installer.cmd ?

If you don't want / can't and prefer not to add it to your visual .exe packages then maybe you can tell me and show me I can add and change something myself to get the effect of automatic closing of programs during the installation of your visual packages

it doesn't matter if it's an explicit install and programs during installation will be closed if needed

or silent installation, but so that it installs immediately (without restarting), also with automatic closing of programs if necessary

let me know if we can come up with something so that I can use it even privately?

It cannot be done from Installer.cmd, or Windows Installer
https://learn.microsoft.com/en-us/windows/win32/msi/filesinuse-dialog

it's either silent installation = schedule files replace on next reboot
or passive installation = prompt user to close running programs

adding AutoIt or Powershell script will just complicate things, and i'm not sure it's doable

I see. If you decide to try to do something with AutoIt or Powershel etc then let me know if anything, I might be able to help you somehow and test how it works.

Regards.

Btw. I don't remember 100% exactly, but I think @Wilenty uses / used autocomplete in his instas.

As far as I remember, there was no prompt warning that you need to close currently running programs in the background and the whole thing was applied automatically to make it happen.

This is the solution I'm asking about and that's what I care about - if I remember correctly how it worked in the installer from @Wilenty

All I can write is "please" take a look at it if you can add it for use by willing people like me.

@abbodi1406

And is there any way I can edit/modify your .exe file with 7zip or some other program to change its behavior?

I would like to make it so that I run one .exe file with one click, but after launching the installer, it knows to run the installation and process of all vcredist files to be uploaded as an installation with a switch:

installer.exe /install /passive /norestart

Will it then ensure that all programs will be installed always and immediately without a restart, and in addition, the "close programs running in the background" window will not be displayed?

The exe file is just a 7-zip sfx file, it only run the installer script or the msi files directly, it cannot change msi behavior
msi files with /passive switch will trigger the prompt

OK, thanks.

If you could find some other way to do it. Regardless of whether it was introduced officially or to try it out for me personally and for private use by manually editing what I need, I will gladly use it.

Thank you for your answer and thank you in advance for your answer and hint in the future if you ever managed to implement what I asked for and described it.

Regards and thanks for your work, good job.