Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Desactivate WSH

Status
Not open for further replies.

frenchteck

IS-IT--Management
Feb 28, 2003
12
FR
Is it possible to desactivate WSH ?
And if it's possible how to do that ?
 
If you only want to disable the automatic execution of scripts, change the "Open" actions for the vbs (and js) file types in the registry. You can do it manually or use the use the following script code. Then if a user double-clicks on a script file or opens it from Outlook, it will open in notepad rather than executing.
The scripts can still be executed via the command line.

set shell=CreateObject("WScript.Shell")
key = "HKCR\vbsfile\shell\open\command\"
shell.RegWrite key, "notepad ""%1"""
key = "HKCR\vbsfile\shell\open2\command\"
shell.RegWrite key, "notepad ""%1"""
key = "HKCR\jsfile\shell\open2\command\"
shell.RegWrite key, "notepad ""%1"""
key = "HKCR\jsfile\shell\open2\command\"
shell.RegWrite key, "notepad ""%1"""
 
frenchteck,

Out of curiousity, did the responses help you?

Did PhillipFoster's or jummy's suggestions help out?

If so, you might want to consider responding, and potentially awarding one or both a star. Those of us that come here asking for help usually find it here. But to frequently, those that take their time to help out never hear back. Just a thought.

DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top