Thank you sir.
namerg
Posts
-
Guidelines to code and create a service account to enable/disable wireless ? -
Guidelines to code and create a service account to enable/disable wireless ?Hello, I have the basics of programming but no idea how to code nowadays. I would like to make an executable or service, or something that allows me to turn off the wireless connectivity if laptop is connected physically using the port. And if laptop gets unplugged from the physical lan, then the wireless nic becomes active until connects to a wifi network. In other words, would like to make something like a connection switcher. Have no idea, where to start. Thanks for your advice and guidelines.
-
How to add website into compatibility view ?I fixed that part i had to change the string name variable to something else, it was bringing another value from the top. But on this section: subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary);
I get ArgumentException was unhandled {"The type of the value object did not match the specified RegistryValueKind or the object could not be properly converted."}
-
How to add website into compatibility view ?Thank you i think i figured it out
-
How to add website into compatibility view ?Hello, I am not an expert in C# but this site helped a lot creating a mini application that launches IE9, modifies some registry keys and bingo. Now, I have to add a few modifications but launch IE11. This is the code:
//Select the RegistryHive you wish to read from
RegistryKey key00 = RegistryKey.OpenRemoteBaseKey(RegistryHive.CurrentUser, "");//Select the path within the hive RegistryKey subkeyAA = key00.OpenSubKey("Software\\\\Microsoft\\\\Internet Explorer\\\\BrowserEmulation\\\\ClearableListData", true); string\[\] namesAA = subkeyAA.GetValueNames(); string YesUserFilter = ""; string NoUserFilter = ""; foreach (string name in namesAA) { if (name.Equals("UserFilter", StringComparison.CurrentCulture)) { // Found UserFilter YesUserFilter = "1"; break; } else { // No Found UserFilter NoUserFilter = "1"; } } if (YesUserFilter == "1") { int myValue = (int)subkeyAA.GetValue("UserFilter"); if (myValue != 0) { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } } if (NoUserFilter == "1") { //Console.WriteLine("Setting the right GE Recommendation"); subkeyAA.SetValue("UserFilter", "company.com", RegistryValueKind.Binary); } subkeyAA.Close();
But the conditionals of YesUserFilter or NoUserFilter are blank, Thoughts ? Thanks for your help.
-
IE 11 Registry EntriesThank you very much sir.
-
IE 11 Registry EntriesWell, i did the setting for IE9 using C#. If i do not know the entries i cannot move forward though. ;) Thanks,
-
IE 11 Registry EntriesHello, I am using IE11 I would like to know the registry entries to check/uncheck the Properties "Use TLS 1.0, Use TLS 1.1, Use TLS 1.2. Also, the registry entry for uncheck/check the "Display intranet sites in compatibility view" under Tools/Compatibility Settins Thanks for your help,
-
Powershell: Dynamic Email Message BodyHello, not sure if I am in the right spot to post my question about PowerShell/PowerCLI I have a script in powershell that will send an email to an outlook client. The msg body will have values regarding to two things: Active Snapshots in the virtual environment and CD ROMs attached to the VMs. Let's talk when the email reports more that one CDRoms attached, how do I increase or decrease the msg body depending of the results gathered from the virtual environment ? So, far I have this code:
if (($Snapshots -eq "yes") -or ($cdroms -eq "yes"))
{
$array0 = @()
$array1 = @()
$array2 = @()
$array3 = @()
start-sleep 1
connect-VIServer $vcserver
$array0 += Get-VM | get-snapshot | %{$_.VM.Name}
$array1 += Get-VM | get-snapshot | select-object -expandproperty Name
$array2 += Get-VM | get-snapshot | select-object -expandproperty Created
$array3 =@(Get-VM | where { $_ | Get-CDdrive | where { $_.ConnectionState.Connected -eq "true" } } | Select-object -ExpandProperty Name)
$i = 0
$j = 0
Do {
$msg.Body += "<FONT COLOR=black>VMware HealthCheck vCenter2</FONT><BR><BR>" + `
"<B><FONT COLOR=black>Snapshots Active</FONT></B><BR>" + `
"<B><FONT COLOR=black>VM Name</FONT></B>"+`
"<B><FONT COLOR=black> `
Name</FONT></B>"+`
"<B><FONT COLOR=black> `
Created</FONT></B><BR>"+`
"<FONT COLOR=Red>"+$array0+"</FONT>"