Sunday, April 15, 2018

Windows Command Line Command for Control Panel Applets

Examples of all control panel applets commands, use to exec via command line & combined with runas to exec varying commands under differring permssions as needed


Run As Examples:

runas /username:FLCDTL01JD832S\aspdebug "rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl"

runas /username:FLCDTL01JD832S\aspdebug "rundll32.exe shell32.dll,Control_RunDLL ncpa.cpl"


Commands:

Control Panel AppletCommandOS Version
Accessibility Optionscontrol access.cplXP
Action Centercontrol /name Microsoft.ActionCenter8, 7
control wscui.cpl8, 7
Add Features to Windows 8control /name Microsoft.WindowsAnytimeUpgrade8
Add Hardwarecontrol /name Microsoft.AddHardwareVista
control hdwwiz.cplXP
Add or Remove Programscontrol appwiz.cplXP
Administrative Toolscontrol /name Microsoft.AdministrativeTools8, 7, Vista
control admintools8, 7, Vista, XP
Automatic Updatescontrol wuaucpl.cplXP
AutoPlaycontrol /name Microsoft.AutoPlay8, 7, Vista
Backup and Restore Centercontrol /name Microsoft.BackupAndRestoreCenterVista
Backup and Restorecontrol /name Microsoft.BackupAndRestore7
Biometric Devicescontrol /name Microsoft.BiometricDevices8, 7
BitLocker Drive Encryptioncontrol /name Microsoft.BitLockerDriveEncryption8, 7, Vista
Bluetooth Devicescontrol bthprops.cpl138, 7, Vista
control /name Microsoft.BluetoothDevicesVista
Color Managementcontrol /name Microsoft.ColorManagement8, 7, Vista
Color1WinColor.exe2XP
Credential Managercontrol /name Microsoft.CredentialManager8, 7
Client Service for NetWarecontrol nwc.cplXP
Date and Timecontrol /name Microsoft.DateAndTime8, 7, Vista
control timedate.cpl8, 7, Vista
control date/time8, 7, Vista, XP
Default Locationcontrol /name Microsoft.DefaultLocation7
Default Programscontrol /name Microsoft.DefaultPrograms8, 7, Vista
Desktop Gadgetscontrol /name Microsoft.DesktopGadgets7
Device Managercontrol /name Microsoft.DeviceManager8, 7, Vista
control hdwwiz.cpl8, 7, Vista
devmgmt.msc8, 7, Vista, XP3
Devices and Printerscontrol /name Microsoft.DevicesAndPrinters8, 7
control printers8, 7
Displaycontrol /name Microsoft.Display8, 7
control desk.cplXP
control desktopXP
Ease of Access Centercontrol /name Microsoft.EaseOfAccessCenter8, 7, Vista
control access.cpl8, 7, Vista
Family Safetycontrol /name Microsoft.ParentalControls8
File Historycontrol /name Microsoft.FileHistory8
Flash Player Settings Managercontrol flashplayercplapp.cpl8
Folder Optionscontrol /name Microsoft.FolderOptions8, 7, Vista
control folders8, 7, Vista, XP
Fontscontrol /name Microsoft.Fonts8, 7, Vista
control fonts8, 7, Vista, XP
Game Controllerscontrol /name Microsoft.GameControllers8, 7, Vista
control joy.cpl8, 7, Vista, XP
Get Programscontrol /name Microsoft.GetPrograms8, 7, Vista
Getting Startedcontrol /name Microsoft.GettingStarted7
Home Groupcontrol /name Microsoft.HomeGroup8, 7
Indexing Optionscontrol /name Microsoft.IndexingOptions8, 7, Vista
rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll8, 7, Vista, XP
Infraredcontrol /name Microsoft.Infrared8, 7
control irprops.cpl8, 7, Vista
control /name Microsoft.InfraredOptionsVista
Internet Optionscontrol /name Microsoft.InternetOptions8, 7, Vista
control inetcpl.cpl8, 7, Vista, XP
iSCSI Initiatorcontrol /name Microsoft.iSCSIInitiator8, 7, Vista
Keyboardcontrol /name Microsoft.Keyboard8, 7, Vista
control keyboard8, 7, Vista, XP
Languagecontrol /name Microsoft.Language8
Location and Other Sensorscontrol /name Microsoft.LocationAndOtherSensors7
Location Settingscontrol /name Microsoft.LocationSettings8
Mail4control mlcfg32.cpl58, 7, Vista, XP
Mousecontrol /name Microsoft.Mouse8, 7, Vista
control main.cpl8, 7, Vista
control mouse8, 7, Vista, XP
Network and Sharing Centercontrol /name Microsoft.NetworkAndSharingCenter8, 7, Vista
Network Connectionscontrol ncpa.cpl8, 7, Vista
control netconnections8, 7, Vista, XP
Network Setup Wizardcontrol netsetup.cpl8, 7, Vista, XP
Notification Area Iconscontrol /name Microsoft.NotificationAreaIcons8, 7
ODBC Data Source Administratorcontrol odbccp32.cplXP6
Offline Filescontrol /name Microsoft.OfflineFiles8, 7, Vista
Parental Controlscontrol /name Microsoft.ParentalControls7, Vista
Pen and Input Devicescontrol /name Microsoft.PenAndInputDevicesVista
control tabletpc.cplVista
Pen and Touchcontrol /name Microsoft.PenAndTouch8, 7
control tabletpc.cpl8, 7
People Near Mecontrol /name Microsoft.PeopleNearMe7, Vista
control collab.cpl7, Vista
Performance Information and Toolscontrol /name Microsoft.PerformanceInformationAndTools8, 7, Vista
Personalizationcontrol /name Microsoft.Personalization8, 7, Vista
control desktop8, 7, Vista
Phone and Modem Optionscontrol /name Microsoft.PhoneAndModemOptionsVista
control telephon.cplVista, XP
Phone and Modemcontrol /name Microsoft.PhoneAndModem8, 7
control telephon.cpl8, 7
Power Optionscontrol /name Microsoft.PowerOptions8, 7, Vista
control powercfg.cpl8, 7, Vista, XP
Printers and Faxescontrol printersXP
Printerscontrol /name Microsoft.PrintersVista
control printersVista
Problem Reports and Solutionscontrol /name Microsoft.ProblemReportsAndSolutionsVista
Programs and Featurescontrol /name Microsoft.ProgramsAndFeatures8, 7, Vista
control appwiz.cpl8, 7, Vista
Recoverycontrol /name Microsoft.Recovery8, 7
Regioncontrol /name Microsoft.RegionAndLanguage8
control intl.cpl8
control international8
Region and Languagecontrol /name Microsoft.RegionAndLanguage7
control intl.cpl7
control international7
Regional and Language Optionscontrol /name Microsoft.RegionalAndLanguageOptionsVista
control intl.cplVista
control internationalVista, XP
RemoteApp and Desktop Connectionscontrol /name Microsoft.RemoteAppAndDesktopConnections8, 7
Scanners and Camerascontrol /name Microsoft.ScannersAndCameras8, 7, Vista
control sticpl.cplXP
Scheduled Taskscontrol schedtasksXP7
Screen Resolutioncontrol desk.cpl8, 7
Security Centercontrol /name Microsoft.SecurityCenterVista
control wscui.cplXP
Software Explorers8msascui.exe9XP
Soundcontrol /name Microsoft.Sound8, 7
control /name Microsoft.AudioDevicesAndSoundThemesVista
control mmsys.cpl8, 7, Vista
Sounds and Audio Devicescontrol mmsys.cplXP
Speech Recognition Optionscontrol /name Microsoft.SpeechRecognitionOptionsVista
Speech Recognitioncontrol /name Microsoft.SpeechRecognition8, 7
Speechcontrol sapi.cpl10XP
Storage Spacescontrol /name Microsoft.StorageSpaces8
Sync Centercontrol /name Microsoft.SyncCenter8, 7, Vista
Systemcontrol /name Microsoft.System8, 7, Vista
control sysdm.cplXP
System Propertiescontrol sysdm.cpl8, 7, Vista
Tablet PC Settingscontrol /name Microsoft.TabletPCSettings8, 7, Vista
Task Scheduler7control schedtasks8, 7, Vista
Taskbarcontrol /name Microsoft.Taskbar8
rundll32.exe shell32.dll,Options_RunDLL 18
Taskbar and Start Menucontrol /name Microsoft.TaskbarAndStartMenu7, Vista
rundll32.exe shell32.dll,Options_RunDLL 17, Vista, XP
Text to Speechcontrol /name Microsoft.TextToSpeech8, 7, Vista
Troubleshootingcontrol /name Microsoft.Troubleshooting8, 7
User Accountscontrol /name Microsoft.UserAccounts8, 7, Vista
control userpasswords8, 7, Vista, XP
Welcome Centercontrol /name Microsoft.WelcomeCenterVista
Windows 7 File Recoverycontrol /name Microsoft.BackupAndRestore8
Windows Anytime Upgradecontrol /name Microsoft.WindowsAnytimeUpgrade7, Vista
Windows CardSpacecontrol /name Microsoft.CardSpace7, Vista
control infocardcpl.cpl7, Vista
Windows Defendercontrol /name Microsoft.WindowsDefender8, 7, Vista11
Windows Firewallcontrol /name Microsoft.WindowsFirewall8, 7, Vista
control firewall.cpl8, 7, Vista, XP
Windows Marketplacecontrol /name Microsoft.GetProgramsOnlineVista
Windows Mobility Centercontrol /name Microsoft.MobilityCenter8, 7, Vista
Windows Sidebar Propertiescontrol /name Microsoft.WindowsSidebarPropertiesVista
Windows SideShowcontrol /name Microsoft.WindowsSideShow8,7, Vista
Windows Updatecontrol /name Microsoft.WindowsUpdate8, 7, Vista12
Wireless Linkcontrol irprops.cplXP
Wireless Network Setup Wizard?XP

