Search found 204 matches

by Lembasts
Thu May 23, 2019 9:24 pm
Forum: PowerShell GUIs
Topic: debugging hang on AD directory seacher
Replies: 8
Views: 562

debugging hang on AD directory seacher

Greetings,

I have a line of code that goes something like:
$search = new-object System.directoryservices.directorysearcher
When I use the debugger and go through my code line by line, I get to this line and press F11 and it just hangs.
Any ideas why?
Thanks
David
by Lembasts
Tue May 21, 2019 3:57 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

Thanks for that. DLLs are way beyond my ability Im afraid. I think Ill stick to the timer and make it really short. If they dont press the button within 5 seconds, Ill force a logoff. We are not really expecting people to be malicious enough to try and launch task manager to kill the app within 5 se...
by Lembasts
Tue May 21, 2019 3:26 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

Thanks.
Do you have any suggestions other than a timer that I could use?
Essentially I want the form displayed as soon as they logon and not really allow them to do anything until they have completed a button on the form.
by Lembasts
Tue May 21, 2019 2:30 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

Thanks.
When I saw this:
https://social.technet.microsoft.com/Fo ... powershell
I decided it was way to hard.
Looks like Im back to the timer thing...
by Lembasts
Mon May 20, 2019 8:54 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

So they dont like my timer as people can alt-tab, perhaps launch task manager quickly and kill my task.
So can a window be displayed in secure desktop mode?
by Lembasts
Sun May 19, 2019 6:52 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

I came up with a solution that will work.
I start a timer when the form loads and if they dont press a specific button on the form within 60 seconds, they will be logged off.
by Lembasts
Sun May 19, 2019 4:02 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

I think the term is 'Secure desktop' form.
by Lembasts
Sun May 19, 2019 3:41 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

Well there's something I am still missing. I compile this form into an exe and launch the exe. The form displays but I can still interact with the desktop. What do I need to do so that when the exe is launched, everything goes dark, like a UAC prompt, and wont let me continue or interact with anythi...
by Lembasts
Fri May 17, 2019 6:09 am
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Re: Displaying a modal form

In which case I am using the wrong terminology.
I thought modal meant the window is displayed preventing entering anything else anywhere else on the desktop until you deal with the window (like the UAC prompt).
Whats that called and how do I do that (Can it be done?)
by Lembasts
Thu May 16, 2019 10:07 pm
Forum: PowerShell GUIs
Topic: Displaying a modal form
Replies: 16
Views: 827

Displaying a modal form

Greetings, I have a single form that I need to display modally. Google tells me its the showdialog method. So I put that in my load event and it didnt go modal and the error said it shouldnt be visible. So I put a $form1.visible = $false before my $form1.showdialog() in my load event and its still n...