Search found 252 matches

by mqh77777
Tue Sep 23, 2014 2:01 pm
Forum: PowerShell Studio
Topic: Code not running
Replies: 20
Views: 30703

Re: Code not running

OK, I tried what you said. I added this to my script, right "after" the (get-adcomputer) command $text = "Here is a line of text to see if it will get written to my .TXT file" $text | Out-File 'c:\temp\allWin7.txt' -Append This DOES work. The sentence is written to my .TXT file.
by mqh77777
Tue Sep 23, 2014 1:55 pm
Forum: PowerShell Studio
Topic: Code not running
Replies: 20
Views: 30703

Re: Code not running

could it be my execution policy? I have it set to unrestricted. should it be Bypass?
by mqh77777
Tue Sep 23, 2014 1:33 pm
Forum: PowerShell Studio
Topic: Code not running
Replies: 20
Views: 30703

Re: Code not running

Using that setting did not work. my file c:\temp\allWin7.txt is still blank. Also, I'm running everything on my workstation. I'm both a Local Admin & Domain Admin so I have full rights. And what is really weird is when I'm in "design mode" and I click on the HOME TAB\RUN it does work. ...
by mqh77777
Tue Sep 23, 2014 12:03 pm
Forum: PowerShell Studio
Topic: Code not running
Replies: 20
Views: 30703

Re: Code not running

we are running PowerShell Studio 2014 v4.1.64 This is installed on a Windows 7 x64 system But all of our target machines are Windows 7 x86 I did a BUILD with these settings. Platform = PowerShell V2 Host (Windows Forms) Win32 I then did a Deploy with these settings. (package executable) When I am in...
by mqh77777
Tue Sep 23, 2014 11:23 am
Forum: PowerShell Studio
Topic: Code not running
Replies: 20
Views: 30703

Code not running

I have some code in my form. The form runs and everything executes except my output. $buttonSendMSGToAllComputer_Click={ #TODO: Place custom script here import-module activedirectory remove-item "c:\Temp\allWin7.txt" $Message = Read-Host -Prompt "Enter your message here" New-Item...
by mqh77777
Tue Sep 23, 2014 10:08 am
Forum: PowerShell Studio
Topic: How do you run without a CMD window?
Replies: 6
Views: 4022

Re: How do you run without a CMD window?

I have created 1 form. On this form I have 2 buttons. Here is the exact code for each button. $buttonSendMSGTo1Computer_Click={ #TODO: Place custom script here $computer = Read-Host -Prompt "Enter a single computer name" $Message = Read-Host -Prompt "Enter your message here" msg ...
by mqh77777
Tue Sep 23, 2014 9:03 am
Forum: PowerShell Studio
Topic: How do you run without a CMD window?
Replies: 6
Views: 4022

Re: How do you run without a CMD window?

ok, I click on the Deploy Tab\Build. From there I have a Script Packager options window. Under PLATFORM I do NOT have any executable options. I only have (command line) & (Windows forms) so I picked (Sapien PowerShell v2 Host (Windows Forms) Win32. Now when I run my tool it does not complete. It...
by mqh77777
Tue Sep 23, 2014 8:37 am
Forum: PowerShell GUIs
Topic: close a form?
Replies: 6
Views: 7610

Re: close a form?

Thanks. I did add a new Button to my form and it has this exact code. $button1_Click={ #TODO: Place custom script here $form1.Close() } when I run my project I click on this button1 and nothing happens. The form does not close. In the code window at the bottom I have this error. ERROR: You cannot ca...
by mqh77777
Tue Sep 23, 2014 6:52 am
Forum: PowerShell Studio
Topic: How do you run without a CMD window?
Replies: 6
Views: 4022

How do you run without a CMD window?

I created a new Project. I created this on a Windows 7 x64 workstation but when I did a "build" I built it for PS 2.0 and x86. all of our Windows 7 workstations are running PS 2.0 on a 32-bit OS. when I run the compiled .EXE it pops up my GUI but it also pops up a CMD window. We don't want...
by mqh77777
Tue Sep 23, 2014 6:50 am
Forum: PowerShell GUIs
Topic: close a form?
Replies: 6
Views: 7610

close a form?

How do I close my Project form? I have code within it and once the code is done executing I want the form to close.