编写批处理文件以在Google Chrome中以全屏模式打开Netflix

尤姆

我正在编写一个批处理文件,以全屏模式在Google Chrome中打开Netflix。我对批处理文件的了解还很幼稚,尽管...

chrome.exe --start-fullscreen --app=https://www.netflix.com

当从与chrome可执行文件相同的目录中运行时,这当然可以工作,但在其他任何地方都无法工作。

我正在寻找一种编写批处理文件的方法,以搜索并找到chrome.exe,然后使用上述开关执行该文件。这样,我可以将批处理文件共享给其他人,并且无论他们的文件路径如何,它都可以工作。能做到吗

- 编辑 -

由于Appleoddity建议不要进行搜索,因此这是否是为此目的编写批处理文件的最佳方法?

@echo off    
cd\program files (x86)\google\chrome\application
chrome.exe --start-fullscreen --app=https://www.netflix.com
尤姆

我写了一些有用的东西。没有阿德莱德爵士的职位,我无法做到。阿德莱德爵士,谢谢您的榜样。还要感谢其他贡献者。这是有教育意义的:)

(我之所以选择批处理而不是powershell,是因为我想与之共享powershell脚本的任何人都必须首先更改其执行策略设置。而批处理则不需要这样做。)

if exist "%localappdata%\google\chrome\application\chrome.exe" set file_found="yes" 
if not exist "%localappdata%\google\chrome\application\chrome.exe" set file_found="no" 
if %file_found%=="yes" set chrome_exe="%localappdata%\google\chrome\application\chrome.exe"

if exist "%programfiles%\google\chrome\application\chrome.exe" set file_found="yes" 
if not exist "%programfiles%\google\chrome\application\chrome.exe" set file_found="no" 
if %file_found%=="yes" set chrome_exe="%programfiles%\google\chrome\application\chrome.exe"

if exist "%programfiles(x86)%\google\chrome\application\chrome.exe" set file_found="yes" 
if not exist "%programfiles(x86)%\google\chrome\application\chrome.exe" set file_found="no" 
if %file_found%=="yes" set chrome_exe="%programfiles(x86)%\google\chrome\application\chrome.exe" 

%chrome_exe% --start-fullscreen --app=https://www.netflix.com

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

编写批处理文件以重命名多个文件夹中的文件

来自分类Dev

编写一个.bat文件以选择批处理命令输出的特定部分到批处理文件变量中

来自分类Dev

如何编写批处理文件以打开应用程序并关闭它们(如果已打开)

来自分类Dev

如何使用批处理文件在HTML文件中编写“大于符号”

来自分类Dev

编译的批处理文件全屏运行

来自分类Dev

如何使批处理文件全屏显示?

来自分类Dev

编译的批处理文件全屏运行

来自分类Dev

编写批处理文件:批处理将命令插入到另一个基于cmd的程序中

来自分类Dev

uiautomatorviewer 批处理文件未打开

来自分类Dev

如何使用批处理文件打开

来自分类Dev

对于批处理文件中的循环

来自分类Dev

在Powershell中执行批处理文件

来自分类Dev

在批处理文件中设置路径

来自分类Dev

在批处理文件中减去天数

来自分类Dev

在Java中运行批处理文件

来自分类Dev

批处理文件中的网址解码

来自分类Dev

批处理文件:变量中的变量

来自分类Dev

在批处理文件中列出键值对

来自分类Dev

批处理文件中的wkhtmltopdf

来自分类Dev

批处理文件中的变量乘法

来自分类Dev

批处理文件中的PHPUnit设置

来自分类Dev

在批处理文件中引发异常

来自分类Dev

批处理文件中的阻止代码

来自分类Dev

批处理文件中括号的问题

来自分类Dev

批处理文件中的括号

来自分类Dev

批处理文件变量中的句点

来自分类Dev

批处理文件中的特殊字符

来自分类Dev

批处理文件中的for循环问题

来自分类Dev

批处理文件中的Unicode符号