Permanent removal of logo in Windows Scripting Host (WSH) scripts

空扰寡人 提交于 2019-12-10 07:53:08

问题


I know two ways to remove the logo permanently. The "official" one:

cscript //Nologo //S

Will save current command line options for current user.

A ftype approach with admin privileges:

ftype wsffile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%*
ftype  jsfile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%*  
ftype vbsfile="%SystemRoot%\System32\CScript.exe" //nologo "%%1" %%*  

Double-%'s are needed only if you use the lines in a batch file.

The latter will all users via affect the reg key HKEY_CLASSES_ROOT\<file>\Shell\Open\Command, where <file> can be wsffile, jsfile or vbsfile.

Do you know where are stored the cscript //Nologo //S settings?


回答1:


The logo settings are saved in the DWORD value DisplayLogo the subkey Software\Microsoft\Windows Script Host\Settings under both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER (HKEY_USERS\<SID>, actually).

To change the default setting for all users set the value in HKEY_LOCAL_MACHINE to 0x0:

reg add "HKLM\Software\Microsoft\Windows Script Host\Settings" /v DisplayLogo /t REG_DWORD /d 0x0 /f

To change the setting for the current user set the value in HKEY_CURRENT_USER to 0x0:

reg add "HKCU\Software\Microsoft\Windows Script Host\Settings" /v DisplayLogo /t REG_DWORD /d 0x0 /f

If you want to modify the settings for other users, you'll have to load their user hive into the registry first.



来源:https://stackoverflow.com/questions/17389335/permanent-removal-of-logo-in-windows-scripting-host-wsh-scripts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!