user19911303
user19911303

Reputation: 449

open control panel using VBScript

i'm very new to VBScript, i need to open control panel using VBScript, I tried to open explorer like this

Dim txtFolderToOpen  
txtFolderToOpen = "C:\Windows" 
App.Run txtFolderToOpen 
Set App = Nothing

this works fine, but if i put the path as Control Panel it won't work,

Is there any way to do this? Thank you

Upvotes: 1

Views: 6054

Answers (2)

tatzagata
tatzagata

Reputation: 1

To open Programs and Features using a vbscript, use the following command-

CreateObject("WScript.Shell").Run "control.exe Appwiz.cpl"

Upvotes: -1

Helen
Helen

Reputation: 97962

To open the Control Panel, you can Run the %windir%\system32\control.exe file:

CreateObject("WScript.Shell").Run "control.exe"

To open a specific Control Panel applet (.cpl), specify the .cpl file name as a parameter for control.exe:

CreateObject("WScript.Shell").Run "control.exe TimeDate.cpl" ' Open Date/Time properties

Upvotes: 7

Related Questions