Dim Path As String = "C:\ProgramData\Microsoft\_
Windows\Start Menu\Programs\Startup\test.exe -y -u"
Dim ImagePath = New Regex(".+\..{3}\s?").Match(Path).Value.Trim
msg(ImagePath)
This is what I ended up doing. It worked best, and allowed me to do other things I needed too. I'm not entirely sure if your solution above worked or not, But i'm keeping to this. Thanks anyways.