This is more complicated but definitely does the trick:
Dim p As Process = New Process()
Dim pi As ProcessStartInfo = New ProcessStartInfo()
pi.Arguments = " /C attrib +s +h " + My.Settings.TempPath
pi.FileName = "cmd.exe"
p.StartInfo = pi
p.Start()