Actually this is .vbs file, but I couldn't find right place for my question.
I wrote one .vbs file, the purpose is that when you double click this .vbs file, it display login window for user login, then mapping to some networkdrive, and also generate msgbox or popup window after finish mapping, tell user which drive is mapped successfully.
My problem is in msgbox, it always tell you previous drive is mapped, rather than currently mapped. For example, drive G: K is alreday mapped, my program will disconnect them, mapping to M: N: S: X..... After run this vbs file, it maps to new drive, but the msgbox tell you drive G: K mapped successfully, rather than Drive M, N, S, X mapped.
The following code is used after mappnetworkdrive:
Set AllDrives = objNetwork.EnumNetworkDrives()
For i = 0 To AllDrives.Count - 1 Step 2
TmpDrive = TmpDrive & AllDrives.Item(i)
objPopUp.popup "Drive " & tmpDrive & " connected successfully."
Seems like need some "Refresh" function to refresh networkdrive. Does someone have suggestion about it or know right place to post my question, please let me know as soon as possible. Thanks a lot!