1. How to delete a registry value using a registry file?
I have learned that I can add a registry value to Windows registry with this command in a batch file.
regedit "path\Reg File Name.reg"
The registry file contains:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Title"="Path"
This is working.
But nothing happens when I want to delete the registry value Title
with a registry file containing following:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Title"="Path" =-
=-
does nothing. How to fix this? What I'm doing wrong?
2. How to run the batch file hidden in background without a visible console window after user log on?
I have done this:
I created a batch file with:
wscript.exe "path\Script.vbs" "path\My File.bat"
And the VB script file contains:
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
This is working. I'm clicking my start.bat
and it starts My File.bat
invisible in background.
But it is not working on adding the file Start.bat
to Autostart
folder in Windows start menu. When the system boots and I log in, batch file is really run and also the VB script, but My File.bat
is not executed.
I mean everything is working beside my batch file which should run in background.