Jump to content

Logon to Network drives / servers / domain from PE 2.0


Recommended Posts

Posted (edited)

Hello.

I was wondering if anyone have made some nice HTA or Script which can validate a typed user name/password to a domain or share on a server on a PE system.

I have done a VBscript which can but it is kind of primitive and the password is for now showed while typing.

Best Regards

Peter.


' Made by ptr 13.10.07

Dim objNetwork, Pass
Set objNetwork = WScript.CreateObject("WScript.Network")
Pass = 0

str1LocalDrive = "G:"
str1RemoteShare = "\\servername\d$"
str2LocalDrive = "I:"
str2RemoteShare = "\\servername\e$"
strPer = "FALSE"

Do While pass = 0
On Error Resume Next
strUsr = "servername\" + InputBox("Type UserID")
strPas = InputBox("Type Password")
objNetwork.MapNetworkDrive str1LocalDrive, str1RemoteShare, strPer, strUsr, strPas
objNetwork.MapNetworkDrive str2LocalDrive, str2RemoteShare, strPer, strUsr, strPas
if err then
Wscript.Echo "Wrong username/Password"
pass = 0
else
Wscript.Echo "gogogo"
pass = 1
end if

loop

Wscript.Echo "continue"

Edited by vizz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...