Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 546

PowerShell GUIs • How To Install Software from GUI

$
0
0
Hello there, I am a new user of PSStudio and am trying to figure out a few things.

The first thing I am trying to do is launch a software install from the GUI. For example I have a button that when I press it, it installs Chrome.

I first tried to make the script smart using Get-ScriptDirectory, but I started hard coding the file path and still can't get it to work.

For example, when I press the button, I have the following as the action:

Code:

$buttonInstallChrome_Click={#TODO: Place custom script here####Start-Process -FilePath "(Get-ScriptDirectory)\Software\Google Chrome 113.0.5672.64\Deploy-Application.exe"Start-Process -FilePath "C:\ProgramData\Software\Google Chrome 113.0.5672.64\Deploy-Application.exe"}
So I am using Start-Process and give the file path location. The problem is when I build the exe and then push the button nothing happens.

Any ideas on how to get this working would be appreciated. Thanks!

Statistics: Posted by MacolandPS — Tue Jan 30, 2024 5:12 pm



Viewing all articles
Browse latest Browse all 546

Trending Articles