Search found 706 matches

by dan.potter
Thu Nov 23, 2017 5:00 am
Forum: PowerShell GUIs
Topic: Capture ctrl+click from button not in focus?
Replies: 3
Views: 163

Re: Capture ctrl+click from button not in focus?

I was hoping their was a simpler way within the click event.

Code: Select all

$Creds_Click={
	
	if ($ctrl) { Get-Credential | Export-Clixml $env:userprofile\cred.xml 
	
	$ctrl = $false
		
	}
	
}

$cred_keydown=[System.Windows.Forms.KeyEventHandler]{
	
	$script:ctrl = $true
}
by dan.potter
Tue Nov 21, 2017 8:59 am
Forum: PowerShell GUIs
Topic: Capture ctrl+click from button not in focus?
Replies: 3
Views: 163

Capture ctrl+click from button not in focus?

Is it possible to do this?
by dan.potter
Tue Sep 26, 2017 5:45 pm
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

Re: CMD to PS formatting help. Netapp install.

Thanks, I was confused why I could set the here string to the clipboard and copy it into cmd and it would install without issue. I left a space at the end of each line thinking PS automatically eliminates the return. It happens with out-file too. The dsc package resource is looking for a string for ...
by dan.potter
Tue Sep 26, 2017 4:18 pm
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

Re: CMD to PS formatting help. Netapp install.

Finally got it. A single line here string did the trick. I was building a here string with all the options on a new line and the dsc config was inserting a `n after each parameter.

Alas, I still don't know why the below doesn't include the new lines.

@"
1
2
3
"@ | scb
by dan.potter
Tue Sep 26, 2017 2:57 pm
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

Re: CMD to PS formatting help. Netapp install.

Crickets over on that side :D Thanks for trying.
by dan.potter
Tue Sep 26, 2017 1:32 pm
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

Re: CMD to PS formatting help. Netapp install.

That doesn't work :cry: I know there is an underlying MSI and but I can't seem to get the msiexec arguments right either. Preferably I'd like to use the MSI itself as this will eventually be used in a dsc config.
by dan.potter
Tue Sep 26, 2017 12:33 pm
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

Re: CMD to PS formatting help. Netapp install.

I have to pass variables into the string so I don't thing single quotes is going to help.
by dan.potter
Tue Sep 26, 2017 7:49 am
Forum: Windows PowerShell
Topic: CMD to PS formatting help. Netapp install.
Replies: 10
Views: 759

CMD to PS formatting help. Netapp install.

I need to run this command in powershell and I've tried numerous different ways. I believe PS has an issue with the quotes although it doesn't throw an error. snapdrive7.0.exe /s /v"/qn SILENT_MODE=1 /Li SDInstall.log LPSM_SERIALNUMBER=serialnumber INSTALLDIR=\"c:\Program Files\NetApp\SnapDrive\" SV...
by dan.potter
Fri Aug 04, 2017 8:19 am
Forum: PowerShell GUIs
Topic: 2012r2 visual style button click
Replies: 2
Views: 223

Re: 2012r2 visual style button click

Code isn't really necessary. On my desktop or a 2008 server I can see a very slight blink of the button when it's pressed. That doesn't seem to happen on my 2012 server. Flat seems to work better although it's difficult to find the exact system colors for the mousehover and border. Not my favorite b...
by dan.potter
Thu Aug 03, 2017 7:36 am
Forum: PowerShell GUIs
Topic: 2012r2 visual style button click
Replies: 2
Views: 223

2012r2 visual style button click

Anyone know how to make animated buttons in 2012? I've tried changing the visual effects for the os and each flat style appearance option for the button but it still does not indicate when the button is pressed.