Tag: line

Python

Line oriented command interpreter in Python

The Cmd class provides a simple framework for writing line-oriented command interpreters. A Cmd instance or subclass instance is a line-oriented interpreter framework. There is no good reason to instantiate Cmd itself; rather, it’s useful as a superclass of an interpreter class you define yourself in order to inherit Cmd‘s methods and encapsulate action methods. …

Microsoft Windows

Disable screensaver via command line

To disable screen saver: reg add “HKEY_CURRENT_USERControl PanelDesktop” /v ScreenSaveActive /t REG_SZ /d 0 /freg add “HKEY_CURRENT_USERControl PanelDesktop” /v ScreenSaveActive /t REG_SZ /d 0 /f To enable screen saver: reg add “HKEY_CURRENT_USERControl PanelDesktop” /v ScreenSaveActive /t REG_SZ /d 1 /freg add “HKEY_CURRENT_USERControl PanelDesktop” /v ScreenSaveActive /t REG_SZ /d 1 /f

Microsoft Windows

Change Power Button Action using command line

Open a cmd window and run the following command: reg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Start_PowerButtonAction /t REG_DWORD /d 16 /freg add "HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced" /v Start_PowerButtonAction /t REG_DWORD /d 16 /f To apply the change, restart explorer.exe or log off and login back.

Microsoft Windows, Windows 7

Enable or Disable UAC from command line

Run Windows command line (cmd) as administrator. Enable UAC reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 1 /freg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 1 /f Disable UAC reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 0 /freg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 0 /f

Microsoft Windows

Create event from command line in Windows

Using eventcreate command you can create a custom event and log it in any of the event log files(System, Application). Usage: eventcreate /id event_id /d event_description /t event_type /l event_log_fileeventcreate /id event_id /d event_description /t event_type /l event_log_file /s Computer : Specifies the name or IP address of a remote computer (do not use backslashes). …

Microsoft Windows, Windows 7

Change windows wallpaper from command line

Open command line and execute: reg add "HKEY_CURRENT_USERControl PanelDesktop" /v Wallpaper /t REG_SZ /d  C:wallpaperpathimage.jpg /freg add "HKEY_CURRENT_USERControl PanelDesktop" /v Wallpaper /t REG_SZ /d  C:wallpaperpathimage.jpg /f to set new wallpaper and execute: RUNDLL32.EXE user32.dll,UpdatePerUserSystemParametersRUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters to activate the new wallpaper.