944,036 Members | Top Members by Rank

Ad:
Dec 19th, 2004
0

Restoring a Registry Setting thru VBS

Expand Post »
anyone know how to get around this:

WshShell.RegWrite "HKEY_CLASSES_ROOT\exefile\shell\open\command\", ""%1"%
*"

I cant seem to include more than 2 " at the end there if i just do "%1 %
*" then it will succesfully write to the registry but it needs the extra 2 " in there & i dont know how to get around that, anyone know???
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Khiladi420 is offline Offline
54 posts
since Mar 2004
Dec 28th, 2004
0

Re: Restoring a Registry Setting thru VBS

Quote originally posted by Khiladi420 ...
anyone know how to get around this:

WshShell.RegWrite "HKEY_CLASSES_ROOT\exefile\shell\open\command\", ""%1"%
*"

I cant seem to include more than 2 " at the end there if i just do "%1 %
*" then it will succesfully write to the registry but it needs the extra 2 " in there & i dont know how to get around that, anyone know???


WshShell.RegWrite "HKEY_CLASSES_ROOT\exefile\shell\open\command\", chr(34) & "%1" & chr(34) & "%*"

the chr(asc) function returns the character represented by the ascii code passed to it. 34 happens to be the ascii double quote character. So, You terminate your string, use concantenation ( the & ) to append the character code 34 (double quotes) to your string.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Windows NT / 2000 / XP Forum Timeline: Windows XP will not start
Next Thread in Windows NT / 2000 / XP Forum Timeline: Need help :(





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC