Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2297|回复: 4
打印 上一主题 下一主题

常用DOS命令

[复制链接]

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
跳转到指定楼层
楼主
发表于 2019-12-31 10:34:07 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
远程桌面  
mstsc

路由
route delete 0.0.0.0
route add -p 0.0.0.0 mask 0.0.0.0 192.168.1.1


关机
你的电脑要在22:00关机,可以选择“开始→运行”,输入“at 22:00 Shutdown -s”,
以倒计时的方式关机,可以输入“Shutdown.exe -s -t 3600”,这里表示60分钟后自动关机,“3600”代表60分钟。
取消的话,可以在运行中输入“shutdown -a”。另外输入“shutdown -i”,则可以打开设置自动关机对话框,对自动关机进行设置。
Shutdown.exe的参数,每个都具有特定的用途,执行每一个都会产生不同的效果,比如“-s”就表示关闭本地计算机,“-a”表示取消关机操作,下面列出了更多参数,大家可以在Shutdown.exe中按需使用。

-f:强行关闭应用程序

-m \\计算机名:控制远程计算机

-i:显示图形用户界面,但必须是Shutdown的第一个选项

-l:注销当前用户

-r:关机并重启

-t 时间:设置关机倒计时

-c "消息内容":输入关机对话框中的消息内容(不能超127个字符)

能的实现都是使用“Shutdown”命令实现的,shutdown的参数是在命令行窗口中输入“shutdown”。笔者认为最有用的是“-i”参数,可以调出“远程关机对话框”,能方便地实现局域网内计算机的远程关机,有兴趣的朋友可以试一试。

开始-程序-附件-系统工具-计划任务-添加任务计划-下一步-浏览“c:\windows\system32\shadow.exe”下一步-选好要关机的时间,下一步-输入用户名和密码,只要是系统里有的用户就行,但一定要有密码,没有也要设一个,下一步,选上“在完成时打开此任务的高级属性”,在运行栏后面加上“ -S”引号不要哦。

1、win2000系统内没有shutdown命令文件,如果在2000中使用,必须 copy winXP中的shutdown.exe文件(在xp的c盘收索就能找到),到win2k的C:\\WINNT中,win2k才能使用。\\.s

2、实现每日定时关机从新启动,设置好定时关机命令后,在控制面板中的任务计划中添加一个计划,在运行中输入“C:\\WINNT\\shutdown.exe -r”在设置密码处输入管理员的密码,在日程处输入每天运行的时间,那样就可以达到每天定时重新启动计算机了。


查看环境变量



FTP命令
ftp 127.0.0.1
ftp> open 127.0.0.1
ftp> pwd
ftp> dir
ftp> cd CHR_Data

ftp> get CHR_4_20120316000500.dat.gz C:/CHR_4_20120316000500.dat.gz
200 PORT Command successful.
150 Opening ASCII mode data connection for CHR_4_20120316000500.dat.gz (6350211
Bytes).
226 Transfer complete.
ftp: 收到 6350211 字节,用时 0.08Seconds 81412.96Kbytes/sec.

ftp> quit
221 Goodbye!

  1. Microsoft Windows [版本 5.2.3790]
  2. (C) 版权所有 1985-2003 Microsoft Corp.

  3. C:\Documents and Settings\Administrator>ftp 10.254.89.171
  4. Connected to 10.254.89.171.
  5. 220 Microsoft FTP Service
  6. User (10.254.89.171:(none)): gduway
  7. 331 Password required for gduway.
  8. Password:
  9. 230 User gduway logged in.
  10. ftp> cd /luc/do
  11. 250 CWD command successful.
  12. ftp> ls
  13. 200 PORT command successful.
  14. 150 Opening ASCII mode data connection for file list.
  15. 20120325085618_CDL_DO_OMP8_12032508.CSV.gz
复制代码
回复

使用道具 举报

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
沙发
 楼主| 发表于 2019-12-31 10:34:39 | 只看该作者
本帖最后由 Qter 于 2022-12-9 19:24 编辑

查看dll导出及依赖命令
在Visual Studio命令行中运行
dumpbin.exe /exports D:\Test\dll1.dll

---------------------
VC6里有depends和dumpbin,Linux下是ldd和objdump,可查询依赖库


C:\Program Files\Microsoft Visual Studio 10.0\VC>dumpbin /DEPENDENTS D:\todb_x86.dll




