#How can I execute an .exe file and accept all requirements?
26 messages · Page 1 of 1 (latest)
please refer to the documentation or help for the exe
you mean I should look at it myself or you want information for it?
you need to find / read it. There's no rules for exe's. They're all dirty snowflakes using whatever rules whoever wrote it dreamt up.
There's really not much PS can do to help you here.
if it's a public thing, I'd check and see if chocolatey has a package for it. If it does, that package will likely reveal and silent arguments
there's a couple of websites that document silent args for things too that are worth a shot
I got told there'd be an option called -AcceptLicense, though that's not working.
yep, but that just loops back to "you need docs"
sys internals has a Strings utility which can be used to attempt to search an exe for arguments. But it's basically just scraping the file looking for embedded strings of a certain length
took a moment to find it, worth seeing if your package is listed here at all: https://silent-install.net/
All about silent installation / Deinstallation of Software
it's not :(
this is, unfortunately, one of the perils of trying to package stuff
this is the strings utility if you want to try it: https://learn.microsoft.com/en-us/sysinternals/downloads/strings
it literally just tries to find stuff that might be a command line argument
So when I executed it manually I had to accept the license and stuff and THEN the computer restarted as it should've.
Though the script should execute the .exe
yes, but the script can't just magic the GUI clicky requirement away
and that's what I'm trying to do, that it clicks through the GUI but the user doesn't see it when executing it.
then you need to find the silent args, if it has any. If it doesn't you can look at Auto-Hot Key perhaps
alright, I'll look it up.
So you can press keys via the script?
like tell the script to type something
not trivially, no
PS is not a UI automation language. You can try SendKeys, but it's quite basic
this is a reasonable example of attempting to send key strokes to a specific window: https://stackoverflow.com/questions/54999200/send-keys-in-powershell-altn-tab-enter You'll need to swap that gps iex* part to the process ID of the license prompt window.
ofc it would be far better to not have to deal with the prompt at all, so silent args if you can find them
got it working :D