Plantsoot 发表于 2010-5-28 23:57:20

WINPE下搜索PETOOLS并创建快捷方式的批处理(2010-6-1修正版)

今天又朋友发帖问WINPE下创建外置工具快捷方式的批处理,
我写了一个,还不是很完善,没做路径是否存在等等的判断,
望高手指点,顺便完善。

谢谢zhaohj兄的抬举,今天重新写了下。

自动搜索所有盘符的根目录下的PETOOLS文件夹,然后创建快捷方式.

呵呵,自恋一下,转帖请注明作者和出处。

下载地址在一楼底。

2010-6-1日更新[*]修正在有软驱无软盘的情况下报错的问题[*]在无中文支持的纯英文PE下测试通过(需要PECMD的支持)
批处理如下:
--------------------- For 中文PE & English PE (Beta版)---------------------------------------------------@echo off
:: 自动搜索可见区根目录下的PETOOLS文件夹
:: 在“「开始」菜单\程序”中创建程序的快捷方式
:: 需要PECMD支持
:: 2010-6-1更新(解决软驱无盘报错的情况)
::---------------------------------------
:: It can work in English PE
:: Currently, it needs PECMD
:: However, I will let it work without PECMD
:: It will automatically create shortcuts under the PETOOLS
:: Copyright plantsoot, 2010-6-1

:: --------- 中文PE ----------------

if exist "%USERPROFILE%\「开始」菜单\程序" (

echo 正在搜索根目录包含PETOOLS文件夹的盘符

for %%a in (A B C D E F G H I G K L M N O P Q R S T U V W X Y Z) DO (
dir /a %%a:\PETOOLS >nul 2>nul&&(
echo 正在创建 %%a:\PETOOLS 的快捷方式,请稍候……
for /f "delims=" %%b in ('dir %%a:\PETOOLS /a-d /b /s') do PECMD LINK %USERPROFILE%\「开始」菜单\程序\%%~pb\%%~nxb,%%b,shell32.dll#46

echo %%a:\PETOOLS 的快捷方式创建完成,继续搜索……
)||echo off
)
echo 全盘PETOOLS文件夹快捷方式创建完毕。
start pecmd.exe mess 快捷方式创建完毕。@成功#OK*15000
)


:: --------- For English PE ----------------
if exist "%USERPROFILE%\Start Menu\Programs" (

echo Searching PETOOLS directory, please wait ... ...
for %%a in (A B C D E F G H I G K L M N O P Q R S T U V W X Y Z) DO (
dir /a %%a:\PETOOLS >nul 2>nul&&(
echo Creating %%a:\PETOOLS directory shortcut, please wait ... ...
for /f "delims=" %%b in ('dir %%a:\PETOOLS /a-d /b /s') do PECMD LINK %USERPROFILE%\Start Menu\Programs\%%~pb\%%~nxb,%%b,shell32.dll#46

)||echo off
)
echo Create shortcuts success!
start pecmd.exe mess Create shortcuts success! @Success#OK*15000
)



-------------------- 截图 ------------------------------------------------------------------------










2010-6-1日纯英文PE截图




[ 本帖最后由 Plantsoot 于 2010-6-2 00:58 编辑 ]

Plantsoot 发表于 2010-5-29 00:26:28

原帖由 zhaohj 于 2010-5-29 00:22 发表 http://bbs.wuyou.net/images/common/back.gif
修改一下,PETOOLS固定,盘符自动搜索。
想不到兄弟P处理也了得。

呵呵,刚学,zhaohj你们这些大侠要指导我,到时候问一些问题别笑我就行了。
今天不改了,呵呵,下次我还有新的想法,暂时保密(提示:udhelper中的一项功能)。

zhaohj 发表于 2010-5-29 00:22:36

修改一下,PETOOLS固定,盘符自动搜索。
想不到兄弟P处理也了得。

liuyindou 发表于 2010-5-29 09:06:55

很适用的。向你学习了。

460484424 发表于 2010-5-29 10:29:25

新人关注此帖!

楼上的都是榜样!!!

咿呀咿呀呦 发表于 2010-5-29 10:38:39

新人学习了 ,又 时间研究下

Plantsoot 发表于 2010-5-29 14:30:22