Disable Task Manager : Applies to Win 7 and up:

Disable Task Manager : Applies to Win 7 and up:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableTaskMgr"=dword:00000001

Results in task manager grayed out:


Wednesday, March 14, 2018

Optimize WIFI Adapter: Improve Network Performance

Tried on Surface Pro2 WIFI adapter:'


1. Reg
submitted  by [deleted]
A while back, I was having an issue with my SP2 only connecting at 11Mbps or 5Mbps to my wifi. Awful.
Found a solution. Flipped the 2.4GhzAutoUse40MHz key from '0' to '1' in the registry, and I'm now cruising at >200Mbps link speed.
1) Open device manager, and find the wifi adapter.
2) Open the Details page, and get the Driver ID. It'll probably be something like {4d36e972-e325-11ce-bfc1-08002be10318}\0003
3) Open regedit and go to HKLM\SYSTEM\ControlSet001\Control\Class{4d36e972-e325-11ce-bfc1-08002be10318}\0003
4) Double check that you're in the right key by looking at the DriverDesc value.
5) Change 2.4GHzAutoUse40MHz from '0' to '1'.
6) Reboot

2. netsh




Friday, March 2, 2018

WOL Wake On Lan : Wake Up from Sleep and Shutdown

Finally got mine working, albeit a few varying resources rto get both Sleep and Shutdown to work!

