220-1102 Question 785
Single answer.vbsA support technician receives a login script named MapDrives.vbs from the network administrator. The script is supposed to map departmental network drives when users sign in to their Windows 10 PCs. A user reports that double-clicking the file does not run the script correctly because it opens in a text editor instead of executing. The technician wants to run the script manually for testing without changing file associations on the PC. Which command should the technician use?
- A
wscript C:\Scripts\MapDrives.vbs
- B
regsvr32 C:\Scripts\MapDrives.vbs
- C
msiexec /i C:\Scripts\MapDrives.vbs
- D
gpupdate /force C:\Scripts\MapDrives.vbs
Show answer and explanation
Correct answer: A
Explanation
VBScript files use the .vbs extension and are typically executed by Windows Script Host, commonly through wscript.exe or cscript.exe. In a GUI desktop environment, wscript is a standard choice for manually launching a VBScript when file associations are broken or intentionally unchanged. This fits a real troubleshooting scenario in which a technician needs to test script behavior independently of shell associations. Microsoft documentation for Windows Script Host identifies wscript.exe and cscript.exe as the script hosts for running VBScript and JScript files. The other commands are valid Windows administrative tools, but they serve unrelated purposes: regsvr32 registers components, msiexec handles installer packages, and gpupdate refreshes Group Policy.
- A. Correct.
Correct. .vbs files are VBScript files and can be executed directly with the Windows Script Host. Using wscript.exe followed by the script path runs the script without relying on the current file association. This is a practical way to test a VBScript manually on a Windows workstation.
- B. Incorrect.
Incorrect. regsvr32 is used to register or unregister DLL and ActiveX components, not to execute VBScript files. A technician might choose this if they confuse script execution with registering a component used by a script.
- C. Incorrect.
Incorrect. msiexec is the Windows Installer service command-line tool used for installing, modifying, or removing .msi and related packages. It does not run .vbs login scripts. This distractor reflects confusion between software installation commands and script execution.
- D. Incorrect.
Incorrect. gpupdate /force refreshes Group Policy settings, which may trigger assigned logon scripts through policy processing, but it does not take a .vbs file path as an argument to execute a script directly. Someone might pick this if they are thinking about how login scripts are commonly deployed rather than how to manually test one.