# Solved: Run cmd commands through vbScript file (.vbs)



## APag (Apr 11, 2007)

I Im running Windows Professional...

I would like to create a vbScript file (.vbs) that runs a command through command prompt when opened. For example... when you open up _myfile.vbs_ it will reset the windows time to 12:00 AM. Can some one give me a code for that so I can add more complex commands to it? *Thanks, your help will be greatly appriciated!!!*


----------



## Squashman (Apr 4, 2003)

Quick google search.
http://www.tek-tips.com/faqs.cfm?fid=661


----------



## APag (Apr 11, 2007)

i know this is a LATE reply but, i have found an error in the code and dont know how to fix it. do u?

Line:9
Char:1
Error: The system cannot find the file specified.
Code:80070002
Source: (null)


----------



## Squashman (Apr 4, 2003)

I don't know VB very well. But my best guess would be "Do you have D: as one of your hard drives?


----------

