找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 35912|回复: 11

[文件操作] 批处理怎样修改桌面快捷方式属性?

[复制链接]
发表于 2011-10-2 18:38:44 | 显示全部楼层 |阅读模式
如果桌面有Internet 那么修改url 为http://www.baidu.com/     并设置Internet 属性为只读。桌面没有Internet的   就不需要了
发表于 2011-10-2 19:52:34 | 显示全部楼层
你的快捷方式是.lnk还是.url?
 楼主| 发表于 2011-10-2 20:11:34 | 显示全部楼层
回复 2# Batcher


    .url?
 楼主| 发表于 2011-10-3 22:17:46 | 显示全部楼层
回复 2# Batcher


    .url
 楼主| 发表于 2011-10-3 22:18:03 | 显示全部楼层
:):):):)  有没有人会啊
 楼主| 发表于 2011-10-4 17:50:23 | 显示全部楼层
发表于 2011-10-4 18:39:14 | 显示全部楼层
回复 5# batsicent


你是不会修改Internet.url的内容?还是不会设置属性?
 楼主| 发表于 2011-10-6 13:57:05 | 显示全部楼层
回复 7# Batcher


    都不会
发表于 2011-10-6 17:06:55 | 显示全部楼层
  1. @echo off
  2. if exist "%userprofile%\桌面\Internet.url" (
  3.     >"%userprofile%\桌面\Internet.url" echo [InternetShortcut]
  4.     >>"%userprofile%\桌面\Internet.url" echo URL=http://www.baidu.com/
  5.     attrib +r "%userprofile%\桌面\Internet.url"
  6. )
复制代码
 楼主| 发表于 2011-10-7 15:47:53 | 显示全部楼层
回复 9# awk
谢谢你.   
要是.lnk的  目标="C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://www.baidu.com    怎么弄啊
发表于 2011-10-10 02:12:53 | 显示全部楼层
回复 10# batsicent

用.vbs处理吧,纯批处理不能处理.lnk格式……
  1. set WshShell = WScript.CreateObject("WScript.Shell")
  2.          strDesktop = WshShell.SpecialFolders("Desktop")
  3.          set oUrlLink = WshShell.CreateShortcut(strDesktop & "\百毒一下.url")
  4.          oUrlLink.TargetPath = "http://www.baidu.com"
  5.          oUrlLink.Save
复制代码
 楼主| 发表于 2011-10-20 16:47:47 | 显示全部楼层
回复 11# applba


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

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-18 06:12 , Processed in 0.020548 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

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