向Windows资源管理器添加打印目录功能不起作用



此技术的标准实现提供于:https://learn.microsoft.com/en-us/troubleshoot/windows-client/printing/add-print-directory-feature

遗憾的是,它对我不起作用。Printdir.bat文件是:

@echo off 
dir %1 /-p /o:gn > "%temp%Listing" 
start /w notepad /p "%temp%Listing"
del "%temp%Listing"
exit

我的实现在cmd级别失败,错误为:

文件名、目录名或卷标语法不正确"。(程序继续,由于没有任何内容传递到记事本,因此没有创建任何文件(。

如果在Windows目录中运行,则运行良好。在"%1"周围添加引号没有帮助,"%~1"也没有帮助

指令(在多个站点重复(创建了一个文件PrintDirectoryListing.reg,步骤3和6创建了一条命令Printdir.bat\"%1";从aschipfl和Mofi的评论中,我能够排除活动故障并编辑注册表,消除了"之前"1〃;使两个命令Printdir.bat"%1〃;。现在一切正常。再次感谢aschipfl和Mofi

最新更新