Prev: WMI
Next: Loop folder
From: Al Dunbar on


"Kenneth A. Larsen" <LarsenK(a)verizon.net> wrote in message
news:eV6mpscTLHA.4344(a)TK2MSFTNGP02.phx.gbl...
>
> "PokerFanatic" <PokerFanatic(a)discussions.microsoft.com> wrote in message
> news:C48CB2DC-C8F2-4CA9-A436-E853ECA57732(a)microsoft.com...
>>I have a 500 line vbscript I wrote years ago that now won't work on
>>Windows

<snip>

>> Anyone attempted this? Any ideas?
>>
>> Thanks.
>
> No! Sorry kid.

Hey, just because you have no ideas, doesn't mean that nobody does. Learn to
speak for yourself, or just stay silent when you have nothing useful to say.

/Al


From: Mayayana on
| > I'm pretty sure
| > that both work in Vista/7.
|
| Hopefully. The OP said he tried everything he has found and concludes that
| "none of them work".

Yes, but he didn't say *what* he tried.

One of my scripts is the IE method using <INPUT
TYPE="file"...>. The other uses HTMLDlgHelper from
mshtmled.dll. I said I'm pretty sure because I think
I remember that both have been discussed and people
have reported that these methods work on Win7.
If either one doesn't, or has limitations, I hope someone
will report that. (Personally I find it hard to keep
up with these things. I know the BrowseForFolder has
all sorts of different behavior on different systems, but
darned if I can remember the details. :)


From: Al Dunbar on


"Mayayana" <mayayana(a)invalid.nospam> wrote in message
news:i63mtc$2np$1(a)news.eternal-september.org...
> | > I'm pretty sure
> | > that both work in Vista/7.
> |
> | Hopefully. The OP said he tried everything he has found and concludes
> that
> | "none of them work".
>
> Yes, but he didn't say *what* he tried.

I wasn't suggesting that he had tried your two suggestions or that they do
not work in Vista/7. Rather, I was commenting on an assumption often made by
people having difficulty, i.e. that it's the tools, not how they are used,
that must be the problem. It is certainly an assumption I have made
incorrectly myself on numerous occasions.


/Al


From: Kenneth A. Larsen on

"Al Dunbar" <alandrub(a)hotmail.com> wrote in message
news:ebuEokeTLHA.5944(a)TK2MSFTNGP06.phx.gbl...
>
>
> "Mayayana" <mayayana(a)invalid.nospam> wrote in message
> news:i61gqs$t31$1(a)news.eternal-september.org...
>> See this download:
>>
>> http://www.jsware.net/jsware/scripts.php5#classpk
>>
>> Download the ZIP. Unpack it. In the "Choose FileFol" folder
>> there are two methods to browse for a file. I'm pretty sure
>> that both work in Vista/7.
>
> Hopefully. The OP said he tried everything he has found and concludes that
> "none of them work". A more accurate conclusion might have been "I have so
> far been unable to get any of them to work"...
>
>> It looks like your PowerShell version will require at least
>> the .Net Framework...not to mention PowerShell itself.
>
> He must already have satisfied those prerequisites, otherwise Powershell
> itself would not have been able to report the error.
>
> Resolving mixed-language syntax issues can be confusing, and generally
> requires a good grasp of both languages- and mine is weak for
> powershell... ;-)
>
> If the problem is resulting from the doubled-double quotes, the OP could
> try:
>
> redouble them:
> LoadWithPartialName(""""System.windows.forms"""")
> replace with single quotes:
> LoadWithPartialName('System.windows.forms')
>
> If that doesn't work, he could try removing the pipe to Out-Null.
>
> If that doesn't work he could embed the powershell command within double
> quotes and use the invoke "&" operator by changing this:
>
> {... the long ps command ...}
>
> to:
>
> ""& {... the long ps command ...}""
>
> The doubled quotes are there for the .run command, as the powershell
> command is embedded in a quoted string in vbscript.
>
> And if that doesn't work with the various quoting suggestions I gave
> above, is there perhaps a command line length limitation in operation
> here?
>
>
> /Al
>
>> But
>> if you want to use it, try here for help:
>>
>> microsoft.public.windows.powershell
>>
>> ------------------------------------
>>
>> |I have a 500 line vbscript I wrote years ago that now won't work on
>> Windows
>> | 7. The reason is you can't perform a File Open/Browse in vbscript in
>> Windows
>> | 7, I(I've tried all the suggestions I've found on the net but none of
>> them
>> | work.) I was 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.
>> |
>> | 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 doubl quotes with two double
>> quotes
>> | so they are passed through to the Powershell command. Here's what I've
>> got:
>> |
>> | Set objWSShell = CreateObject("Wscript.Shell")
>> | psCommand = "powershell -noexit -command
>> |
>> {[System.Reflection.Assembly]::LoadWithPartialName(""System.windows.forms"")
>> || Out-Null ; $OpenFileDialog = New-Object
>> System.Windows.Forms.OpenFileDialog
>> | ; $OpenFileDialog.initialDirectory = $initialDirectory ;
>> | $OpenFileDialog.filter = ""All files (*.*)| *.*"" ;
>> | $OpenFileDialog.ShowDialog() | Out-Null ; $OpenFileDialog.filename}"
>> | msgbox psCommand
>> | Path = objWSShell.Run(psCommand,,true)
>> |
>> | I put the -noexit command in there so I could see the error.
>> |
>> | Here's what Powershell reports:
>> | Missing ')' in method call.
>> | At line:1 char:52
>> | + {[System.Reflection.Assembly]::LoadWithPartialName( <<<<
>> | System.windows.forms
>> | ) | Out-Null ; $OpenFileDialog = New-Object
>> | System.Windows.Forms.OpenFileDialog
>> | ; $OpenFileDialog.initialDirectory = $initialDirectory ;
>> | $OpenFileDialog.filte
>> | r = All files (*.*)| *.* ; $OpenFileDialog.ShowDialog() | Out-Null ;
>> | $OpenFileD
>> | ialog.filename}
>> | + CategoryInfo : ParserError: (CloseParenToken:TokenId) [],
>> Paren
>> | tContainsErrorRecordException
>> | + FullyQualifiedErrorId : MissingEndParenthesisInMethodCall
>> |
>> | Anyone attempted this? Any ideas?
>> |
>> | Thanks

What ever it takes cupcake!
>>
>>


First  |  Prev  | 
Pages: 1 2
Prev: WMI
Next: Loop folder