by Jim » Thu Nov 05, 2009 12:41 am
I want to be able to use a batch file to remove all the WebDialogs from the SketchUp registry. Is there a way to use a regular expression do create a .reg file to remove anything that begins with WebDialog_ ?
I guess I could pull the entire Sketchup7 tree from the .bat, and parse it using Ruby. I'll try that.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by gavvy » Thu Nov 05, 2009 3:30 am
reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" /s|find "WebDialog" reg delete "HKEY_CURRENT_USER\Software\Google\SketchUp7" /s /f
-
gavvy
- PluginStore Author

-
- Posts: 48
- Joined: Sat May 17, 2008 3:34 am
by gavvy » Thu Nov 05, 2009 3:38 am
-
gavvy
- PluginStore Author

-
- Posts: 48
- Joined: Sat May 17, 2008 3:34 am
by thomthom » Thu Nov 05, 2009 8:36 am
Jim wrote:I want to be able to use a batch file to remove all the WebDialogs from the SketchUp registry. Is there a way to use a regular expression do create a .reg file to remove anything that begins with WebDialog_ ?
I guess I could pull the entire Sketchup7 tree from the .bat, and parse it using Ruby. I'll try that.
That's interesting you should mention this. I was thinking that yesterday when I was looking at the registry settings for Sketchup and I saw all the old junk entries for old Webdialogs. I also noticed that on a couple of systems I had, there was 100-200 entries for the toolbar. "Purge Registry" I was thinking then.
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Jim » Thu Nov 05, 2009 2:16 pm
Toolbars were easier since there is an entry in the Summary that tells yo how many Toolbars there are in the registry. And since the toolbars are numbered in order, it's easy to reconstruct their key and remove them.
There isn't any summary information for WebDialogs, so you need to find them by name.
The other thing i do is sometimes is completely remove the Sketchu7 section, but sometimes I am only interested in resetting toolbars and dialogs in order to test the "first opening" experience.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by thomthom » Thu Nov 05, 2009 2:29 pm
Jim wrote:Toolbars were easier since there is an entry in the Summary that tells yo how many Toolbars there are in the registry. And since the toolbars are numbered in order, it's easy to reconstruct their key and remove them.
I found that on one of my systems the count and number of entries didn't match. I had more entries than the count. Jim wrote:There isn't any summary information for WebDialogs, so you need to find them by name.
The other thing i do is sometimes is completely remove the Sketchu7 section, but sometimes I am only interested in resetting toolbars and dialogs in order to test the "first opening" experience.
Can't the values be enumerated? Not sure how it works with .bat files, but with the Win32::Registry you can iterate over a registry path's keys and values.
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by thomthom » Thu Nov 05, 2009 2:31 pm
gavvy wrote:reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" /s|find "WebDialog" reg delete "HKEY_CURRENT_USER\Software\Google\SketchUp7" /s /f
Jim, did this work? When I run reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" /s|find "WebDialog" in a command prompt it does list all the entries, but I've yet to try the delete command. I don't understand how it would know what to delete. does it reference to the previous query command?
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Jim » Thu Nov 05, 2009 2:35 pm
I am at the same point as you.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by thomthom » Thu Nov 05, 2009 2:45 pm
Looking at http://technet.microsoft.com/en-us/libr ... 90984.aspxreg delete KeyName [{/v EntryName|/ve|/va}] [/f]I see no /s argument. And /f seem to suppress all prompts. I wonder if that command nukes the whole Sketchup section...
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Jim » Thu Nov 05, 2009 2:55 pm
I came up with this: - Code: Select all
reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "WebDialog_" > reg_keys.txt reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "ToolbarsUser" >> reg_keys.txt
for /f %%k in (reg_keys.txt) do ( reg delete %%k /f )
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by thomthom » Mon Jan 03, 2011 3:08 pm
Jim wrote:I came up with this: - Code: Select all
reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "WebDialog_" > reg_keys.txt reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "ToolbarsUser" >> reg_keys.txt
for /f %%k in (reg_keys.txt) do ( reg delete %%k /f )
This snippet just saved my day. I'd been working on a plugin where I ran into errors in the code that created toolbars - and that cause Toolbar Shuffle. Eventually I noticed that the SU window became very sluggish - when opening, resizing, focusing etc. I'd experienced this before - had to reinstall SU. This time I checked the registry .... 1600+ ToolbarsUser items!!!  Pluss double in the backups which SU8 makes. Running that snippet of yours cleaned up the system. SU is as snappy as anything again. Another point scored for Toolbar Shuffle....
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Jim » Mon Jan 03, 2011 3:20 pm
It's really screwed up. It seems if you turn off a plugin via the Extensions dialog, the next time it is enabled, any Toolbars are treated as new and new Registry entries created.
It's sort of killing my idea for a pre-launch extensions manager because toolbars are reset whenever an Extensions is re-enabled.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by thomthom » Mon Jan 03, 2011 3:30 pm
I wish SU would get a brand spanking new Toolbar system. 
-

thomthom
- PluginStore Author

-
- Posts: 19457
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2019
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by mumbus » Wed Oct 12, 2016 8:04 pm
thomthom wrote:Jim wrote:I came up with this: - Code: Select all
reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "WebDialog_" > reg_keys.txt reg query "HKEY_CURRENT_USER\Software\Google\SketchUp7" | find "ToolbarsUser" >> reg_keys.txt
for /f %%k in (reg_keys.txt) do ( reg delete %%k /f )
This snippet just saved my day. I'd been working on a plugin where I ran into errors in the code that created toolbars - and that cause Toolbar Shuffle. Eventually I noticed that the SU window became very sluggish - when opening, resizing, focusing etc. I'd experienced this before - had to reinstall SU. This time I checked the registry .... 1600+ ToolbarsUser items!!!  Pluss double in the backups which SU8 makes. Running that snippet of yours cleaned up the system. SU is as snappy as anything again. Another point scored for Toolbar Shuffle....
Dumb question. Does this get entered at the CMD prompt? I get errors. %%k was unexpected at this time Error: Invalid key name.
-
mumbus
-
- Posts: 16
- Joined: Mon Jun 08, 2009 10:45 pm
- Name: Gary Ledgerwood
by Jim » Wed Oct 12, 2016 10:29 pm
Unless you're still using SketchUp 7 or 8, you don't need this; and even if your are, you still probably don't need it.
What problem do you wish to solve by running this code?
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Developers' Forum
|