I am wondering if someone can clarify the proper use of the oShell.run
command at the bottom of the sample script below. I am importing a registry
file via WSH. The name of the file is in long format as indicated by the
stmpFile variable. Since the file name will be different for every user, I
want to pass the variable name instead of the file name. However the long
format is not allowing the import. I know I have to pass the quotes along
with the variable. I have tried several syntax however, none of which have
worked. Can anyone assist?
sTmpFile = "c:\Some long Name.reg"
' Write to the temporary registry file
fFile.WriteLine "Windows Registry Editor Version 5.00"
fFile.WriteLine """UserName""=hex:" & strUsernameHex
fFile.WriteLine """UserInitials""=hex:" & strInitialsHex
oShell.Run "regedit /s " & sTmpFile, 0, True