Ok when i run this code from with VB , i.e compiled and run it, works fine, but when i build an exe and run it from there it just hangs. It opens cmd ok, but doesnt run defrag , as i said just hangs there. ?


dim openfrag
openfrag = Shell("cmd.exe /k defrag c:", vbMaximizedFocus)