Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add autocomplete somehow? #63

Open
RemixPL1994 opened this issue Mar 16, 2023 · 10 comments
Open

Is it possible to add autocomplete somehow? #63

RemixPL1994 opened this issue Mar 16, 2023 · 10 comments

Comments

@RemixPL1994
Copy link

RemixPL1994 commented Mar 16, 2023

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}")

@abbodi1406
Copy link
Owner

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

@RemixPL1994
Copy link
Author

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?

@abbodi1406
Copy link
Owner

abbodi1406 commented Mar 17, 2023

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

@RemixPL1994
Copy link
Author

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.

@RemixPL1994
Copy link
Author

RemixPL1994 commented Mar 17, 2023

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.

@RemixPL1994
Copy link
Author

@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?

@abbodi1406
Copy link
Owner

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

@RemixPL1994
Copy link
Author

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.

@ukdocCT
Copy link

ukdocCT commented Nov 13, 2023

The question i would be asking is why do you want to forceablely close the applications? If your goal is to patch your system then getting the files to be replaced at reboot should be sufficient.
I would have to agree with @abbodi1406 that force closing running apps for a users is very bad practice as you do not know what app will be triggered and what work will be lost.
Since the installer is purely a sfx 7zip file, you can just unpack it and then edit the zip file and then create a new sfx to run, but you should really be asking yourself why in the first place.

@RemixPL1994
Copy link
Author

Sometimes it is enough that an application or service in the background is enabled and running and during the installation of vcredist pack I am asked whether to force/close these applications.

Every time, or even very often, I click and close these applications because I know that I do not need them at the moment and I want to complete the installation of vcredist pack.

But it would be more convenient if it could be done automatically, for those interested, by running from one .exe file without creating additional shortcuts, etc.

Personally, I would be happy to use such a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants