Windows远程桌面连接指定会话session

先远程登录
运行cmd
输入query session查看在进行任务那个会话
然后再用tscon命令来切换到需要的会话

来源:http://blog.csdn.net/lddongyu/article/details/5610084

Windows 开机启动项

开始->运行->输入shell:startup

在打开的启动文件夹中,将需要启动程序的快捷方式复制进去,完工

更改pip为国内的源

Windows 在资源管理器的地址栏输入%appdata%后回车
新建一个pip文件夹,在pip文件夹里面新建一个配置文件pip.ini
在配置文件中输入如下内容后保存即可:

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

再次使用pip,即会使用新源

参考来源:
Windows下更换pip源为清华源

重新注册dll文件

管理员模式运行cmd,然后输入
for %1 in (%windir%\system32\*.dll) do regsvr32.exe /s %1

cmd中关闭进程

taskkill /f /im 进程名称

Windows端口转发

首先安装IPV6(旧版本的Windows需要)

netsh interface ipv6 install

添加一个IPV4到IPV4的端口映射

netsh interface portproxy add v4tov4 listenaddress=xxx.xxx.xxx.xxx listenport=22 connectaddress=xxx.xxx.xxx.xxx connectport=22

指定监听ip和端口可以删除

netsh interface portproxy delete v4tov4 listenaddress=xxx.xxx.xxx.xxx listenport=22

可以查看存在的转发

netsh interface portproxy show all

命令行降级IE浏览器

以管理员运行CMD,键入:

FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*10.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart"

InternetExplorer-*10需要按实际情况填写,此处是IE10
来源:https://www.sevenforums.com/tutorials/282216-internet-explorer-10-install-uninstall-windows-7-a.html

Windows分割/合并大文件

分割
使用 git bash自带的split命令
将文件分割成1G大小的文件
split -b 1024m file_name
合并
使用cmd自带的copy命令
将已分割的文件合并成file_name
copy /b xa* file_name

https://www.jianshu.com/p/98de0a0ecb04

Windows下查看文件MD5值

certutil -hashfile filename MD5
certutil -hashfile filename SHA1
certutil -hashfile filename SHA256

Windows蓝屏日志分析

分析dump文件我们一般使用Windbg这个工具,下载地址:http://msdn.microsoft.com/zh-cn/windows/hardware/gg463009.aspx

收集dump文件请参考:http://answers.microsoft.com/zh-hans/windows/forum/windows_7-system/answers-%E5%88%86%E4%BA%AB/292255ae-dfc4-462d-9d96-09f5cee6e811

然后将dump文件拖进Windbg,打开之后首先查看两点,一个是Probably caused by :,另外一个需要打开“!analyze –v ”字样的显示,从中查找BUGCHECK_STR: *。

对照蓝屏常见错误:http://support.microsoft.com/kb/972602/zh-cn 中的信息,找到问题对应的大致原因。

例如:我在dump中查看到Probably caused by : nvlddmkm.sys ( nvlddmkm+57419b ),BUGCHECK_STR: 0x7E

经过对照搜查,大致就可以知道是显卡驱动的问题,一般可能我们就需要更新显卡驱动了。

将FRP注册为服务 无需登录开机即启动的方法

下载winsw ,改名为winsw.exe,放到frp相同的目录里,在同一个目录里创建一个utf8编码的文本文件,文件名是 winsw.xml

<service>
    <id>frp</id>
    <name>frp这里是服务的名称</name>
    <description>这里是服务的介绍,随便写</description>
    <executable>frpc</executable> #这里是运行的软件名
    <arguments>-c frpc.ini</arguments> #这里是运行的软件配置文件
    <onfailure action="restart" delay="60 sec"/>
    <onfailure action=”restart” delay="120 sec"/>
    <logmode>reset</logmode>
</service>

以管理员权限打开一个命令窗口,cd到frp所在目录,执行

winsw install
winsw start

如果要卸载服务,执行命令

winsw stop
winsw uninstall

本段来源:http://www.dngz.net/windows-frptoservice.htm

Win 系统命令行创建大文件

Here’s an example command to create a 30GB file named largefile.dat on the C: drive:

fsutil file createnew C:\largefile.dat 32212254720

Win 系统命令行拷贝复制文件夹

xcopy "C:\path\to\source\folder" "C:\path\to\destination\folder" /E /H /C /I

Explanation of options:

  • C:\path\to\source\folder: Path to the source folder you want to copy.
  • C:\path\to\destination\folder: Path to the destination where you want to paste the folder.
  • /E: Copies all subdirectories, including empty ones.
  • /H: Copies hidden and system files.
  • /C: Continues copying even if errors occur.
  • /I: If the destination does not exist, this option assumes that the destination is a directory.

标签: none

评论已关闭