Need help with SendConsoleCommand

I’ve got a problem where the darn server pushed down invalid profile documents to the client and it’s not possible to delete the documents from the ($Policies) view in the local address book…What I did discover is when I ran nupdall names.ns -R on the client, the corrupted document (stubs?) finally disappeared and the policies are now in enforcement on the clients.

Since I cannot visit every PC in our domain to manually enter in the command at the DOS prompt (let alone the users)… I figured it would work programmically.

So right from the example in the designer client I tried…

Sub Initialize

Dim session As New NotesSession

consoleReturn$ = session.SendConsoleCommand( “”, “nupdall names.nsf -R”)

End Sub

and it fails because it can’t find server “”…

I’m trying to run agent that automatically urns the updall on the client side.

Running a script that loops thru doc entries in the ($policies) view works, but when It comes across these corrupted docs, the script errors out and exits…

So running nupdall in the only choice.

Can anyone help with how to do this on the local client?

Thank you.

Brett

Subject: Where are you running this?

  • I use sendConsoleCommand() just as you indicated, with “” for the server name, it runs just fine from the server. Help doesn’t bother to indicate what happens if one attempts to run this on a client against itself, it only says the current user must have the authority to run it against a server. It does, however, say “Sends a console command to a Domino server”. This implies that it won’t work against a client, since that’s not a server. (grin)- I’d try either Shell() to run it from a command line, or if you’d like to be able to get a return code (and you’re on windoze) use the CreateProcessA API to launch it.

  • Hope this helps…

Subject: Used just that

I ended up using just that. The shell Command.

Dim result As Integer

Msgbox ( “Please enter your Notes Password in the DOS window when prompted” )

result = Shell ( “nupdall names.nsf -R”, 1)

This is by all means isn’t the best way to push a nupdall / compact to the clients names.nsf, because the user is reprompted for notes password and some people are well…people.

But it was the only way to go…

Thanks.