hi,

I am trying to prevent the progress bar and any windows from popping up when
performing:
set shl = createobject("Shell.Applicatioin")
shl.namespace(dest).copyhere shl.namespace(src).items
do until shl.namespace(dest).items.count = shl.namespace(src).items.count
wscript.sleep 100
loop

according to msdn I should be able to use options:
http://msdn2.microsoft.com/en-us/library/bb787866.aspx

I have tried changing above line to the below but it doesn't work.
shl.namespace(dest).copyhere shl.namespace(src).items, &H4

any help appreciated.

thanks.

RE: copyhere and preventing progress bars and dialogs by v-wywang

v-wywang
Tue Dec 04 03:51:10 PST 2007

Hello RdS,

I understood prevent the progress bar and any windows from popping up when
copying files to compress (zipped) folder. If I misunderstood anything
here, please correct me.

We need to perform more research on this issue . We will reply here as soon
as possible. If you have any more concerns on it, please feel free to post
here.

Thanks for your understanding!
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Re: copyhere and preventing progress bars and dialogs by mayayana

mayayana
Tue Dec 04 13:48:22 PST 2007

You appear to be on Vista. I wonder if that might
affect it. Shell.Application seems to be put together
rather haphazardly, with a lot of functions that are
different on different systems. For instance, I have a
Win98-era MSDN that lists aspects of Shell that didn't
work in Win98. The BrowseForFolder function also
varies by OS.

>
> I am trying to prevent the progress bar and any windows from popping up
when
> performing:
> set shl = createobject("Shell.Applicatioin")
> shl.namespace(dest).copyhere shl.namespace(src).items
> do until shl.namespace(dest).items.count = shl.namespace(src).items.count
> wscript.sleep 100
> loop
>
> according to msdn I should be able to use options:
> http://msdn2.microsoft.com/en-us/library/bb787866.aspx
>
> I have tried changing above line to the below but it doesn't work.
> shl.namespace(dest).copyhere shl.namespace(src).items, &H4
>
> any help appreciated.
>
> thanks.
>



Re: copyhere and preventing progress bars and dialogs by RdS

RdS
Tue Dec 04 20:13:00 PST 2007

thanks for reply, but I don't see your attachment.


"mr_unreliable" wrote:

> RdS wrote:
> > according to msdn I should be able to use options:
> > http://msdn2.microsoft.com/en-us/library/bb787866.aspx
> >
> > I have tried changing above line to the below but it doesn't work.
> > shl.namespace(dest).copyhere shl.namespace(src).items, &H4
> >
>
> hi RdS,
>
> Works for me (see attached script).
>
> cheers, jw
> ____________________________________________________________
>
> You got questions? WE GOT ANSWERS!!! ..(but,
> no guarantee the answers will be applicable to the questions)
>
>

Re: copyhere and preventing progress bars and dialogs by RdS

RdS
Tue Dec 04 20:13:01 PST 2007

posted using vista, but it will run from Win2000 server and win2003.

thanks,.

"mayayana" wrote:

> You appear to be on Vista. I wonder if that might
> affect it. Shell.Application seems to be put together
> rather haphazardly, with a lot of functions that are
> different on different systems. For instance, I have a
> Win98-era MSDN that lists aspects of Shell that didn't
> work in Win98. The BrowseForFolder function also
> varies by OS.
>
> >
> > I am trying to prevent the progress bar and any windows from popping up
> when
> > performing:
> > set shl = createobject("Shell.Applicatioin")
> > shl.namespace(dest).copyhere shl.namespace(src).items
> > do until shl.namespace(dest).items.count = shl.namespace(src).items.count
> > wscript.sleep 100
> > loop
> >
> > according to msdn I should be able to use options:
> > http://msdn2.microsoft.com/en-us/library/bb787866.aspx
> >
> > I have tried changing above line to the below but it doesn't work.
> > shl.namespace(dest).copyhere shl.namespace(src).items, &H4
> >
> > any help appreciated.
> >
> > thanks.
> >
>
>
>

RE: copyhere and preventing progress bars and dialogs by v-wywang

v-wywang
Wed Dec 05 01:49:36 PST 2007

Hello Rds,
Thanks for your waiting.

