Skip to content

Commit

Permalink
fixup generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Jun 3, 2016
1 parent 06f5bdd commit 794fc1c
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 28 deletions.
1 change: 1 addition & 0 deletions docs/generated/HelpersInstallChocolateyInstallPackage.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ Install-ChocolateyInstallPackage -PackageName 'bob' -FileType 'exe' `

* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]]
* [[Uninstall-ChocolateyPackage|HelpersUninstallChocolateyPackage]]
* [[Start-ChocolateyProcessAsAdmin|HelpersStartChocolateyProcessAsAdmin]]


[[Function Reference|HelpersReference]]
Expand Down
157 changes: 129 additions & 28 deletions docs/generated/HelpersStartChocolateyProcessAsAdmin.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,153 @@
# Start-ChocolateyProcessAsAdmin

Runs a process as an administrator. If $exeToRun is not specified, it is run with PowerShell.
**NOTE:** Administrative Access Required.

**NOTE:** This command will assert UAC/Admin privileges on the machine.
Runs a process with administrative privileges. If `-ExeToRun` is not
specified, it is run with PowerShell.

## Usage
## Syntax

```powershell
Start-ChocolateyProcessAsAdmin $statements $exeToRun
```
~~~powershell
Start-ChocolateyProcessAsAdmin `
-Statements <String> `
[-ExeToRun <String>] `
[-Minimized] `
[-NoSleep] `
[-ValidExitCodes <Object>] `
[-IgnoredArguments <Object[]>] [<CommonParameters>]
~~~

## Examples

```powershell
Start-ChocolateyProcessAsAdmin "$msiArgs" 'msiexec'
## Notes

Start-ChocolateyProcessAsAdmin "$silentArgs" $file
This command will assert UAC/Admin privileges on the machine.

Start-ChocolateyProcessAsAdmin "$silentArgs" $file -validExitCodes @(0,21)
```
## Aliases

```powershell
$psFile = Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'someInstall.ps1'
Start-ChocolateyProcessAsAdmin "& `'$psFile`'"
```
None

## Inputs

None

## Outputs

None

## Parameters

* `-statements`
### -Statements &lt;String&gt;
Arguments to pass to `ExeToRun` or the PowerShell script block to be
run.

Property | Value
---------------------- | -----
Aliases |
Required? | true
Position? | 1
Default Value |
Accept Pipeline Input? | false

### -ExeToRun [&lt;String&gt;]
The executable/application/installer to run. Defaults to `'powershell'`.

Property | Value
---------------------- | ----------
Aliases |
Required? | false
Position? | 2
Default Value | powershell
Accept Pipeline Input? | false

### -Minimized
Switch indicating if a Windows pops up (if not called with a silent
argument) that it should be minimized.

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value | False
Accept Pipeline Input? | false

### -NoSleep
Used only when calling PowerShell - indicates the window that is opened
should return instantly when it is complete.

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value | False
Accept Pipeline Input? | false

### -ValidExitCodes [&lt;Object&gt;]
Array of exit codes indicating success. Defaults to `@(0)`.

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value | @(0)
Accept Pipeline Input? | false

### -IgnoredArguments [&lt;Object[]&gt;]
Allows splatting with arguments that do not apply. Do not use directly.

Property | Value
---------------------- | -----
Aliases |
Required? | false
Position? | named
Default Value |
Accept Pipeline Input? | false

### &lt;CommonParameters&gt;

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 .


## Examples

**EXAMPLE 1**

~~~powershell
Start-ChocolateyProcessAsAdmin -Statements "$msiArgs" -ExeToRun 'msiexec'
~~~

**EXAMPLE 2**

These are statements and/or arguments for an application.
~~~powershell
Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file
Example: `'/i package /q'`
~~~

* `-exeToRun`
**EXAMPLE 3**

This is the executable/application to run.
~~~powershell
Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file -ValidExitCodes @(0,21)
Example: `cmd.exe`
~~~

Defaults to `powershell`
**EXAMPLE 4**

~~~powershell
# Run PowerShell statements
$psFile = Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'someInstall.ps1'
Start-ChocolateyProcessAsAdmin "& `'$psFile`'"
~~~

* `-validExitCodes` _(optional)_
## Links

If there are other valid exit codes besides zero signifying a successful install, please pass `-validExitCodes` with the value, including 0 as long as it is still valid.
* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]]
* [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]]

Example: `-validExitCodes @(0,44)`

Defaults to `@(0)`.
[[Function Reference|HelpersReference]]

[[Function Reference|HelpersReference]]
***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Start-ChocolateyProcessAsAdmin -Full`.

0 comments on commit 794fc1c

Please sign in to comment.