Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...A lot of the information I've found at this site would've taken me forever if I'd have attempted to research it on my own. Thanks again."

Geography

Where in the world do Tek-Tips members come from?
greggardner (MIS)
1 Dec 04 13:30
The end project of this question is actually a VBscript program using DynaWrap but the folks over there suggested this forum as hopefully best able to solve my problem.

I need to change some drive letters from a script without rebooting (ala the Disk Management applet). My environment is Windows XP.

No problem modifying the MountedDevices registry values but my changes don't take effect until after rebooting. It was suggested that I use DynaWrap to "call" user32.dll with the params (&HFFFF, &H1A, 0, 0). The first two correspond to HWND_BROADCAST & WM_SETTINGCHANGE.

The VBscript lines (using DynaWrap) are:
Set oDWrap = CreateObject("DynamicWrapper")
oDWrap.Register "user32.dll", "SendMessageA", "i=llll", "f=s", "r=l"
oDWrap.SendMessageA &HFFFF, &H1A, 0, 0

The above runs but doesn't seem to have any effect.

1) Is this the correct Win32 API call to broadcast a drive letter change? If not, can someone point me at what would work?
2) Is the above method appropriate (given the age of DynaWrap) or is there now a better way to approach this that would work with VBscript?

Thanks for any help,
Greg Gardner

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close