Compact Workspace by script

Posted on 2004-11-19
Last Modified: 2013-12-18
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!
Question by:Matt_Jones
    LVL 15

    Expert Comment

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

    @Command( [WindowWorkspace] ) ;
    @Command([FileOpenDatabase]; "Your Server":"yourDatabase.nsf" );
    LVL 15

    Expert Comment

    Oh, and add
    @PostedCommand([FileOpenDatabase]; "Your Server":"yourDatabase.nsf" );

    again after that.

    Author Comment

    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.
    LVL 15

    Expert Comment

    OK, I can probably write a new solution, but you'll need R6 to run it

    Author Comment

    Sorry - still no good. We're running R5. Any suggestions?
    LVL 24

    Accepted Solution

    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.

    LVL 31

    Assisted Solution

    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.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
    Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now