Special folders - VBScript - SS64.com[
^]
So:
Dim folderPath
folderPath = nice.SpecialFolders("Desktop")
folderPath = folderPath & "\CENT-ERIKA-GUI"
nice.SendKeys "cd "
nice.SendKeys folderPath
nice.SendKeys "{enter}"
However, it's not a good idea to rely on
SendKeys
. If you're just trying to open a file in its associated application, use the
Run
method instead.
Dim nice
Dim filePath
Set nice = Wscript.CreateObject("wscript.shell")
filePath = nice.SpecialFolders("Desktop")
filePath = filePath & "\CENT-ERIKA-GUI\capture.jpg"
nice.Run filePath