コマンドプロンプトでqueryコマンドを叩くとで下記のような結果を得られる。
ユーザ名の前に[>]が付いていると、現在ログインしているユーザを示すようだ。
C:\Users\user1>query user
ユーザー名 セッション名 ID 状態 時間 ログオン時刻
user0 2 Disc 16:38 2017/10/30 17:54
>user1 rdp-tcp#0 5 Active . 2017/11/21 10:51
C:\Users\user1>query user
ユーザー名 セッション名 ID 状態 時間 ログオン時刻
user0 2 Disc 16:38 2017/10/30 17:54
>user1 rdp-tcp#0 5 Active . 2017/11/21 10:51
# RSAファイルの作成
$ ssh-keygen -t rsa -b 4096 -C "git-bash-dml-gitlab-rsa"
# SSH Keysの保存先。特に気にしなければそのままEnterを入力
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
# パスフレーズの入力を求められるので入力Enter passphrase (empty for no passphrase): [Type a passphrase]
# もう一度入力
Enter same passphrase again: [Type passphrase again]
clip < %USERPROFILE%\.ssh\id_rsa.pubさて、Clone Commit Pushと思ったら証明書のパスワード毎回聞かれる。
$ eval `ssh-agent`
> Agent pid xxxx
$ ssh-add ~/.ssh/id_rsa
> Enter passphrase for /c/Users/you/.ssh/id_rsa:
> Identity added: /c/Users/you/.ssh/id_rsa (/c/Users/you/.ssh/id_rsa)
:: ssh-agent起動
cd "C:\Program Files\Git\usr\bin"
if not "%SSH_AGENT_PID%" == "" goto end
for /f "eol=; tokens=1,2 delims==;" %%1 in ('ssh-agent.exe') do (
if "%%1" == "SSH_AUTH_SOCK" set SSH_AUTH_SOCK=%%2
if "%%1" == "SSH_AGENT_PID" set SSH_AGENT_PID=%%2
)
:: id追加
ssh-add.exe "%userprofile%\.ssh\id_rsa"
:: 最後にssh-agentプロセスを切る
cd "C:\Program Files\Git\usr\bin"
ssh-agent.exe -k
A:192.168.0.x/24 <-> PC-A <-> B:192.168.1.x/24 <-> C:192.168.2.x/24 <- PC-Bとりあえず、PC-BからPC-Aにpingを打っても帰ってこない状況。
route -p add 192.168.2.0 mask 255.255.255.0 192.168.1.251 metric 5 if 0x10003
---------------------------表示された警告内のリンクに飛んでみると
MAXScript MacroScript Error Exception
---------------------------
-- Runtime error: dotNet runtime exception: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
---------------------------
OK
---------------------------
<loadFromRemoteSources enabled="true|false"/>を追加したら?みたいな事が書いてあったが、そういう事じゃない気がすると思って他の方法を探す事にした。
これで解決した。
- 「ワークステーション」の「システム トポロジを表示します。」を選択します。
- リストにある「EDIDステータス」の【モニター…】をクリックします。
- EDIDのエクスポートの【EDIDのエクスポート】を押し、EDID情報をテキストとして保存します。
- 「システム トポロジの表示」に戻り、再度「EDIDステータス」の【モニター…】をクリックします。
- 保存したEDID情報ファイルを読み込ませます。
dir /s /b [file name]任意のディレクトリに移動しカレントディレクトリ以下のファイルを検索する。
C:¥users¥user¥aaa¥bbb¥ccc¥ddd.txt
# bb-process-checker.bat内容は、”応答なし”になっていて、ウィンドウタイトルに”Backburner”うんたらと書いてあるプロセスがあったら、フラグを立ててプロセスを切ってあげて、最後にbackburnerのプロセスを確認して、起動していなかったら起動させる.というもの.
-----
@echo off
set BB_FLAG=0
set BB_PROCESS_CHECK=`tasklist /NH /FI "WINDOWTITLE eq Backburner*" /FI "STATUS eq NOT RESPONDING"`
for /F "skip=1 usebackq tokens=1" %%i in (%BB_PROCESS_CHECK%) do (set BB_FLAG=1)
IF 1==%BB_FLAG% (
taskkill /F /FI "WINDOWTITLE eq Backburner*"
taskkill /F /IM WerFault.exe
)
powershell -Command "&{$p='%ProgramFiles(x86)%\Autodesk\Backburner\server.exe';if(!(ps|?{$_.path -eq $p})){&$p}}"
exit
-----
setx <環境変数名> <値>上記コマンドだとユーザー環境変数に登録される.
setx <環境変数名> <値> -m削除する場合は以下のように、値に空白?Null?を渡してあげると、値を空っぽにしてくれる.
setx <環境変数名> ""しかし、私の意図する動きではない.
powercfg /devicequery all_devices表示された結果内からビデオカードの項目を探すのが面倒なので、findstrに渡して上げる.コマンドプロンプトに表示すると畏まるので、findstrの結果をmsgに渡してあげることで、若干取っ付きやすい表示になると思う.
powercfg /devicequery all_devices | findstr NVIDIA | msg %username%上記コマンドをbatファイルにしておいて、ファイルをダブルクリックすれば、ポップして表示してくれる.
"C:¥Program Files¥ImageMagick-6.8.8-Q16¥convert.exe" "D:¥source¥path¥file-%05d.png"[0-55] "D:¥destination¥path¥file.gif"gifも連番で出したい場合は以下の通りだ
"C:¥Program Files¥ImageMagick-6.8.8-Q16¥convert.exe" "D:¥source¥path¥file-%05d.png"[0-55] "D:¥destination¥path¥file-%05d.gif"[0-55]なるほど、今回キーとなったのは以下の部分だと思う
%05d: 0埋め5桁にしたい場合(file-00001.png)
[0-55]:任意のファイルを記述する(全ファイルの場合は"file-*.png")
sample.jsx
----
url = "http://www.google.com/"
system.callSystem("cmd.exe /c rundll32 url.dll,FileProtocolHandler "+ url)
変更前ちなみに「@(規定値)」に渡す文字列は、「HKEY_CLASSES_ROOT\」以下にある任意のソフトウェアのキー名と同じでなければならない事に気をつける.
[HKEY_CLASSES_ROOT\.aep]変更後
@="AfterEffects.Project.70"
[HKEY_CLASSES_ROOT\.aep]
@="Adobe.AfterEffects.Project.90"
USER>reg add HKCR\.aep /f /ve /t REG_SZ /d Adobe.AffterEffects.Project.90レジストリを登録したら、explorerの再起動か、マシンの再起動で設定が反映される.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.aep\UserChoice削除後は同様に再起動すれば、反映されてアイコンも正常に表示されるだろう.
[HKEY_CLASSES_ROOT\.aep]設定後に、aepファイルを右クリックすると以下のような表示になる.
@="Adobe.AfterEffects.Project.90"
[HKEY_CLASSES_ROOT\Adobe.AfterEffects.Project.90\shell\open1]
@="Open with Adobe After Effects 7"
[HKEY_CLASSES_ROOT\Adobe.AfterEffects.Project.90\shell\open1\command]
@="\"C:\\Program Files (x86)\\Adobe\\Adobe After Effects 7.0\\Support Files\\AfterFX.exe\" \"%1\""
[HKEY_CLASSES_ROOT\Adobe.AfterEffects.Project.90\shell\open2]
@="Open with Adobe After Effects CS6"
[HKEY_CLASSES_ROOT\Adobe.AfterEffects.Project.90\shell\open2\command]
@="\"C:\\Program Files\\Adobe\\Adobe After Effects CS6\\Support Files\\AfterFX.exe\" \"%1\""
キー名:SharedSectionの2番目の引数を20480(マイクロソフト推奨)に設定して再起動したら表示されなくなった.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystemsキー内の値名:
Windows修正前の値:
%SystemRoot%\system32\csrss.exe修正後の値:
ObjectDirectory=\Windows
SharedSection=1024,12288,768
Windows=On
SubSystemType=Windows
ServerDll=basesrv,1
ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=winsrv:ConServerDllInitialization,2
ServerDll=sxssrv,4
ProfileControl=Off
MaxRequestThreads=16
%SystemRoot%\system32\csrss.exe
ObjectDirectory=\Windows
SharedSection=1024,20480,768
Windows=On
SubSystemType=Windows
ServerDll=basesrv,1
ServerDll=winsrv:UserServerDllInitialization,3
ServerDll=winsrv:ConServerDllInitialization,2
ServerDll=sxssrv,4
ProfileControl=Off
MaxRequestThreads=16
copy /Y /V F:\file00.png D:\file00.png >> c:\copy.log-- 追記
copy /Y /V F:\file01.png D:\file01.png >> c:\copy.log
...
※ copy.logはエラー確認用
SharedSection=1024,20480,1024参考:
=======とりあえず、今のところは問題なし.
.reg ファイルの場合
----
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoSimpleNetIDList"=dword:00000001
=======
ms-dos コマンドの場合
----
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoSimpleNetIDList /t REG_DWORD /d 1
----
コントロールパネル>プログラムと機能>windowsの機能の有効化または無効化>"TabletPCコンポーネント"のチェックを外す(PC再起動).ペンのフィードバックはオフにしてたのに、いつの間にかオンになってたみたいだ.
---------------
test.bat
-----
@echo off
for /L %%v in (1,1,10) do (
set /p x=*< nul
ping 1.0.0.0 -w 1 -n 1 > nul
rem timeout /t 1 > nul
)
echo OK!
-----
output....
>********** OK!
---------------
pingちなみに
ping 1.0.0.0 -w 5000 -n 1 > nultimeout
timeout /t 5 /nobreak > nul
ping 127.0.0.1 -n 5 > nullと、かいている人もいるけど、timestamp取ってみると正確ではないようだ.
---------------まあ、batで処理するようなものなので、おおざっぱな値でもいいか.
test.bat
-----
wmic os get localdatetime
ping 127.0.0.1 -n 5 1>nul
wmic os get localdatetime
-----
out ...
=>LocalDateTime:20121219160952.868000+540
=>LocalDateTime:20121219160956.934000+540
---------------