Regedit in vb 2005

G

Guest

hi im using vb 2005 and am trying to export a reg key, code:
procID = Shell("c:\windows\system32\regedt32.exe /e:a c:\\" & Sub_Key & ".reg
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg\" &
Sub_Key, AppWinStyle.NormalFocus, True, 100000)
this does not work

now this code works ; procID =
Shell("c:\windows\system32\regedt32.exe /e:a c:\\" & Sub_Key & ".reg
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" &
Sub_Key, AppWinStyle.NormalFocus, True, 100000)

the only diff i see is the space in "Shared Tools" is the space causing the
prob and if so how can i fix it

thanks Dave
 
M

Mattias Sjögren

the only diff i see is the space in "Shared Tools" is the space causing the
prob and if so how can i fix it

Try enclosing the path in quotes.

.... & ".reg ""HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared
Tools\MSConfig\startupreg\"""


Mattias
 
G

Guest

triet that dont work
thanks dave

Mattias Sjögren said:
Try enclosing the path in quotes.

.... & ".reg ""HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared
Tools\MSConfig\startupreg\"""


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top