Saturday, 7 March 2015
Shutdown.exe switches
C:\WINDOWS\system32>shutdown /?
Usage: shutdown [/i | /l | /s | /r | /a | /p | /h | /e] [/f]
[/m \\computer][/t xxx][/d [p:]xx:yy [/c "comment"]]
No args Display help. This is the same as typing /?
/? Display help. This is the same as not typing any options
/i Display the graphical user interface (GUI).
This must be the first option
/l Log off. This cannot be used with /m or /d option
/s Shutdown the computer
/r Shutdown and restart the computer
/a Abort a system shutdown.
This can only be used during the time-out period
/p Turn off the local computer with no time-out or warning.
This can only be used with /d option
/h Hibernate the local computer.
This can only be used with the /f option
/e Document the reason for an unexpected shutdown of a computer
/m \\computer Specify the target computer
/t xxx Set time-out period before shutdown to xxx seconds.
The valid range is 0-600, with a default of 30
/c "comment" Comment on the reason for the restart or shutdown.
Maximum of 127 characters allowed
/f Force running applications to close without forewarning users
/d [p:]xx:yy Provide the reason for the restart or shutdown
p indicates that the restart or shutdown is planned
xx is the major reason number (positive integer less than 256)
yy is the minor reason number (positive integer less than 65536)
Friday, 6 March 2015
How to create an Update System Time Shortcut for Windows 7
1. Create a .bat file containing the following text (the fourth line is optional):
@echo off
net start w32time
w32tm /resync
net start w32time
w32tm /resync
%windir%\explorer.exe shell:::{E2E7934B-DCE5-43C4-9576-7FE4F75E7480}
2. Create a shortcut to the new bat file.
3. Allow "Run As Administrator" in Advanced Properties section of the Shortcut Properties
Friday, 21 June 2013
How To Remove A Text Box or any unselectable object from Excel 2003/2007
We need to activate Design Mode where all objects are selectable:
Tools > Customize > Toolbars : Tick "Exit Design Mode"
(Although Excel 2003 calls the button "Exit Design Mode" it is in fact a toggle switch for Design Mode. I suggest attaching the new small (only one icon!) toolbar to the Excel menus.)
You can now toggle between design mode on and off by clicking the Design Mode icon.
With Design Mode on, select the object you wish to delete (in this case the text box) and delete it...
Switch off Design Mode again. Optionally remove "Exit Design Mode" toolbar from Excel.
Tools > Customize > Toolbars : Tick "Exit Design Mode"
(Although Excel 2003 calls the button "Exit Design Mode" it is in fact a toggle switch for Design Mode. I suggest attaching the new small (only one icon!) toolbar to the Excel menus.)
You can now toggle between design mode on and off by clicking the Design Mode icon.
With Design Mode on, select the object you wish to delete (in this case the text box) and delete it...
Switch off Design Mode again. Optionally remove "Exit Design Mode" toolbar from Excel.
Saturday, 19 January 2013
Useful Pythonic Links
NumPy http://docs.scipy.org/doc/numpy/reference/
SciPy http://docs.scipy.org/doc/scipy/reference/
Stackless http://www.stackless.com/wiki
MatPlotLib http://matplotlib.org/contents.html
PIL http://pythonware.com/library/pil/handbook/
MLPy http://mlpy.sourceforge.net/docs/3.5/
PyMC http://pymc-devs.github.com/pymc/
Orange http://orange.biolab.si/docs/latest/
PyBrain http://pybrain.org/docs/
SciKit Learn http://scikit-learn.org/stable/user_guide.html
PyWin32 http://sourceforge.net/projects/pywin32/files/
PyWinAuto http://code.google.com/p/pywinauto/
PyPI http://pypi.python.org/pypi
50 Modules http://www.catswhocode.com/blog/python-50-modules-for-all-needs
Python 2.7 http://docs.python.org/2/
SciPy http://docs.scipy.org/doc/scipy/reference/
Stackless http://www.stackless.com/wiki
MatPlotLib http://matplotlib.org/contents.html
PIL http://pythonware.com/library/pil/handbook/
MLPy http://mlpy.sourceforge.net/docs/3.5/
PyMC http://pymc-devs.github.com/pymc/
Orange http://orange.biolab.si/docs/latest/
PyBrain http://pybrain.org/docs/
SciKit Learn http://scikit-learn.org/stable/user_guide.html
PyWin32 http://sourceforge.net/projects/pywin32/files/
PyWinAuto http://code.google.com/p/pywinauto/
PyPI http://pypi.python.org/pypi
50 Modules http://www.catswhocode.com/blog/python-50-modules-for-all-needs
Python 2.7 http://docs.python.org/2/
Tuesday, 20 November 2012
How to turn on automatic logon in Windows XP
Method 1:
Note: To learn more about editing the registry before proceeding with this article, click the following link to view the article on the Microsoft website:http://technet.microsoft.com/en-us/library/cc755256.aspx
You can use Registry Editor to add your log on information. To do this, follow these steps:
- Click Start, click Run, type regedit, and then click OK.
- Locate the following registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Using your account name and password, double-click the DefaultUserName entry, type your user name, and then click OK.
- Double-click the DefaultPassword entry,
type your password under the value data box, and then click
OK.
If there is no DefaultPassword value, create the value. To do this, follow these steps:- In Registry Editor, click Edit, click New, and then click String Value.
- Type DefaultPassword as the value name, and then press ENTER.
- Double-click the newly created key, and then type your password in the Value Data box.
- Double-click the AutoAdminLogon entry,
type 1 in the Value Data box, and then
click OK.
If there is no AutoAdminLogon entry, create the entry. To do this, follow these steps:- In Registry Editor, click Edit, click New, and then click String Value.
- Type AutoAdminLogon as the value name, and then press ENTER.
- Double-click the newly created key, and then type 1 in the Value Data box.
- Exit Registry Editor.
- Click Start, click Restart, and then click OK.
If you want to bypass the automatic logon to log on as a different user, hold down the SHIFT key after you log off or after Windows XP restarts. Note that this procedure applies only to the first logon. To enforce this setting for future logoffs, the administrator must set the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value:ForceAutoLogon
Type: REG_SZ
Data: 1
Method 2:
You can also turn on automatic logon without editing the registry in Windows XP Home Edition and in Windows XP Professional on a computer that is not joined to a domain. To do this, follow these steps:
- Click Start, and then click Run.
- In the Open box, type control
userpasswords2, and then click OK.
Note When users try to display help information in the User Accounts window in Windows XP Home Edition, the help information is not displayed. Additionally, users receive the following error message:Cannot find the Drive:\Windows\System32\users.hlp Help file. Check to see that the file exists on your hard disk drive. If it does not exist, you must reinstall it. - Clear the "Users must enter a user name and password to use this computer" check box, and then click Apply.
- In the Automatically Log On window, type the password in the Password box, and then retype the password in the Confirm Password box.
- Click OK to close the Automatically Log On window, and then click OK to close the User Accounts window.
Mostly Free Software Tools
X-Platform
Python 2.7
Eric - Python IDE
GCC - C++ Compiler
CodeBlocks - C++ IDE
CodeLite - C++ IDE
VIM - Robust Text/Code Editor
FreeFileSync - Folder Comparison & Synchronisation
Dropbox - Cloud Storage
TrueCrypt - File Encryption
7Zip - File Archiver
Firefox - Web Browser
Firefox Add-ons Extensions - AdblockPlus,AdblockPlus PopUp Blocker,Hotmail Watcher, X-Notifier Lite, Ghostery, RightToClick, Flagfox, DownThemAll!, Tab Mix Plus
TWS API
IBPy - Python Thin Layer TWS API
VLC - Media Player/Viewer
Audacity - Comprehensive Audio Editor
Oracle Virtualbox - Keep Trucking !
dupeGuru - comprehensive duplicate file finder
MS Windows Only
WinSplit Revolution - Custom Windows Arranger
Notepad++ - Useful Lighweight Text/Code Editor
IrfanView - Image Viewer with Paintbox
NinjaTrader - Flexible Charting / Order Entry Software
TSim+ - Lightweight Order Entry Frontend for IB
MS Office - not free
KingSoft Office - free real alternative to MS Office
MS Security Essentials
QTTabBar - Tabbed File Explorer
7+ TaskBar Tweaker - Rearrange Taskbar Icons incl grouped items
SearchMyFiles - Very powerful file and easy to use search including duplicate files
Diagram Designer - Draw flow charts easily
EaseUS Partition Master Free Edition
Paint.net
Linux Only
Libre Office Suite - Free with Ubuntu
Python 2.7
Eric - Python IDE
GCC - C++ Compiler
CodeBlocks - C++ IDE
CodeLite - C++ IDE
VIM - Robust Text/Code Editor
FreeFileSync - Folder Comparison & Synchronisation
Dropbox - Cloud Storage
TrueCrypt - File Encryption
7Zip - File Archiver
Firefox - Web Browser
Firefox Add-ons Extensions - AdblockPlus,AdblockPlus PopUp Blocker,
TWS API
IBPy - Python Thin Layer TWS API
VLC - Media Player/Viewer
Audacity - Comprehensive Audio Editor
Oracle Virtualbox - Keep Trucking !
dupeGuru - comprehensive duplicate file finder
MS Windows Only
WinSplit Revolution - Custom Windows Arranger
Notepad++ - Useful Lighweight Text/Code Editor
IrfanView - Image Viewer with Paintbox
NinjaTrader - Flexible Charting / Order Entry Software
TSim+ - Lightweight Order Entry Frontend for IB
KingSoft Office - free real alternative to MS Office
MS Security Essentials
QTTabBar - Tabbed File Explorer
7+ TaskBar Tweaker - Rearrange Taskbar Icons incl grouped items
SearchMyFiles - Very powerful file and easy to use search including duplicate files
Diagram Designer - Draw flow charts easily
EaseUS Partition Master Free Edition
Paint.net
Linux Only
Libre Office Suite - Free with Ubuntu
Monday, 19 November 2012
How To Change System Date And Time in Python
import sys
import datetime
def _win_set_time(time_tuple):
import pywin32
# http://timgolden.me.uk/pywin32-docs/win32api__SetSystemTime_meth.html
# pywin32.SetSystemTime(year, month , dayOfWeek , day , hour , minute , second , millseconds )
dayOfWeek = datetime.datetime(time_tuple).isocalendar()[2]
pywin32.SetSystemTime( time_tuple[:2] + (dayOfWeek,) + time_tuple[2:])
def _linux_set_time(time_tuple):
import ctypes
import ctypes.util
import time
# /usr/include/linux/time.h:
#
# define CLOCK_REALTIME 0
CLOCK_REALTIME = 0
# /usr/include/time.h
#
# struct timespec
# {
# __time_t tv_sec; /* Seconds. */
# long int tv_nsec; /* Nanoseconds. */
# };
class timespec(ctypes.Structure):
_fields_ = [("tv_sec", ctypes.c_long),
("tv_nsec", ctypes.c_long)]
librt = ctypes.CDLL(ctypes.util.find_library("rt"))
ts = timespec()
ts.tv_sec = int( time.mktime( datetime.datetime( *time_tuple[:6]).timetuple() ) )
ts.tv_nsec = time_tuple[6] * 1000000 # Millisecond to nanosecond
# http://linux.die.net/man/3/clock_settime
librt.clock_settime(CLOCK_REALTIME, ctypes.byref(ts))
time_tuple = ( 2012, # Year
9, # Month
6, # Day
0, # Hour
38, # Minute
0, # Second
0, ) # Millisecond
if sys.platform=='linux2':
_linux_set_time(time_tuple)
elif sys.platform=='win32':
_win_set_time(time_tuple)
from: http://stackoverflow.com/questions/12081310/python-module-to-change-system-date-and-time
Subscribe to:
Posts (Atom)