原帖由 zhaohj 于 2010-5-29 00:22 发表 http://bbs.wuyou.net/images/common/back.gif
修改一下,PETOOLS固定,盘符自动搜索。
想不到兄弟P处理也了得。

我今天更新了下,按老兄的要求重新写了下,
交作业了,请zhaohj 兄批阅。

shenwen163 发表于 2010-5-29 14:33:07

学习了,收藏起,目前只停留在能看懂,修改的基础上,完全自己写还有点问题~~

yanglin 发表于 2010-5-29 14:38:28

同上 看得懂
修改的基础还是不够 呵呵呵

有什么更新呢??

尽善尽美 发表于 2010-5-29 15:21:40

收下了!!谢谢百草兄!!

33445566 发表于 2010-5-29 15:23:39

支持原创.....

maanu 发表于 2010-5-29 16:18:56

@ Plantsoot

let me try to understand it.

1. is there any way to make it work on ENGLISH pe ?

2. i understand , that it AUTOMATICALLY creates shortcuts under PETOOLS , from PETOOLS directory every time the pe boots ?

3. is PECMD is needed to be loaded in PE , or it can work without PECMD ?


Regards,
Maanu from Pakistan

hxj 发表于 2010-5-29 16:32:36

请问是否在PE3.0也能得到支持,因为我一直无法解决在PE3.0中搜寻到PCTOOLS目录后正确显示目录名和其中文件的问题

liuyindou 发表于 2010-5-29 17:35:53

多谢更新,支持你了。

gameboyhx 发表于 2010-5-29 17:51:04

这个不错收藏了
谢谢楼主

Plantsoot 发表于 2010-5-29 20:29:55

原帖由 maanu 于 2010-5-29 16:18 发表 http://bbs.wuyou.net/images/common/back.gif
@ Plantsoot

let me try to understand it.

1. is there any way to make it work on ENGLISH pe ?

2. i understand , that it AUTOMATICALLY creates shortcuts under PETOOLS , from PETOOLS dir ...

It can work in English PE
Currently, it needs PECMD
However, I will let it work without PECMD
It will automatically create shortcuts under the PETOOLS

ForEnglish PE,please download PetoolsShortcut_beta.rar

http://bbs.wuyou.net/attachment.php?aid=90447

maanu 发表于 2010-5-29 22:37:46

plantsoot

i am gonnatest it with PECMD and will reply back soon . but the best will be , without PECMD . because in english PE ,making PECMD work is very very difficult .

i could not do this either , but i ll try again this time.


thanks a lot.

Regards,
Maanu from Pakistan

Plantsoot 发表于 2010-5-30 08:34:07

原帖由 hxj 于 2010-5-29 16:32 发表 http://bbs.wuyou.net/images/common/back.gif
请问是否在PE3.0也能得到支持,因为我一直无法解决在PE3.0中搜寻到PCTOOLS目录后正确显示目录名和其中文件的问题

可以给一个你用的 PE3.0的下载地址吗?
我手头上没有 PE3.0。

qdaijchf 发表于 2010-5-30 09:40:18

要是支持pe3.0那就更完美了。在zhaohj提供的FTP中http://bbs.wuyou.net/forum.php?mod=viewthread&tid=96720,Yulon目录下有一个pe3.0,我用下来觉得很好。老四说最近两星期要更新为pe3.1,但还没见动静。

[ 本帖最后由 qdaijchf 于 2010-5-30 09:52 编辑 ]

网虫2008 发表于 2010-5-30 10:10:26

楼主的这个批处理把所有能见到的文件(.DLL .REG .INF .TXT.......)都加入快捷,这样有些乱呀。。

看下这个帖子,看看是否对你的代码完善有所帮助

http://bbs.wuyou.net/viewthread. ... ge=1&extra=page%3D1

[ 本帖最后由 网虫2008 于 2010-5-30 10:17 编辑 ]

Plantsoot 发表于 2010-5-30 10:23:03

原帖由 网虫2008 于 2010-5-30 10:10 发表 http://bbs.wuyou.net/images/common/back.gif
楼主的这个批处理把所有能见到的文件(.DLL .REG .INF .TXT.......)都加入快捷,这样有些乱呀。。

看下这个帖子,看看是否对你的代码完善有所帮助

