Hey,
I'm trying to run a file using vbs and keep getting an error stating "The system cannot find the file specified. I've searched around for about 2 hours now and think it must have something to do with double quotes, but still cannot get it to work. My code is posted below. Any help would be appreciated.
Thanks in advance,
Mark
'**************Code*****************
Set wshshell = wscript.createobject("wscript.shell")
Set wshenv = wshshell.environment("Process")
Set wshNetwork = CreateObject("WScript.Network")
Set fsobject = wscript.createobject("scripting.filesystemobject")
Set systemdrive = fsobject.getdrive(wshenv("SYSTEMDRIVE"))
Target = systemdrive & "\Documents and Settings\" & wshNetwork.UserName & "\Start Menu\Programs\Crimson Editor\cedt.exe"
set wshshell = wscript.createobject("wscript.shell")
wshshell.run Target
'****************End Code***************************
I'm trying to run a file using vbs and keep getting an error stating "The system cannot find the file specified. I've searched around for about 2 hours now and think it must have something to do with double quotes, but still cannot get it to work. My code is posted below. Any help would be appreciated.
Thanks in advance,
Mark
'**************Code*****************
Set wshshell = wscript.createobject("wscript.shell")
Set wshenv = wshshell.environment("Process")
Set wshNetwork = CreateObject("WScript.Network")
Set fsobject = wscript.createobject("scripting.filesystemobject")
Set systemdrive = fsobject.getdrive(wshenv("SYSTEMDRIVE"))
Target = systemdrive & "\Documents and Settings\" & wshNetwork.UserName & "\Start Menu\Programs\Crimson Editor\cedt.exe"
set wshshell = wscript.createobject("wscript.shell")
wshshell.run Target
'****************End Code***************************