options only works when we copy some files into a Folder (not compressed).
If you are trying to compress some file into a zip file, the Compress
Progress Bar always shows.(even through you defined the option as 4). But
when working with Genearal Folder (not compressed), I'm sure you will found
the option (4) really works fine. It will prevent the Copy progress bar.
But, regarding to Compress Progress Bar, I'm afraid to say, (as far as I
know), we cannot prevent it. Thanks.

Hope this helps, please feel free to update here again, if you have any
more concern. We are glad to assist you.

Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Re: copyhere and preventing progress bars and dialogs by mayayana

mayayana
Wed Dec 05 06:15:46 PST 2007


> posted using vista, but it will run from Win2000 server and win2003.
>

I'm guessing you mean that it also doesn't work
from Win2000/2003. Maybe you've already thought
of this, but I don't see why you don't use the
FileSystemObject for what you want, especially
given that the Shell object is so undependable and
piecemeal. FSO was designed for basic file operations.
Most people only use Shell because they *want* a
progress bar.

Another problem with Shell is that it's not really
relating to the file system. It's more like an automation
of Explorer. That makes it undependable for dealing
with files. Two problems I know of, for instance, are
that hidden files are not included in a Shell FolderItems
collection. On Win9x, even system file extensions like
.drv and .dll are not included, regardless of the folder
view settings! (I discovered that recently when writing
a COM wrapper for ShellFolderView and Shell Folder.
Those are only the problems that I happened across.
I ended up reverting to API for actual file enumeration
operations.)





Re: copyhere and preventing progress bars and dialogs by RdS

RdS
Wed Dec 05 15:25:03 PST 2007

most agreed.

but the reason I must use shell is because I am trying to add a file(s) to a
zip file using Windows built-in compress (zipped) folders and I have seen
nothing that would allow me to do this using FSO.

Thanks again.

"mayayana" wrote:

>
> > posted using vista, but it will run from Win2000 server and win2003.
> >
>
> I'm guessing you mean that it also doesn't work
> from Win2000/2003. Maybe you've already thought
> of this, but I don't see why you don't use the
> FileSystemObject for what you want, especially
> given that the Shell object is so undependable and
> piecemeal. FSO was designed for basic file operations.
> Most people only use Shell because they *want* a
> progress bar.
>
> Another problem with Shell is that it's not really
> relating to the file system. It's more like an automation
> of Explorer. That makes it undependable for dealing
> with files. Two problems I know of, for instance, are
> that hidden files are not included in a Shell FolderItems
> collection. On Win9x, even system file extensions like
> ..drv and .dll are not included, regardless of the folder
> view settings! (I discovered that recently when writing
> a COM wrapper for ShellFolderView and Shell Folder.
> Those are only the problems that I happened across.
> I ended up reverting to API for actual file enumeration
> operations.)
>
>
>
>
>

Re: copyhere and preventing progress bars and dialogs by mr_unreliable

mr_unreliable
Thu Dec 06 08:44:50 PST 2007

RdS wrote:
> thanks for reply, but I don't see your attachment.
>

To get ng attachments, you can use a newsreader such
as: Outlook Express or Thunderbird. Also, I have been
able to pick up attachments when using google advanced
group search (with the Firefox browser).

As best I recall, some (if not most) of the ng archival
sites don't bother to archive the attachments.

Sometimes I get "flamed" for not just including those
scripts in the body of the posting, which would avoid any
difficulties in retrieving attachments. That may very
well be, but on the other hand, very few (if any) people
read or even care about those scripts, so including them
in the body would just result in needless verbosity.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)


Re: copyhere and preventing progress bars and dialogs by v-wywang

v-wywang
Fri Dec 07 00:04:07 PST 2007

Hello Rds,

Windows XP or above handles Zip files by zipfldr.dll (which is located in
%windir%\system32\zipfldr.dll). It's a thrid party product. As you see,
Microsoft doesn't provide any API to compress Zip via zipfldr.dll. Shell is
the only way to achieve that.

The MSDN documentation you referenced about CopyHere method only applies to
normal file system path.
It doesn't work for a zip file folder. That's why you find the option 4 to
disable the progress dialog doesn't help.

I noticed AG asked the same issue before in
microsoft.public.platformsdk.shell newsgroup.
http://groups.google.com/group/microsoft.public.platformsdk.shell/browse_thr
ead/thread/e76aa85366c40b0c/d0ceb5a59d5521ed?lnk=st&q=zipfldr.dll#d0ceb5a59d
5521ed
[CopyHere Method]

Hope this helps.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.