http://bbs.wuyou.net/viewthread. ... ge=1&extra=page%3D1

谢谢 虫大,看了你的帖子并收藏,慢慢去学习。
你的才是专业版的,我的是山寨版的。
不过,我们的思路貌似不一样,用途也不完全一样。

网虫2008 发表于 2010-5-30 10:36:39

原帖由 Plantsoot 于 2010-5-30 10:23 发表 http://bbs.wuyou.net/images/common/back.gif


谢谢 虫大,看了你的帖子并收藏,慢慢去学习。
你的才是专业版的,我的是山寨版的。
不过,我们的思路貌似不一样,用途也不完全一样。

楼主谦虚了。。。。

咱们这个论坛,没有专业版与山寨版一说,,都是互相学习互相借鉴共同进步的。

maanu 发表于 2010-5-31 05:09:18

@ plantsoot

sorry it did not work in english PE with PECMD enabled . i used XPSP3 to build pe.

see this ,

http://bbs.wuyou.net/forum.php?mod=viewthread&tid=164098&pid=1961225&page=1&extra=page%3D1###

may be i should wait for your solution without PECMD . thank you for the great work.


Regards,
Maanu from Pakistan

Plantsoot 发表于 2010-5-31 08:44:18

原帖由 maanu 于 2010-5-31 05:09 发表 http://bbs.wuyou.net/images/common/back.gif
@ plantsoot

sorry it did not work in english PE with PECMD enabled . i used XPSP3 to build pe.

see this ,

http://bbs.wuyou.net/forum.php?mod=viewthread&tid=164098&pid=1961225&page=1&extra=page%3 ...

Thank you for the test.
Can you tell me your "English PE " download address?
I will go to test.

maanu 发表于 2010-5-31 18:35:48

plantsoot

i have slow connection . but i ll try to give you the download link to my test pe tonight sometime .

thank you for replying,

Regards,
Maanu from Pakistan

bluetooth 发表于 2010-6-1 10:36:15

这个不错,在win9pe下面测试通过,要是能过滤后缀名就更好了。

Plantsoot 发表于 2010-6-2 00:37:07

回复 #25 maanu 的帖子

Please download PetoolsShortcut_eng.rar,

It can work in the English PE.

I am sorry,it needs PECMD.

latter I will let it work without PECMD.:: It can work in English PE
:: Currently, it needs PECMD
:: However, I will let it work without PECMD
:: It will automatically create shortcuts under the PETOOLS
:: Copyright plantsoot, 2010-6-1

:: --------- For English PE ----------------
@echo off
if exist "%USERPROFILE%\Start Menu\Programs" (

echo Searching PETOOLS directory, please wait ... ...

for %%a in (A B C D E F G H I G K L M N O P Q R S T U V W X Y Z) DO (
dir /a %%a:\PETOOLS >nul 2>nul&&(
echo Creating %%a:\PETOOLS directory shortcut, please wait ... ...
for /f "delims=" %%b in ('dir %%a:\PETOOLS /a-d /b /s') do PECMD LINK %USERPROFILE%\Start Menu\Programs\%%~pb\%%~nxb,%%b,shell32.dll#46
)||echo off
)
echo Create shortcuts success!
start pecmd.exe mess Create shortcuts success! @Success#OK*15000
)

http://bbs.wuyou.net/data/attachment/forum/20100602_53439af8931806d3c8b8XqnadspjoLB2.jpg

http://bbs.wuyou.net/data/attachment/forum/20100602_3b5bcf610ec0117da35dkLc6aAy28uJe.jpg

http://bbs.wuyou.net/data/attachment/forum/20100602_1b79f8c1ca2d39b804ae3ZkAhSc0lPMf.jpg

[ 本帖最后由 Plantsoot 于 2010-6-2 00:49 编辑 ]

maanu 发表于 2010-6-2 03:24:48

wow

thanks a lot for the work dear . i willtest it again and report back .

Regards,
Maanu from Pakistan

Plantsoot 发表于 2010-6-4 15:31:25

晕,论坛数据丢失,丢了一部分帖子。

ziyun 发表于 2010-6-23 18:27:35

好东东,一定要支持,收藏备用
页: [1] 2
查看完整版本: WINPE下搜索PETOOLS并创建快捷方式的批处理(2010-6-1修正版)