Search found 118 matches

by owinsloe
Wed Nov 24, 2021 12:07 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 549

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.
by owinsloe
Tue Nov 23, 2021 7:22 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 549

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.277 B power...
by owinsloe
Tue Nov 23, 2021 4:55 pm
Forum: PowerShell
Topic: How to delete my .EXE script just before exit it?
Replies: 8
Views: 549

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
by owinsloe
Wed Nov 17, 2021 11:03 am
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 450

Re: dgv cell click setting column header selection state

Thanks for the response, totally understand. Cheers
by owinsloe
Tue Nov 16, 2021 6:14 pm
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 450

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
by owinsloe
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: 1347

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...
by owinsloe
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: 1347

Re: After upgrading to 5.8.196 unable to build package psf

Have uploaded zip as requested,
settings build command below
Untitled.jpg
Untitled.jpg (180.04 KiB) Viewed 1323 times
by owinsloe
Tue Nov 16, 2021 1:23 pm
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 450

Re: dgv cell click setting column header selection state

ahhh, just read the link and it looks like I need something like;
$dataGridView1.ColumnHeadersDefaultCellStyle.SelectionBackColor = $dataGridView1.ColumnHeadersDefaultCellStyle.BackColor;

I'll play with that once I have a fix to my packaging problem
by owinsloe
Tue Nov 16, 2021 1:17 pm
Forum: PowerShell GUIs
Topic: dgv cell click setting column header selection state
Replies: 11
Views: 450

Re: dgv cell click setting column header selection state

Thanks Alexander. I have just upgraded PSS and now cant build a package (another post support ticket opened on that one). So I was going to try the config update to just test that it worked. The only problem with this option (if it works) is that for all my UI packages I uncheck the build of config ...
by owinsloe
Tue Nov 16, 2021 1:07 pm
Forum: PowerShell Studio
Topic: After upgrading to 5.8.196 unable to build package psf
Replies: 4
Views: 1347

After upgrading to 5.8.196 unable to build package psf

Product: PowerShell Studio 2021 (64 Bit) Build: v5.8.196 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19043.0 When I attempt to build the attached package, PSS hangs. The cause is the SETTINGS BUILD COMMAND (cnwpackage.exe, script attached). If I remove this then the PSF package process completes...