Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2006, 06:08 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Regsvr32

Hi,

I am now trying to uninstall a DLL using the regsvr32 executable by using the Shell statement in VBA. However, when running this code
==============================================
Shell "regsvr32.exe /u C:\Documents and Settings\Max\Desktop\SourceCode.dll"
==============================================

it gives me an error message when loading "C:\Documents". It seems that my string isn't correct, because regsvr32.exe tries to uninstall the part before the first space. In which way must I edit my string, in order to let me uninstall the correct path as indicated above?

Thanks in advance
-Max

 
Old January 3rd, 2006, 10:01 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I´m not sure, but because the path contains spaces you should use more double quotes

Shell "regsvr32.exe /u ""C:\Documents and Settings\Max\Desktop\SourceCode.dll"""


-vemaju
 
Old January 4th, 2006, 11:28 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

just regsvr32, no .exe


www.crmpicco.co.uk
 
Old January 4th, 2006, 02:51 PM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Shell "REGSVR32.EXE /u /s """ & path & """", vbMinimizedNoFocus

This works fine











Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.