本帖最后由 pcl_test 于 2019-11-22 23:46 编辑
有毒不杀毒,治标不治本
http://www.bathome.net/viewthread.php?tid=39063
http://www.bathome.net/viewthread.php?tid=38269- rem win7及以上系统运行
- mode con cols=150
- powershell -c "$wsh=New-Object -com WScript.Shell;[Environment]::GetFolderPath('Desktop'),($Env:PUBLIC+'\Desktop')|%%{dir $_ *.lnk -Force|%%{$_.FullName;$wsh.CreateShortcut($_.FullName).TargetPath;''}}"
- pause
复制代码
- rem win7及以上系统运行
- mode con cols=150
- powershell -c "$a=([Environment]::GetFolderPath('Desktop')+'\').split(':');$b=($Env:PUBLIC+'\Desktop\').split(':');gwmi Win32_ShortcutFile -filter (\"drive='\"+$a[0]+\":' and (path='\"+($a[1] -replace '\\','\\')+\"' or path='\"+($b[1] -replace '\\','\\')+\"') and extension='lnk'\")|select Name,Target"
- pause
复制代码
- rem win7及以上系统运行
- mode con cols=150
- powershell -c "$wsh=New-Object -com WScript.Shell;[Environment]::GetFolderPath('Desktop'),($Env:PUBLIC+'\Desktop')|%%{dir $_ *.lnk -Force|%%{if([IO.File]::ReadAllText($_.FullName, [Text.Encoding]::default) -match '\b[a-z]:\\[^\00]+'){$_.FullName;$matches[0];''}}}"
- pause
复制代码
|