I have this script that (when ran at least once) adds its self to registry so it would run at start up.
When it runs after computer restarts, it does not complete its task.
It completes the task only when i run it manually (double clicking the executable)
Task is very simple: Delete previous network drive and assign a new one.
This script was made because windows 7 does not connect to network drive at start up no matter what i try so i needed a script to take care of the
Lets do another experiment and try running this compiled script at login, doing it the old fashioned way:
FileDelete(@ScriptDir & "\test.bat")
FileWriteLine(@ScriptDir & "\test.bat",'Echo @ALL')
FileWriteLine(@ScriptDir & "\test.bat",'Echo NET USE N: /DELETE > "' & @ScriptDir & '\test.log" 2>&1')
FileWriteLine(@ScriptDir & "\test.bat",'NET USE N: /DELETE>> "' & @ScriptDir & '\test.log" 2>&1')
FileWriteLine(@Scrip