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
| (net localgroup Administrators) -contains $env:username -or (net localgroup Administrators) -contains "$env:userdomain\$env:username" |
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
| SetRegistry "HKCU\test", "test", "REG_SZ" | |
| '------------------------------------------------------------------------------------------- | |
| ' レジストリの設定 | |
| '------------------------------------------------------------------------------------------- | |
| ' レジストリの現在の設定をログファイルに出力後、実際に書き換え、成功したかどうかを確認する。 | |
| ' UACが有効な場合には管理者権限があっても失敗するので事前に昇格させておくこと。 | |
| ' http://ebi.dyndns.biz/diary/20080813.html | |
| '------------------------------------------------------------------------------------------- | |
| ' RegistryPath - レジストリのパス |
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
| AddLog "test", "c:\tmp\hoge.txt" | |
| AddLog "test2", "c:\tmp\hoge.txt" | |
| '------------------------------------------------------------------------------------------- | |
| ' 特定のファイルへのログ出力 | |
| '------------------------------------------------------------------------------------------- | |
| ' strMessage - 出力する文字列 | |
| ' strTargetFile - 出力対象ファイル | |
| '------------------------------------------------------------------------------------------- |
NewerOlder