mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 09:20:36 -06:00
Compare commits
2 Commits
00987fe4a2
...
07e154459d
Author | SHA1 | Date | |
---|---|---|---|
|
07e154459d | ||
|
d81b5f0fb4 |
@ -248,8 +248,8 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
|
||||
function New-Unattend {
|
||||
|
||||
param (
|
||||
[Parameter(Mandatory, Position = 0)] [string] $userName,
|
||||
[Parameter(Position = 1)] [string] $userPassword
|
||||
[Parameter(Mandatory, Position = 0)] [string]$userName,
|
||||
[Parameter(Position = 1)] [string]$userPassword
|
||||
)
|
||||
|
||||
$unattend = @'
|
||||
|
@ -164,7 +164,7 @@
|
||||
-replace ('\}\s*Catch', '} catch') `
|
||||
-replace ('\}\s*Catch\s*(?<exceptions>(\[.*?\]\s*(\,)?\s*)+)\s*\{', '} catch ${exceptions} {') `
|
||||
-replace ('\}\s*Catch\s*(?<exceptions>\[.*?\])\s*\{', '} catch ${exceptions} {') `
|
||||
-replace ('(?<parameter_type>\[[^$]+\])\s*(?<str_after_type>\$.*?)', '${parameter_type}${str_after_type}') `
|
||||
-replace ('(?<parameter_type>\[[^$0-9]+\])\s*(?<str_after_type>\$.*?)', '${parameter_type}${str_after_type}') `
|
||||
| Set-Content "$fullFileName"
|
||||
|
||||
Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished $i out of $numOfFiles" -PercentComplete (($i/$numOfFiles)*100)
|
||||
|
Loading…
Reference in New Issue
Block a user