When the VBS script cannot run, the system prompts that Windows cannot access the specified device path or file.

Source: Internet
Author: User

After downloading and installing the Updater Application Block yesterday, you need to execute a Deploy. vbs file, which is easy to learn. This small problem actually took a lot of time.
Share the conclusion.
First, my vbs File Association has been captured by hero. Double-click Deploy. vbs to open the hero. However, I used the open method and tried the browser and cmd.
Today, after thinking about this question, I have an idea to go to Microsoft's News Group and ask. Then I went to the full-text search of CSDN. It is really disappointing. My keyword is only vbs. After execution, I found a lot of things I want. Wscript.exe is used to execute this file.
Wscript.exe Deploy. vbs is typed in the response, but the error "There is no script engine for file extension'. vbs" is returned '. At this time, I thought of google. I found a lot of useful information, and I found a solution in the first one. The reason is that my vbs Association has been lost and must be specified.
Run wscript.exe // e: vbscript Deploy. vbs in cmd. Sure enough !!!
If not, you can use
Cscript.exe // e: vbscript Deploy. vbs

Conclusion: wscript.exe is used to execute script files such as vbs. If the file association is lost. You can use // e: vbscript.

Attached is a helpful article I found.

1. What is WSH?
WSH is the scaling form of Windows Scripting Host (Windows Script Host. WSH was first introduced in the Windows 98 operating system and is a language-independent script running environment based on a 32-bit Windows platform. For example, you have compiled a script file, such as the suffix. vbs or. js file, and then double-click and execute it in Windows. Then, the system will automatically call an appropriate program to explain and execute it, and this program, it is Windows Scripting Host, and the program execution file name is Wscript.exe (Cscript.exe if it is at the DOS command prompt ).

Do you want to know if WSH is available on your machine? If your machine does not contain the wscipt.exe000000000000cscript.exe files, you can. If you find it, congratulations! You have installed WSH. Otherwise, install it manually:
In Windows 98, WSH is automatically installed as a component of the operating system. If this component is accidentally lost, you can open "control panel --> Add/delete procedure --> Windows Installer --> attachment" in sequence, and then forward "√" before "Windows Scripting Host ", then confirm the installation of the WSH component.

Ii. Relationship between script language and WSH
As you know, scripting languages (including JavaScript and VBscript) are often embedded into webpages (including HTML page clients and ASP page servers ). For scripts implanted in HTML pages, the parsing engine is loaded by Web browsers such as IE. For scripts implanted in ASP pages, the required parsing engine is provided by IIS (Internet Information Services. For scripts that appear outside the HTML and ASP pages (they often exist in the form of independent files), they need to be processed through WSH. To work properly, install IE 3.0 or later, because WSH will call VBScript and JavaScript parsing engines in IE. [Not ended] [iduba_page] Most of these scripting languages implanted on webpages are irrelevant to network security. However, there are also a few good people with ulterior motives who put some code that seriously threatens network security (we often call it "malicious code ", they usually need to modify the Registry to "malicious !), Mixing in normal scripts often makes it difficult for us to defend against attacks. However, if we know a little bit about the scripting language, these "tricks" are very easy to understand. Let's start with some simple examples ......

3. WSH application example
WSH can process the script program. How can I read and write the WSH script source file? As long as you have a little bit of Basic (VB programming is better, huh, huh) language basics, it is not difficult to learn to understand programs in the WSH script language. Go to the C: WINDOWSSAMPLESWSH directory! There are several typical script examples, and VBScript and JavaScript versions are provided respectively. It is not difficult to learn some basic WSH applications as long as we open them in notepad and study them carefully.

In notepad, you only need to enter the code in each of the following instances in sequence, save it as the corresponding "*. vbs" file, and double-click the file to see the corresponding effect.

Windows cannot access the specified device path or file. You may not have the proper permission to access this project.

This error occurs because your system partition adopts the ntfs partition format and you have not set the Administrator permission.
Solution:
1. view disk C properties, switch to the "Security" tab, click "add", select an administrator account, and click "OK ". Then log in with this Administrator Account (log out or restart the computer)
2. There is a virus in the system and the file association may be modified. The solution is to disinfect and restore the file association. There is a software dedicated to repairing File Association on the Internet. Just search for it.
3. Security software is installed in the system, such as system safety monter software.
4. disable anti-virus software and firewall.

One by one. Try this simple method: <solved>
Right-click disk X (disk partition X, such as disk D and disk e ......), "property" -- "security" -- select the user name you are currently logged on to, such as "Administrator". Check all the "allow" items under "Administrator permissions" and confirm
You can also click "add"> "advanced" to open the "select user or group" dialog box and click "Search now". All user groups on the local machine are displayed. Select the current user, "OK", repeat the above steps, "allow" all the items to be checked, and then confirm, you should be able to run all the exe files on the F disk.

If not, right-click disk X (X represents the disk partition, such as disk D and disk e ......), "attribute" -- "security" --; select the current Login User Name in "group or user name, click "advanced" -- "owner" -- "current owner of the project" column displays the "S-1-5-21-147001333-1580818891-1708537768-500" string; click the user name in the 'name, check "Replace sub-container and object owner" and click "OK". After the system has replaced it, you can open the exe file of the partition without restrictions!

Resolved here
NOTE: If there is no security option for an NTFS Hard Disk

Open a folder, click "Tools"> "options"> "View"> "use simple file sharing (recommended)", and then click "OK. The "security" tab is available.

---- PS ----

Start and run cmd Input
Assoc. exe = exefile [there must be a space between assoc and .exe 〕
Re-establish Association

If it is poisoned, please kill first

Or this method
① Enter the windows folder on the system disk and enter the root directory of the Registry.
Click "regedit.exe" in the upper right corner and select "RENAME. (You 'd better rename the name in DOS and use the ren command)
① Change the file suffix "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 click "OK ".

This method can be used in both Windows 2000 and Windows XP to solve this problem:
1. In C: WINDOWS, find the Registry Editor regedit.exe(blue green icon) and change the .exe extension to. com.
(If you cannot see the extension, open "my computer"> "Tools"> "Folder Options"> "View"> Empty drop-down scroll bar and select "Hide extensions of known file types ". Remember to check this option again after solving the problem, or you will encounter problems that you do not know in the future)
2. Double-click to run regedit.com.
3. Find the Registry branch [HKEY_CLASSES_ROOT exefile shell open command]
Double-click the name "default" on the right to change the value data to ["% 1" % *] in square brackets. Close.
4. Enable anti-virus software to thoroughly scan and kill all partitions.
5. After the attack, change regedit.comin Step 1 back to regedit.exe.
6. Close the ticket!

Computer Software and Hardware application webmaster edit Add:

Other Method 1: Right-click your browser (Internet Explorer E) and select Properties. Then, select the fourth item "content ". Go to the "poster ". Select a trusted issuer and delete all the options in it. OK

Other Method 2: file and directory access permissions. for example, after the operating system sets strict security permissions for directories or files on the NTFS disk, the directory and file permissions before the operating system are reinstalled are not restored to the default, this problem is often encountered when directories and files and new systems are retained. If encryption is not set, it can still be restored, but it cannot be restored if encryption is set. method: Security Options --- advanced ---- permission -- add existing user ---... inherit .... you can

If you have any questions, please feel free to discuss with me and send me a Baidu message or a message. Please kindly advise me... O (∩ _ ∩) O...

I found a new netizen: (solved)

Adding Administrator permissions is ineffective.

The solution is to turn off the real-time monitoring of rising, and everything is OK!

It is estimated that some system files are infected with viruses and are blocked by rising, resulting in the failure of most exe operations.

In this case, we recommend that you completely eliminate viruses or reinstall the system. [{other anti-virus software is similar }]

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.