I have a 500 line vbscript I wrote years ago that now won't work on Windows 7. The reason is vbscript can't perform a File Open/Browse in vbscript in Windows 7. (I've tried all the suggestions I've found on the net but none of them work except for the
Word method.) I figured it was a good time to start learning Powershell and started looking at running a Powershell mini script to do the file open for me then return the selected file back to the vbs script. I've got the Powershell script and it works fine.
(Thanks, Scripting Guys!) Granted this process isn't elegant but I just want to get the script working and I'll start converting it over to Powershell when I learn more.
One twist. I don't want to call another script. I want to send all the Powershell commands at once. The problem I'm seeing is Powershell is reporting an error that is is missing a ")". The only changes I"ve made to the Powershell commands is to replace
the double quotes with two double quotes so they are passed through to the Powershell command. Here's what I've got:
I have not tried to do what you are attempting. However, if you are sure you have not mangled the code (that worked previously) then you need to add another set of quotation marks. What is happening is that the first quote escapes your quotation mark, the
second one is seen as closing the one you added to the beginning of the string.
You can also try using the backtick (`) to escape a quotation mark to make things easier to read.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.