Search found 161 matches
- Tue May 31, 2022 1:44 pm
- Forum: PowerShell GUIs
- Topic: $Mainform.Close() did not execute immediately
- Replies: 2
- Views: 672
$Mainform.Close() did not execute immediately
Product: PowerShell Studio 2022 (64 Bit) Build: v5.8.206 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19044.0 Within my OnLoadFormEvent for my mainform I performed a test-path for a file and if not present threw a popup (Show-popup) and followed this by $Mainform.close(). I expected this to termi...
- Wed Feb 02, 2022 11:41 pm
- Forum: PowerShell
- Topic: bitwise problem
- Replies: 4
- Views: 2359
Re: bitwise problem
So the full story is that we have a hash string that we are intending to read to embed an expiry into our code. We have C exe's that are using the same code and I am attempting to replicate it into our powershell products. There is much more to the hash string than the 'BA' but I was just using the ...
- Wed Feb 02, 2022 10:07 pm
- Forum: PowerShell
- Topic: bitwise problem
- Replies: 4
- Views: 2359
bitwise problem
I am expecting the character uppercase E from the following (I was using some C code as an example that works) $Char = [char]([convert]::toint16('BA',16)) [char]($Char -bor 0xff) RETURNS ÿ What am I doing wrong? for (UINT i = 0; i < in.length(); i++) { unsigned char bit = in ; bit ^= 0xff; out.appen...
- Wed Nov 24, 2021 12:07 pm
- Forum: PowerShell
- Topic: How to delete my .EXE script just before exit it?
- Replies: 8
- Views: 3786
Re: How to delete my .EXE script just before exit it?
I have used TS in the past to divorce processes and have not always found it that reliable and you have to deal with credentials. But thats fine, the good thing with powershell and MS...you have loads of choices.
- Tue Nov 23, 2021 7:22 pm
- Forum: PowerShell
- Topic: How to delete my .EXE script just before exit it?
- Replies: 8
- Views: 3786
Re: How to delete my .EXE script just before exit it?
@jverra, It does work, I have tried it. The parent of the first powershell is the executable but the second powershell from the start-process launches after the primary executable has completed). Firing order.. 2021/11/24 16:15:24.483 B test "C:\cardinal\bin\test.exe" 2021/11/24 16:15:25.2...
- Tue Nov 23, 2021 4:55 pm
- Forum: PowerShell
- Topic: How to delete my .EXE script just before exit it?
- Replies: 8
- Views: 3786
Re: How to delete my .EXE script just before exit it?
You could try this..
#
# do stuff
#
# remove self
$Self = (Get-Process -Id $pid).Path
$Exe = 'powershell.exe'
$ExeArgs = '-command {remove-item '+$Self+' -force}'
start-process powershell -ArgumentList "sleep 1; $Exe $ExeArgs" -WindowStyle hidden
#
# do stuff
#
# remove self
$Self = (Get-Process -Id $pid).Path
$Exe = 'powershell.exe'
$ExeArgs = '-command {remove-item '+$Self+' -force}'
start-process powershell -ArgumentList "sleep 1; $Exe $ExeArgs" -WindowStyle hidden
- Wed Nov 17, 2021 11:03 am
- Forum: PowerShell GUIs
- Topic: dgv cell click setting column header selection state
- Replies: 11
- Views: 2101
Re: dgv cell click setting column header selection state
Thanks for the response, totally understand. Cheers
- Tue Nov 16, 2021 6:14 pm
- Forum: PowerShell GUIs
- Topic: dgv cell click setting column header selection state
- Replies: 11
- Views: 2101
Re: dgv cell click setting column header selection state
Alexander
adding $dataGridView1.ColumnHeadersDefaultCellStyle.SelectionBackColor = $dataGridView1.ColumnHeadersDefaultCellStyle.BackColor to the Mainform_Load corrected the behaviour. Maybe worth posting a note to a suitable coding forum so other punters are aware. Thanks for the clue. Cheers
adding $dataGridView1.ColumnHeadersDefaultCellStyle.SelectionBackColor = $dataGridView1.ColumnHeadersDefaultCellStyle.BackColor to the Mainform_Load corrected the behaviour. Maybe worth posting a note to a suitable coding forum so other punters are aware. Thanks for the clue. Cheers
- Tue Nov 16, 2021 6:10 pm
- Forum: PowerShell Studio
- Topic: After upgrading to 5.8.196 unable to build package psf
- Replies: 4
- Views: 4102
Re: After upgrading to 5.8.196 unable to build package psf
Ahhhh, just figured out it was an issue signing the executable where it looks like I was using an old cert. I have no idea how that happened but after I went back into the certificate settings and reselected the certificate, everything starting working again. Sorry to have caused unnecessary work fr...
- Tue Nov 16, 2021 4:01 pm
- Forum: PowerShell Studio
- Topic: After upgrading to 5.8.196 unable to build package psf
- Replies: 4
- Views: 4102
Re: After upgrading to 5.8.196 unable to build package psf
Have uploaded zip as requested,
settings build command below
settings build command below