473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Regedit in vb 2005

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\Curr entVersion\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
Nov 8 '06 #1
2 1679
>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

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 8 '06 #2
triet that dont work
thanks dave

"Mattias Sjögren" wrote:
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

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: the_bass_man | last post by:
I need to be able to delete the value of something in my regedit using vb. Does any1 know how i would go about this. Thanks Ste
1
by: Option^Explicit | last post by:
I have seen some apps that are able to control/open regedit and highlight keys throughout the tree and open at a specified subkey. Something like a "Goto" function thats opens regedit at exactley...
6
by: dixie | last post by:
I want to run regedit and write a key from an event in a form in a more generic manner than the way I have done it here which is: RunReg = Shell("regedit.exe /s I:\APPFolder\SQLfix.reg", 0) ...
7
by: German | last post by:
How Can I recover data from REgEDIT since Visual C++ 6.0 ? Thanks in advanced
1
by: OgaW | last post by:
Hi, How exactly does the regedit registry work in windows? How can we make use of them in our application? How the hacker can exploit the registry setting to plant hidden virus down there?...
49
by: indiauday | last post by:
Hello friends, I am new user to this community. My problem is when I try to open registry editor by start> run > regedit, it displays this message. "Registry...
22
epots9
by: epots9 | last post by:
I forgot how to fix this, so i was wondering: how can i get my computer (WIN XP Media Center SP2) to auto select my user account at the logon screen? I only have one account setup with a password....
3
by: RMDan | last post by:
I want a way to disable regedit, but enabling it with out using group policies? Im trying to make my computer safer and want to set up a set of files to enable/disable cmd(i ave bin doing it with...
0
by: adas1173 | last post by:
Hi, I am not able to open the regedit by typing "regedit" in Run. There is no error message being displayed. It simply doesn't run. Searched about it online. Looks like a virus or spyware can...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.