Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doit {
- Get-Content -path "C:\xy.bat" | Out-File "C:\new.txt" -Force
- $bat_n = "C:\new.txt"
- $bat_f = New-Item "C:\new.bat" -Force
- $userid = $txtbox_userid.Text
- $ticketname = $txtbox_ticketname.Text
- $time = $txtbox_time.Text
- (Get-Content $bat_n) | Foreach-Object {
- $_ -replace 'xy', "$userid" `
- -replace 'update', "$ticketname" `
- -replace '"7","00"', '"8","00"' `
- } | Set-Content $bat_f
- }
- [void]$global:form_main.ShowDialog()
- $btn_doit.Add_Click( { doit })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement