Yesterday downloaded and installed the Updater Application block, the need to execute a deploy.vbs file, I talents, this small problem unexpectedly also cost me a lot of scheming.
Now share the conclusion.
First of all, my VBS file association has been captured by "hero". I double-click Deploy.vbs will open hero, more depressed. But I used the open way, tried the browser, cmd, no avail.
Today, when I think about this, I have an idea to go up to Microsoft News Group to ask a question. And then went to Csdn's Full-text search. Sure enough, my key word is only VBS, implementation, I found a lot of stuff I want. Learn to use Wscript.exe to execute this file.
Wscript.exe deploy.vbs in cmd, but the return error is There are no script engine for file extension '. vbs '. This time I think of Google. Sure enough, there was a lot of useful information, and the first one I found a solution. The reason is that my VBS association has been lost and must display the specified.
CMD-typed wscript.exe//e:vbscript deploy.vbs. It was a success!!!
If not, you can use
cscript.exe//e:vbscript Deploy.vbs
Summary: Use Wscript.exe to execute script files like VBS. If the file association is missing. You can use//e:vbscript.
Attached is a helpful article I found.
One, what is WSH?
WSH is an abbreviated form of Windows Scripting Host (Windows Scripting Host). The WSH concept first appeared on the Windows 98 operating system and was a script-run environment based on a 32-bit Windows platform and language-independent. For example, you write a script file, such as a file with a. vbs or. js suffix, and then double-click and execute it under Windows, and the system automatically invokes an appropriate program to interpret and execute it, and this program, the Windows scripting Host, Program execution file name is Wscript.exe (if at DOS command prompt, Cscript.exe).
You want to know if there's any WSH on your machine? Check your machine for a "Wscipt.exe" or "Cscript.exe" of these two files. If you find it, congratulations! You have installed the WSH. Otherwise, manually install it yourself:
In Windows 98 environments, WSH is automatically installed as a component of the operating system, and if this component is accidentally lost, you can open the Control Panel--> Add/Remove Programs--〉windows Setup--〉 attachment in turn, and then "Windows Scripting Host "√", and then determined to complete the installation of WSH components.
Ii. the relationship between scripting language and WSH
As you know, scripting languages, including JavaScript and VBScript languages, are often embedded in Web pages (including HTML page client side and ASP Page Server side). For scripts implanted with HTML pages, the parsing engine required is loaded by a Web browser such as IE, and the required parsing engine is provided by IIS (Internet information Services) for scripts that embed ASP pages. For scripts that appear outside of HTML and ASP pages (which often exist as standalone files), they need to be processed by WSH. What needs to be explained is: WSH to work properly, also installs IE 3.0 or later version of IE, because WSH at work will invoke the VBScript and JavaScript parsing engine in IE. [Not ended] [Iduba_page] The vast majority of these scripting languages that are embedded in Web pages are not related to network security. But there are also a handful of bad people who have ulterior motives, to put some code that is seriously endangering network security (which we often call "malicious code"), usually by modifying the registration to express "malicious" Purpose! , mixed in normal scripts, often keep us out of the way. However, if we understand a little bit about scripting language, these "tricks" are very easy to see. Let's start with a few simple examples ...
Three, WSH application examples
WSH can handle script programs, how to read and write WSH script source files? As long as you have a little basic (will VB programming better, hehe) Language Foundation, learn to read WSH script language program is not a difficult thing. Go to the C:WINDOWSSAMPLESWSH directory below will look at it! There are a few classic examples of scripting in it, and there are two versions of VBScript and JavaScript, each of which is not difficult to learn about basic WSH applications, as long as we open them in Notepad and study them carefully.
You just need to enter the code in each of the following instances in Notepad and save it as the corresponding "*.vbs" file, double-click the file, and you can see the corresponding effect.
Windows cannot access the specified device path or file, you may not have the appropriate permissions to access this item
This error occurs because your system partition is formatted with an NTFS partition and does not have administrator permissions set.
Solution:
1 View the C disk properties, switch to the "Security" tab, then click "Add", select an administrator account, click "OK". Then log in with this admin account (log off or restart the computer)
The 2 system has a virus and may have been modified by a file association. The solution is to disinfect and recover file associations. There is a special software for repairing files on the Internet.
3 The system is equipped with security software, such as systems safety monter software
4 off antivirus and firewall try the truth is not open
One to try this simple method: < resolved >
Right-click X (x for disk partition, such as D disk, e disk ...). , "Properties"--"security"--Select the username you are currently logged in, such as "Administrator", and make a list of the "Allow" items under "Administrator's privileges" to determine
You can also click "Add"--"advanced"--Open the ' Select User or Group ' dialog box,--click "Find Now", will appear all user groups, select the current user, "OK", repeat the above steps, "Allow" the project all dozen hook, and then determine, you should be able to run all of the F-disk EXE file
If not, right click on X (x represents disk partition, such as D disk, e disk ...). , "Properties"--"security"--Select the current login username in group or user name, point "advanced"--"owner"-"current owner of the Project" column will show "s-1-5-21-147001333-1580818891-1708537768-500 "This string; click" Name "in the username, tick" replace the child container and the owner of the object ", point" OK ", and other systems to replace it, you can unrestricted open the partition EXE file!
has been resolved here
Additional instructions: NTFS-formatted hard drives without security options
Open a folder, click the menu bar-tools-options-view-Put the "Use Simple File Sharing (recommended)" Check before the cancellation-OK. There is the Security tab.
———— PS ————
Start, run cmd input
Assoc. Exe=exefile(assoc to have spaces with. exe
Re-establish the association
If it's a poison, please kill it first.
Or this way.
① into the system disk Windows folder and enter the root directory where the registry resides.
② Right-click Regedit.exe and select Rename. (preferably renamed under DOS, with ren command)
① the file suffix name "exe" to "com".
② double-click to open the registry.
Find HKEY_CLASSES_ROOT\Exefile\Shell\Open\Command
Double-click the default key value.
Enter "%1%*" and Point "OK".
2000 and XP system can use this method to fix this problem:
1, find the Registry Editor regedit.exe (blue-green icon) under C:windows to change the. exe extension to. com
(If you don't see the extension, open "My Computer" → "Tools" → "Folder Options" → "View" → Drop-down scroll bar to Empty "Hide extensions for known file types".) After solving the problem remember to put this option on the hook, otherwise you will encounter problems you do not know.
2. Double-click to run regedit.com
3. Find this registry branch [HKEY_CLASSES_ROOT exefile Shell Open Command]
Double-click the name "Default" on the right to change the value data to the content in square brackets ["%1"%*]. Off.
4, open anti-virus software to completely kill all partitions.
5. After killing the poison, the regedit.com in the first step is changed back to Regedit.exe
6, call it a call!
Computer software and hardware application site long edit add:
Other Method 1: Right-click your browser (Internet Explore) to select the properties, and then choose the fourth item "content." Go to "publisher". Then choose to be a trusted publisher and remove all of the options inside OK
Other Method 2: File and Directory access permissions issues. If the original operating system sets strict security permissions on the directories or files under the NTFS disk, it is not restored to the default directory and file permissions before the operating system is installed, and this problem is often encountered if the directory and files and the new system are preserved, if no encryption is set, Generally, you can recover, but if you are setting up encryption, you will not recover. Method: Security Options---Advanced----permissions--Add an existing user---... Inherited.... Will be
If you have questions you can discuss with me at any time, to send me a message or message Baidu, hope that friends are not hesitate to enlighten ... O (∩_∩) o ...
New found a user's situation: (Resolved)
The right to add an administrator does not work, and none of the above works.
The solution is to turn off rising real-time monitoring, everything is OK!
Estimated that some system files infected with the virus, rising blocked execution, resulting in most EXE does not work
This kind of situation recommends thorough antivirus, or reload the system "{Other anti-virus software situation similar}"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.