Hello guys,
I was introduced to VBScript by a friend yesterday, and I am tinkering with it.
I have successfully written working code to do a CCleaner cleaning operation using SendKeys.
I am liking it so far :D
Now, I am having a problem writing the script for SmartDefrag. It's pretty simple for you guys I guess.
Here is my initial code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Program Files (x86)\IObit\IObit SmartDefrag\SmartDefrag.exe"
This code is supposed to open the software for me. The file is most definitely in that path.
I think the problem is in the "spaces" in the path.
The error I am getting is the following:
Script: C:\Users\J\Desktop\VBS\smartdefrag_analyze.vbs
Line: 3
Char: 1
Error: The system cannot find the file specified.
Code: 80070002
Source: (null)
I would really appreciate your help gurus !