The “unprecedented” shutdown began last week at the ScotlandsPeople search rooms in New Register House, Edinburgh.
NRS said the problem was “quickly and completely contained”. Other search rooms and the online ScotlandsPeople service remain available, a spokeswoman said.
Anne Slater, head of public services at NRS, said: “The service has been closed since last Wednesday. It’s a ransomware virus. It comes in and tries to lock up your files and then you have to give them money.”
A customer notice on the NRS website said it hopes to reopen the service tomorrow.
One regular user who was at the centre on Wednesday last week told The Scotsman the problem began with “intermittent” glitches. Staff told the public they were going to have to close down the search rooms. They added: “This is certainly unprecedented in all the years I’ve been coming here.”
Fraser and Fraser, an international firm of probate researchers who use the facilities for their work on BBC1’s Heir Hunters TV series, is among those affected.
A spokeswoman for the firm, which has permanent staff at the centre, said: “We are at a loss about when we will be able to gain access to the records. These records are also used to ensure that we can locate family members who are beneficiaries to unclaimed estates.”
The incident is the latest in a series of computer glitches to hit the Scottish Government.
Earlier this month a new £178 million computer system administering Common Agricultural Policy payments to Scotland’s farmers failed.
In November a new system to log hours worked by staff was withdrawn after it developed problems. Murdo Fraser, the Scottish Conservatives finance spokesman, said: “These computer problems are clearly causing a great deal of inconvenience to staff, businesses and members of the public. We need to have a full explanation of what has gone wrong and how quickly things can be fixed.
“The Scottish Government and its agencies have a dismal record when it comes to delivering IT projects and hopefully this is not the latest in a series of errors which could cost millions of pounds.”
Neil Findlay, Labour candidate for Almond Valley and Lothian region, said: “Here we have yet another case of a major Scottish IT project going wrong.
“But this is not just a concern about the bureaucracy of an IT system. Vast amounts of personal data which may be in the wrong hands could be used for questionable purposes.”
Former Scottish Liberal Democrat leader Tavish Scott said: “There will be many questions for the legislature to answer on how this alleged hacking has happened.”
Professor Bill Buchanan, an expert in cybercrime, computer security and digital forensics at Edinburgh Napier University’s school of computing, said: “There are many risks involved with leakages of data from public sector records, including giving away details around next of kin.”