Last week I have this problem with McAfee Agent 4.0 Patch 3. The Agent log showed me "unable to find a valid repository" even when I created a VSE deploy task, and the MsScript "ERROR: NaInet library returned code == -10". I uninstalled the agent and reinstalled it and the error persisted. Looking for a while in the knowledge base I found KB65607. Luckily for me when I changed the user in the Framework Services, it worked. However, I still don´t know why this happened... also I don´t really know what permissions should apply to the agent to work properly.