[英]executing a second command in a batch file
i have batch file that clears a value in the registry that is related to the usage block of chrome on a PC. 我有一个批处理文件,该文件清除了注册表中与PC上的chrome用法块相关的值。 every time i double click the batch file it will clear that value allowing an admin to use chrome.
每次我双击批处理文件,它将清除该值,从而允许管理员使用chrome。 i have a user that needs to access an EPA website but can only on chrome.
我有一个用户需要访问EPA网站,但只能使用chrome。 below is the code i tried to use but the second command after editing the registry does not run.
下面是我尝试使用的代码,但是编辑注册表后的第二条命令未运行。 it will never open a chrome webpage.
它永远不会打开Chrome网页。 i want their IE to stay default.
我希望他们的IE保持默认。 i will set chrome's homepage to the page she needs for simplicity.
为了简单起见,我将chrome的首页设置为她需要的页面。 how can i achieve the results i want?
我如何获得想要的结果?
REGEDIT4
; @ECHO OFF
; CLS
; REGEDIT.EXE /S "%~f0"
; EXIT
[HKEY_CURRENT_USER\Software\Policies\Google\Chrome\URLBlacklist]
"1"=-
&
@echo off
start chrome.exe https://cdx.epa.gov/epa_home.asp
this is what i am trying to execute. 这就是我要执行的。
echo
reg delete HKEY_CURRENT_USER\Software\Policies\Google\Chrome\URLBlacklist /v 1 /f
echo done.
echo
start chrome.exe https://cdx.epa.gov/epa_home.asp
echo done.
reg delete HKEY_CURRENT_USER\Software\Policies\Google\Chrome\URLBlacklist /v 1 /f
"C:\Program Files\SomeFolder\chrome.exe" https://cdx.epa.gov/epa_home.asp
Your code is crazy. 您的代码太疯狂了。
I don't use non programmable browsers. 我不使用非可编程浏览器。 You'll have to fix the path.
您必须修复路径。 This works using WINDOWS.
使用WINDOWS可以使用。
"C:\Program Files\Internet Explorer\iexplore.exe" https://cdx.epa.gov/epa_home.asp
remove.reg 的remove.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Policies\Google\Chrome\URLBlacklist]
"1"=-
remove.bat remove.bat
echo Removing 1st entry in URL blacklist...
regedit /S remove.reg
echo done.
echo Opening blocked site...
start chrome.exe https://cdx.epa.gov/epa_home.asp
echo done.
Whilst bizarre, it can be done in the style of the original 虽然很奇怪,但可以按照原始样式来完成
REGEDIT4
; @ECHO OFF
; CLS
; REGEDIT.EXE /S "%~f0"
[HKEY_CURRENT_USER\Software\Policies\Google\Chrome\URLBlacklist]
"1"=-
; start chrome.exe https://cdx.epa.gov/epa_home.asp
; EXIT
; ; indicates a comment in registry files but appears to be ignored when at the start of a batch file line.
表示注册表文件中的注释,但在批处理文件行的开头似乎被忽略。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.