Search found 40 matches

by klarlichter
Thu Nov 28, 2019 11:00 am
Forum: PowerShell GUIs
Topic: Progressbar while Job
Replies: 12
Views: 4241

Re: Progressbar while Job

Please take a look. Shuch it should be: function serviceStop { param ($serviceName) Write-Progress -Activity StopService -Status 'Progress->' -PercentComplete 10 -CurrentOperation Stopping $service = Get-Service $ServiceName $service | Stop-Service do { $service.Refresh() Write-Progress -Id 1 -Activ...
by klarlichter
Thu Nov 28, 2019 10:53 am
Forum: PowerShell GUIs
Topic: Progressbar while Job
Replies: 12
Views: 4241

Re: Progressbar while Job

Because he was only work till 10%. I now use your example again and replace 10 with 100. It work till end. But after he reach "100%" he should change text from "Progress" to "Stopped" is that possible? And why he show after second time call that stop action "-1 rem...
by klarlichter
Thu Nov 28, 2019 10:40 am
Forum: PowerShell GUIs
Topic: Progressbar while Job
Replies: 12
Views: 4241

Re: Progressbar while Job

Hello, i try your code it is working 95% good. If i press stop it load till 10% and then your window frozen.... I change it to function serviceStop { param ($serviceName) Write-Progress -Activity StopService -Status 'Progress->' -PercentComplete 0 -CurrentOperation Stopping $service = Get-Service $S...
by klarlichter
Thu Nov 28, 2019 10:29 am
Forum: PowerShell GUIs
Topic: [solved] Load variable
Replies: 2
Views: 1461

Re: Load variable

Hi,
i place it inside "Globals.ps1" and it load inside every script.
by klarlichter
Thu Nov 28, 2019 8:31 am
Forum: PowerShell GUIs
Topic: [solved] Load variable
Replies: 2
Views: 1461

[solved] Load variable

Hello, I create inside a poweshell studio project the file configuration.ps1 There i wrote $user1 = "Test" on another powershell script or form i use Param ($user1) Why i cant get that value $user1 from configuration.ps1 ? I think he missing that source script that he understand where $use...
by klarlichter
Wed Nov 27, 2019 5:33 pm
Forum: PowerShell GUIs
Topic: Progressbar while Job
Replies: 12
Views: 4241

Re: Progressbar while Job

Hello,
so it is not possible to display a progressbar while the service is restart?
I mean display while wait that service is stop or start display any progressbar?
by klarlichter
Wed Nov 27, 2019 5:04 pm
Forum: PowerShell GUIs
Topic: Progressbar while Job
Replies: 12
Views: 4241

Progressbar while Job

Hello, i try to display a progressbar while a job working. I use the following code: $job = Start-Job -Script (Stop-Service OpenVPNService) while ((Get-Job $job).Status -eq 'Running'){ $progressbar1.Value += 1 sleep -mil 500 } $progressbar1.Value = $progressbar1.MaxValue But it seems not working. Di...
by klarlichter
Tue Nov 26, 2019 1:21 pm
Forum: PowerShell GUIs
Topic: Load DLL inside project
Replies: 7
Views: 6293

Re: Load DLL inside project

Ok. And how create a shortcut automatic to desktop with that exe file ? Is that also possible ?
by klarlichter
Tue Nov 26, 2019 1:14 pm
Forum: PowerShell GUIs
Topic: Load DLL inside project
Replies: 7
Views: 6293

Re: Load DLL inside project

Dynamic like you tell above right ?
And could I create a msi who roll out my exe and that dll inside one folder ?
by klarlichter
Tue Nov 26, 2019 1:10 pm
Forum: PowerShell GUIs
Topic: Load DLL inside project
Replies: 7
Views: 6293

Re: Load DLL inside project

I place that dll inside the project and I want create a exe and not roll out my form and dll. Is there are a possibility to call / run that file inside my exe or did I need place the dll as well ?

Like I call inside a psf a ps1 who located inside project i would like call that dll.