This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# network connection test script. | |
$url = "http://www.google.com/" | |
$sleep = 1 | |
function test() { | |
try { | |
$meas = Measure-Command { | |
$response = Invoke-WebRequest $url | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\xxx] | |
@="URL:xxx Protocol" | |
"URL Protocol"="" | |
[HKEY_CLASSES_ROOT\xxx\shell] | |
[HKEY_CLASSES_ROOT\xxx\shell\open] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd c:\log | |
systeminfo > systeminfo.txt | |
msinfo32 /report msinfo32.txt | |
ipconfig /all > ipconfig.txt | |
schtasks /query /V > schtasks.txt | |
net use > netuse.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get-date -format yyyyMMdd | %{ $dd = $_ } | |
$dd = $(get-date -format yyyyMMdd) | |
cat ("C:\log\{0}.log" -f $dd) -wait -tail 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@findstr/v "^@f.*&" "%~f0"|powershell -&goto:eof | |
Write-Output "Hello World" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dism /Capture-Image /ImageFile:F:\win8.wim /CaptureDir:D:\ /Name:"win8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class StatusObserverFactory | |
{ | |
static public IObservable<bool> GetPowerStatusObserver() | |
{ | |
var obs = Observable.FromEvent<PowerModeChangedEventHandler, PowerModeChangedEventArgs>( | |
evc => (sender, evt) => evc(evt), | |
h => SystemEvents.PowerModeChanged += h, | |
h => SystemEvents.PowerModeChanged -= h | |
).Where(evt => evt.Mode == PowerModes.StatusChange) | |
.Select( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int runCommand(string cmd, string args) | |
{ | |
Log("コマンド実行:\n\t{0} {1}\n", cmd, args); | |
System.Diagnostics.Process process = new System.Diagnostics.Process() | |
{ | |
StartInfo = new System.Diagnostics.ProcessStartInfo() | |
{ | |
RedirectStandardOutput = true, | |
UseShellExecute = false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
taskkill /f /IM explorer.exe | |
if ERRORLEVEL 1 goto :err | |
start "" "explorer.exe" | |
exit | |
:err | |
echo ----------- failed ----------- | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsh wlan set hostednetwork mode=allow ssid=”MySSID” key=”passwd” |