Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

formatting strings

$
0
0

I need to create a new registry key and I need double quotes to go around what I write to the registry.

 

$Value="cscript c:\windows\MGH\Machine Printer.vbs"

 

I need to write that to the registry but the entry in the registry does not have any quotes around it.    When I try to wrap my string above with more double quotes it throws up an error when I run it.

 

Once written to the registry I need the registry value to look like this:

cscript "c:\windows\MGH\Machine Printer.vbs"


Viewing all articles
Browse latest Browse all 8583

Trending Articles