Regsvr32 [ /u ][ /s ][ /n ][ /i [ :cmdline ] ] dll文件名”,


regsvr32 /u "C:\新建文件夹\mCloud\mcloud_shell_ext_x64.dll"
回复 支持 反对

使用道具 举报

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
板凳
 楼主| 发表于 2019-12-31 10:36:38 | 只看该作者
nmake类似cmake
vs自带的




回复 支持 反对

使用道具 举报

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
地板
 楼主| 发表于 2019-12-31 12:02:41 | 只看该作者
ping


Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]

            [-r count] [-s count] [[-j host-list] | [-k host-list]]

            [-w timeout] target_name



Options:

    -t             Ping the specified host until stopped.

                   To see statistics and continue - type Control-Break;

                   To stop - type Control-C.

    -a             Resolve addresses to hostnames.

    -n count       Number of echo requests to send.

    -l size        Send buffer size.

    -f             Set Don't Fragment flag in packet.

    -i TTL         Time To Live.

    -v TOS         Type Of Service.

    -r count       Record route for count hops.

    -s count       Timestamp for count hops.

    -j host-list   Loose source route along host-list.

    -k host-list   Strict source route along host-list.

    -w timeout     Timeout in milliseconds to wait for each reply.


route

C:\>route

Manipulates network routing tables.

ROUTE [-f] [-p] [command [destination]
                  [MASK netmask]  [gateway] [METRIC metric]  [IF interface]

  -f           Clears the routing tables of all gateway entries.  If this is
               used in conjunction with one of the commands, the tables are
               cleared prior to running the command.
  -p           When used with the ADD command, makes a route persistent across
               boots of the system. By default, routes are not preserved
               when the system is restarted. Ignored for all other commands,
               which always affect the appropriate persistent routes. This
               option is not supported in Windows 95.
  command      One of these:
                 PRINT     Prints  a route
                 ADD       Adds    a route
                 DELETE    Deletes a route
                 CHANGE    Modifies an existing route
  destination  Specifies the host.
  MASK         Specifies that the next parameter is the 'netmask' value.
  netmask      Specifies a subnet mask value for this route entry.
               If not specified, it defaults to 255.255.255.255.
  gateway      Specifies gateway.
  interface    the interface number for the specified route.
  METRIC       specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star '*'), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The '*' matches any string,
and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.
Diagnostic Notes:
    Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
    Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1
             The route addition failed: The specified mask parameter is invalid.
(Destination & Mask) != Destination.

Examples:

    > route PRINT
    > route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2
             destination^      ^mask      ^gateway     metric^    ^
                                                         Interface^
      If IF is not given, it tries to find the best interface for a given
      gateway.
    > route PRINT
    > route PRINT 157*          .... Only prints those matching 157*
    > route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

      CHANGE is used to modify gateway and/or metric only.
    > route PRINT
    > route DELETE 157.0.0.0
    > route PRINT

回复 支持 反对

使用道具 举报

1228

主题

1997

帖子

7582

积分

认证用户组

Rank: 5Rank: 5

积分
7582
5#
 楼主| 发表于 2020-1-4 12:24:39 | 只看该作者
关闭那个服务将无法远程桌面 mstsc
一、我的电脑-属性-远程-去掉“远程协助”和“远程桌面”的勾选-确定。
二、开始-“运行”输入“Services.msc”打开服务设置窗口,禁用以下服务:
1、NetMeeting Remote Desktop Sharing  
允许受权的用户通过NetMeeting在网络上互相访问对方。
2、Messenger  
俗称信使服务,电脑用户在局域网内可以利用它进行资料交换。
3、Terminal Services  
允许多位用户连接并控制一台机器,并且在远程计算机上显示桌面和应用程序。
4、Remote Registry  
使远程用户能修改此计算机上的注册表设置。  
5、Telnet  
允许远程用户登录到此计算机并运行程序,并支持多种 TCP/IP Telnet客户,包括基于 UNIX 和 Windows 的计算机。  
6、Remote Desktop Help Session Manager  
如果此服务被终止,远程协助将不可用。  
7、TCP/IP NetBIOS Helper  
NetBIOS在Win 9X下就经常有人用它来进行攻击,对于不需要文件和打印共享的用户,此项也可以禁用。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-5-2 20:29 , Processed in 0.072129 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表