Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MoveFileEx call from a Script?

143 views
Skip to first unread message

John Boenzi

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to

Is it possible to use the Win32 API MoveFileEx function in a VB script? And
if so what is the syntax?

I'd like to have an in-use file moved on reboot:
MoveFileEx(szSrcFile, szDstFile, MOVEFILE_DELAY_UNTIL_REBOOT);

Thanks for your help.

Chad Myers

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to

You cannot make Win32 API calls directly from VBScript. Period.

You can, however, wrap those API calls in a C++ or VB COM object
and then call that COM object from script.

-Chad

"John Boenzi" <jbo...@NOSPAM.kelleydrye.com> wrote in message
news:e$G3hLtOAHA.277@cppssbbsa04...

Michael Harris

unread,
Oct 20, 2000, 3:00:00 AM10/20/00
to

Q228930 - How to Replace Currently Locked Files with Inuse.exe
http://support.microsoft.com/support/kb/articles/Q228/9/30.ASP

--
Michael Harris
Microsoft.MVP.Scripting
--

G. Born

unread,
Oct 21, 2000, 3:00:00 AM10/21/00
to

There is an ActiveX control in the WSH Bazaar that provides
similar things. I used VB 5 CCE to create that ActiveX control.
Direct API calls are not possible in WSH, and also the DynaWrap
DLL mentioned sometimes is difficult to handle. Have a look in the
WSH Bazaar, there is also a sample demonstrating how to
create an ActiveX control using VB 5 CCE.

G. Born
______________________________________________________
Check out the WSH Bazaar at www.borncity.de

John Boenzi schrieb in Nachricht ...

0 new messages