This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Oct 19, 2015, 2:26 AM
37 Posts
topic has been resolvedResolved

Attempting to modify the Windows registry with LotusScript or a shell command?

  • Category: Administration
  • Platform: Windows
  • Release: 9.0.1
  • Role: Administrator,Developer
  • Tags: smart upgrade,smartupgrade,7.0.2,fonts,registry
  • Replies: 6

I am looking around for some logic to read/write to the Windows registry. I reviewed an article from a colleague earlier this year (http://blog.texasswede.com/code-read-from-and-write-to-windows-registry-in-lotusscript/) and thought I'd give it a try. Unfortunately, I cannot get rid of some registry keys, no matter what I try (must be a security issue).

Perhaps someone here has found themselves in a similar situation...

  • I am deploying the upgrade of a large number of distributed Notes clients from 7.0.2 to 9.0.1.
  • I'm using Smart Upgrade, with a customised package that includes NICE, and a batch file that initiates the FP4 install as well.
  • The FP4 install fails because the 'JVM' folder was screwed up by the original client installs. Not sure WHAT is wrong, but it is certainly that folder!
  • I found that I can get everything to work successfully if (in my batch file) I totally remove the Notes 'JVM' folder before running the R9.0.1 install.
  • Thing is, I CAN'T remove the 'JVM' folder, because there are some very strange fonts registered with Windows in a subfolder and I can't remove them.
  • I have tried REGINI in the batch file, but the computer needs to be re-booted after running that - Makes it impossible with a Smart Upgrade install. I've also attempted several DOS commands in a shell, but that was thwarted by UAC.

SO... I am trying to roll out logic in Notes that the user will run (without knowing it) and that logic will 'un-register' those fonts. By doing so well before the scheduled upgrade, my batch file will be able to remove those files (the entire 'JVM' folder) during the unattended upgrade process.


I am looking for any logic that would either...

a)  ... allow me to set/remove those registry values; or
b)  ... run a shell command with elevated privileges (RunAsAdministrator) so I can run DOS commands to do the same.

 

Any/all assistance with this would be most appreciated!!

Oct 19, 2015, 1:51 PM
326 Posts
Thoughts

The issue shelling out form the client is user privileges,  I would suggest from the client down compile a list of what it takes to delete the jvm folder and the you can  write a shell script , batch file or .net program to perform those steps.

 

What does the NICE programs say when running it in ui mode?

Make sure there aren't any rouge notes services running or java in the task manager that is not letting the nice tool remove the directory.  New is a link to a technote http://www-01.ibm.com/support/docview.wss?uid=swg21459714.

 

Nice does not force the services down but dos taskill can do this . http://www.computerhope.com/taskkill.htm

 

Here is a url https://groups.google.com/forum/#!topic/comp.groupware.lotus-notes.programmer/0_Av4brIC4c 

on how to write a reg field and then execute it via a shell command so possible doing this and then the install might work.

 

 

Oct 19, 2015, 8:58 PM
37 Posts
Thanks Barry!

I really appreciate your response, but unfortunately I have considered those points.

 

There are no rogue Notes processes in play here. Some of the fonts in the Notes client 'jvm\lib\fonts' folder have been registered in the Windows registry.

The operating system maintains a hold on them, and they cannot be deleted until the fonts are de-registered in Windows.

Problem is, once they have been de-registered, the computer needs to be re-booted before the operating system releases its hold on them.

That being the case, the logic is no good embedded in an unattended Smart Upgrade process.

 

So, I was resorting to deployment of the logic well before the upgrade is initiated.

We use a custom corporate homepage database, so I was hoping to distribute the logic to de-register the fonts use the database script.

The limited user privileges has prevented me from doing so successfully though.

 

I'll look into the potential use of the 'taskkill' command - perhaps that has some merit here.

I will keep on trying, as the success of the entire project relies on this working.

Many of the users are upgrading to Windows 10, and I believe that FP4 is the first version that is officially supported - aaaaaarrrgh!!

Oct 19, 2015, 9:40 PM
326 Posts
Done things like this

you have 2 choices.

 

Work with desktop group and have them push out a msi that will do the cleanup, leave a tag file behind that you can tell in smart upgrade that the machine got fixed and reboot the pc.

 

The other choice is  to

Add to a post open of a always used db (user mail file) logic that would

 

check for ini variable like cleanup=1

If not found would shell out and do what it needs to do like unregister the files  set ini cleanup = 1 and have user reboot

 

Have smart upgrade check for the cleanup=1 flag or the tag file and if it exists do the upgrade,

Oct 19, 2015, 11:51 PM
37 Posts
Thanks again - Problem resolved now

Thanks for sticking with this Barry. The solution you described is what I was trying originally. Unfortunately, it is impossible to 'shell out' to perform any type of registry manipulation because of the limited privileges.

Instead, I focussed on an entirely different solution (after trolling through hundreds of forums and happening on a totally un-related post)...

Rather than trying to effect registry settings, I simply generated a batch file that renames every font in the 'jvm\lib\fonts' folder. Once the machine is re-booted, the entire 'jvm' folder can be removed.

The difference between this and my original solution is that I can run this batch file (shell out) without the elevated privileges required to perform registry manipulation and it has the exact same effect!!

Therefore, I can incorporate the logic into the database 'Open' script well before the R9 upgrades are scheduled for deployment, and the clients can be pre-prepared when the users open Notes and then subsequently re-boot their PC's.

I hope this helps someone else in the same predicament one day!

Cheers!

Nov 20, 2015, 2:15 PM
1 Posts
Deleting Fonts

This may be something to do with the security patches that Microsoft released which stopped fonts from being removed.

This caused havok on a lot of RDS boxes exspecially when printing from programs like Adobe which created fonts on the fly and then can't remove them.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal