Can anyone tell me what is wrong with the following line.
Code:Process.Start("regedit", "/S Environ("%systemdrive%") &"\FixAVI.reg")
I get err with the "%" = Character is not valid.
Printable View
Can anyone tell me what is wrong with the following line.
Code:Process.Start("regedit", "/S Environ("%systemdrive%") &"\FixAVI.reg")
I get err with the "%" = Character is not valid.
Your double quotes are messed up. You can't just plop a double quote into a string because it's interpreted as the end of the string. If you want a double quote in a string you have to escape it, e.g.vb.net Code:
Dim str As String = "He said ""Hello"" to me."
Look at the number of quotes you are providing...
[EDIT] - Jmchilhinney beat me to it as I was preparing a nice brightly coloured example of what was code and was string!
So how do I do that.
I just want to run REG file located at SystemRoot, but in silent mode
jmcilhinney gave you an example - just double up your quotes which form part of the string literal.