Search found 133 matches

by Domtar
Wed Dec 21, 2022 10:53 am
Forum: PowerShell GUIs
Topic: issue with get-variable
Replies: 5
Views: 1637

issue with get-variable

hi all, i have a project with multiple files and hundreds of lines of code so i cannot paste everything here but I'll try to describe my issue as best I can to allow someone to help. the GUI I'm building has a new tabpage each time you connect to a computer in the field. the tab is correctly creates...
by Domtar
Thu Nov 03, 2022 6:02 am
Forum: PowerShell
Topic: kill a process and refresh systray icon
Replies: 0
Views: 15754

kill a process and refresh systray icon

hi all,

how can I refresh the system tray icons after i killed a process?

thanks!
by Domtar
Wed Oct 26, 2022 6:02 am
Forum: PowerShell GUIs
Topic: tab name color
Replies: 4
Views: 701

Re: tab name color

OK I believe I got all the required code except that I do not know how to raise the event for that here's a piece of code to illustrate what I tried. I know the event is not raised because the label1 text property does not get updated pretty sure I'm missing a small piece somewhere. $tabcontrol1_Dra...
by Domtar
Tue Oct 25, 2022 7:56 am
Forum: PowerShell GUIs
Topic: tab name color
Replies: 4
Views: 701

tab name color

is there some way to set the color of the name of a tabPage depending on a condition? my TabControl has several tabPages, where each one is a computer in AD. I'd like to have the following; if the PC is in AD, set the Tab name forecolor to black and the backcolor to green, if not in AD, set the back...
by Domtar
Mon Oct 24, 2022 4:08 am
Forum: PowerShell GUIs
Topic: Get Installed Software to ListBox
Replies: 6
Views: 1057

Re: Get Installed Software to ListBox

i never use $global:..... it could lead to issues between scripts in the same powershell session

i always use $script:...
by Domtar
Thu Oct 20, 2022 5:09 am
Forum: PowerShell GUIs
Topic: Load Splash Screen Immediately
Replies: 1
Views: 588

Re: Load Splash Screen Immediately

i do this in the load event of my main form. $mainForm_load = { $CM2012CmdletModule = ($Env:SMS_ADMIN_UI_PATH.Substring(0, $Env:SMS_ADMIN_UI_PATH.Length - 5) + '\ConfigurationManager.psd1') if (Test-Path -Path $CM2012CmdletModule) { $splashScreen = Show-SplashScreen -passtrue $true import-module $CM...
by Domtar
Tue Oct 04, 2022 7:31 am
Forum: PowerShell GUIs
Topic: open explorer with path
Replies: 8
Views: 1195

Re: open explorer with path

OK i found this and it works.

$OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
$OpenFileDialog.initialDirectory = "\\$($comboPCName.Text)\c$\windows\msi\logs"
$OpenFileDialog.filter = "All files (*.*)| *.*"
$OpenFileDialog.ShowDialog() | Out-Null

thanks!
by Domtar
Tue Oct 04, 2022 6:47 am
Forum: PowerShell GUIs
Topic: open explorer with path
Replies: 8
Views: 1195

Re: open explorer with path

ok, let's take this from scratch. the GUI is started with the same user that needs to browse the logs. There is no other user account. if you look at the first post, I did say I'm trying to use new-psdrive & get-psdrive but when i run get-psdrive with the path i need, it is asking my for credent...
by Domtar
Tue Oct 04, 2022 4:09 am
Forum: PowerShell GUIs
Topic: open explorer with path
Replies: 8
Views: 1195

Re: open explorer with path

we already have an AD group that does that. each user is a member of that group. the user name / password is not written anywhere so there is 0 risk for a hacker to get those.

does this mean that you cannot help me resolving my issue?
by Domtar
Mon Oct 03, 2022 10:45 am
Forum: PowerShell GUIs
Topic: open explorer with path
Replies: 8
Views: 1195

Re: open explorer with path

I need the credential object because my GUI is used by the Service Desk to browse files on a targeted computer, to see installation log files and such... if I use &explorer <path> as suggested by owinsloe, the credential window pops up. since a resource from the service desk can access tens of c...