Tested on Win7 & Win8

1. Set NIC Card
     Wake on Packet
     Power Mgmt Tab: Allow turn on
     https://www.howtogeek.com/70374/how-to-geek-explains-what-is-wake-on-lan-and-how-do-i-enable-it/

and enable these

image
     and
     Enable WOL on the network adapter + Enable WOL in BIOS
         http://davidamphlett.net/2014/04/23/enabling-wake-on-lan-from-a-powered-off-state-windows-8-1/
    
2. Set Power Options
     Allow Windows to be woken from PCI/e devices
         http://davidamphlett.net/2014/04/23/enabling-wake-on-lan-from-a-powered-off-state-windows-8-1/
        
    
3. (WIN8) Disable Fast StartUp Start
     https://support.microsoft.com/en-us/help/2776718/wake-on-lan-wol-behavior-in-windows-8-windows-8-1-and-windows-10
     In case option not enabled:
         https://www.eightforums.com/threads/fast-startup-turn-on-or-off-in-windows-8.6320/
         https://www.sevenforums.com/tutorials/819-hibernate-enable-disable.html via powercfg -h on


image

3(WIN7) Install Simple TCPIP Svcs:

https://www.cnetsys.com/how-to-enable-wake-on-lan-wol-windows-7/


4. Test :

a. On remote computer test both:

    Sleep
    and
     Shutdown

b. I use this tool. To scan and WOL any computer on network:

image

Thursday, March 1, 2018

Using String.Equals() not working as intended error in Lamda

You may get error :

"

Incorrect number of arguments supplied for call to method 'Boolean Equals

"

When trying to use string.Equals() in lamda, this issue can be resolved by using 

Compare instead of Equals.


Explanation: "When using LINQ to Entities, it will automatically convert it to LINQ to SQL. And if the database field you are doing a .Equals on does not have a collate of NOCASE (SQLite in my example) then it will always be case-sensitive. In otherwords, the database defines how to do the string comparison rather than code." per  https://stackoverflow.com/questions/5080727/string-equals-not-working-as-intended/22978905


