Compact Workspace by script

Hi Guys
We have a workaraound solution to a problem with one of our Notes applications. The solution is to delete the database icon from the Workspace, compact the Workspace and then re-add the database. The trouble is that some of our user aren't too good within Notes (putting it nicely) and they end up deleting the Workspace, bookmarks and anything else they can find!
Is there any way we can write a button or similar that will do the three operations automatically? The remove icon and add icon seem to be fairly easily accomplished but I am struggling with compacting the Workspace.
Any help would be greatfully received.
This is fairly urgent so 500 points available!
Matt_JonesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bozzie4IT ArchitectCommented:
Put this in a button, on a memo, send it to the user

@Command( [WindowWorkspace] ) ;
@Command([FileOpenDatabase]; "Your Server":"yourDatabase.nsf" );
@Command([FileCloseWindow]);
@Command([EditClear])
0
Bozzie4IT ArchitectCommented:
Oh, and add
@PostedCommand([FileOpenDatabase]; "Your Server":"yourDatabase.nsf" );

again after that.
0
Matt_JonesAuthor Commented:
Yeah, that works fine for deleting an icon and adding it back on, but the problem I am having is that I need to Compact the workspace before adding the database back and I can't find a command that will let me do this. Unfortunately, your code does not include this functionality either.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Bozzie4IT ArchitectCommented:
OK, I can probably write a new solution, but you'll need R6 to run it
0
Matt_JonesAuthor Commented:
Sorry - still no good. We're running R5. Any suggestions?
0
HemanthaKumarCommented:
Copy ncompact.exe to Notes directory and write a bat file which uses this command

ncompact desktop5.dsk -B

PS: This might ask for user password. to avoid this set the property to share password with other notes-based app in user security settings.

~Hemanth
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
qwaleteeCommented:
ncompact.exe exists on all workstations, no need to copy it in.

I've found that compacting the desktop using ncopact.exe can sometimes lead to corruption, so forewarned is forearmed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.