Are the .ps1 and psm1 modules needed? #166
-
Hi, I'm trying to integrate Gsudo on an app, and I wonder if I really need the .ps1, psm1 and the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
If you deploy just the
Those files are not really required if you don't do those things, but they improve the user experience... If lacking, the user would either think the documentation is wrong or the product is flawed. I would say that, if you planned that your app would put gsudo in the user If you only want to invoke Example C# ProcessStartInfo startInfo = default(ProcessStartInfo);
startInfo = new ProcessStartInfo(SetupProgramPath)
{
UseShellExecute = true,
Verb = "runas",
WindowStyle = ProcessWindowStyle.Normal,
FileName = "msiexec",
Arguments = "/i \"" + SetupProgramPath + "\"",
CreateNoWindow = false
};
Process.Start(startInfo); Example PowerShell Start-Process -FilePath "powershell.exe" -Verb RunAs |
Beta Was this translation helpful? Give feedback.
If you deploy just the
.exe
, then yourcmd
elevations will work fine, alsogsudo !!
(when called from cmd) will work. If you callgsudo
from your app, it will work.gsudo
(the one without extension) is used to properly elevate bash commands from inside wsl / git-bash / cygwin / etc ...Invoke-gsudo.ps1
provides the Invoke-gsudo PowerShell cmdlet (Nicer powershell syntax).gsudoModule.psm1
andgsudoModule.psd1
provides the PowerShell module that, if Imported in the profile, makesgsudo !!
work from PowerShell and also Invoke-gsudo AutoComplete.Those files are not really required if you don't do those things, but they improve the user experience... If lacking, the user would either think…