Example:

  //does NOT work when coalesce is DataColumn on

                var rows = db.WorkflowStartQueues.Where(x => (x.WorkflowStatus != null) && string.Equals(x.WorkflowStatus, workflowStatus, StringComparison.CurrentCultureIgnoreCase)).ToList();

                //DOES work not db reliant

                var rows2 = db.WorkflowStartQueues.Where(x => string.Compare(x.WorkflowStatus, workflowStatus, true) == 0).ToList();

                


More info:

Case insensitive string equality comparison

Use the String:Compare(string,string,bool) method to explicitly express a case-insensitive complete string equality operation. The generated SQL will not depend on the case-sensitivity of the current database collation.
LINQ: … .Where( x => string.Compare(x.FirstName, simpleParam, true) == 0 ) …
SQL: … where upper(a.FirstName) = upper(@p1) …

Thursday, February 22, 2018

VLC Stream Music Playlist to HTTP: Create your own radio station!

Some examples below:


Stream to Command Line (no VLC  GUI)


vlc -I dummy -vvv file:///C:/Users/DoyleJUser/Music/PlayList.Local.201708.xspf --sout="#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=mp3,dst=:8085/}" --sout-keep




Stream to GUI

vlc file:///C:/Users/DoyleJUser/Music/PlayList.Local.201708.xspf --sout="#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{mux=mp3,dst=:8085/}" --sout-keep



Remote Control of VLC via Browser or Android App

VLC    Remote Controls
  https://hobbyistsoftware.com/vlcsetup-win-manual
  http://www.teqlog.com/control-vlc-media-player-remotely.html
 



Conclusion
 VLC Remote Example URL
ttp://192.168.1.14:8080/

  VLC Stream URL:
p://192.168.1.14:8085/


Friday, February 16, 2018

How to BackUp from Android to Desktop using ADB via a Context Menu

Pre-Req's:



install sdk, make sure you know how to run adb from cmd prompt.
Run cmd  as Admin:




1. Figure out paths of your internal/external cards


  adb shell ls $EXTERNAL_STORAGE
  adb shell ls $SECONDARY_STORAGE

 2. Test commands to work with external/internal

  cd C:\Work\Tools\Misc\Android\sdk\platform-tools 
// INTERNAL
  adb pull /sdcard/Backups/ C:\Temp\Phone\Media\20180216\Backups
  // EXT SD CARD
  adb pull /storage/D02B-5AB9/backups/ C:\Temp\Phone\Media\20180216\Backups


  3. Create a bat file to backup all folders using those commands


   See Synch.Phone.BackUp.bat below
   Save to C:\temp (or ur own dir)
   Run bat file like so: Synch.Phone.Backup C:\Temp\Phone\20180216



  
  4. Add Reg file so we have a context menu


  




Windows Registry Editor Version 5.00
 
  [HKEY_CLASSES_ROOT\Directory\shell\Synch03_PUSHPhoneHere]
  @="Execute Synch03_PUSHPhoneHere"
 
  [HKEY_CLASSES_ROOT\Directory\shell\Synch03_PUSHPhoneHere\command]
  @="\"C:\\Temp\\Synch.Phone.BackUp.bat\" \"%1\""
  

Bat File    See Synch.Phone.BackUp.bat

*** note your External SD card may b different. Mine is D02B-5AB9



@ECHO OFF
SET dest=%1
setlocal
:PROMPT
SET /P AREYOUSURE=Are you sure U WANT TO %dest% BACKUP TO  (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO exitMe

 Echo START Synch.Phone.BackUp.bat
 cd %ANDROID_HOME%

 ECHO ****************dest: %dest%
 ECHO ****************START  %DATE% %TIME% synch

 ECHO ****************Current Folder Name: %foldername%

 ECHO ONE way copy phone to BU location
 ECHO synch excluding older file, This should preserve newer copy exist in both locations
 ECHO  ******* Start COPY Internal...

 mkdir %dest%\Backups\Test
 adb pull /sdcard/Backups/Test %dest%\Backups\Test
 mkdir %dest%\Backups
 adb pull /sdcard/Backups %dest%\Backups
 mkdir %dest%\Pictures
 adb pull /sdcard/Pictures %dest%\Pictures


 ECHO  ******* Start COPY External...


 mkdir %dest%\Backups\Test
 adb pull /storage/D02B-5AB9/Backups/Test %dest%\Backups\Test
 mkdir %dest%\Backups
 adb pull /storage/D02B-5AB9/Backups %dest%\Backups


 ECHO ****************DONE  %DATE% %TIME% synch

 cd C:\temp
 pause
:exitMe
 ECHO  ******* exiting...