Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Shortcuts that prompt for Domain Authenication

Posted on 2013-01-09
5
Medium Priority
?
618 Views
Last Modified: 2013-01-14
We have a conference room PC that is setup to auto logon with a generic user account.  We want to create shortcuts to a number of network shared folders that will prompt for User name and password.  The generic account is not to have access to the folders itself.  We want the users to be able to click on the shortcuts and put their credentials in to access the data.  Also we would like it so that when the folder is closed and opened again it prompts for credentials each time as this machine will not likely be rebooted very often.  The Conference room PC is currently running Windows XP Pro.  How can this be accomplished?
0
Comment
Question by:dxwieland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Andrew Davis
ID: 38761523
You would need to write a vbs script that calls for the username and password and then opens the relevent folder with those credentials. But i feel this is frought with issues.

Why not just get users to log on to the system with their own accounts?



Cheers
Andrew
0
 

Author Comment

by:dxwieland
ID: 38763455
Andrew,

Can you provide a sample vbs script that i could work from?  Unfortunately as i agree it would just be better to have each user just log on with their own accounts which is how they are doing it now.  The business unit has asked for an auto logged on user account because the site is a remote construction site and it takes much too long for their profiles to load each time they log off and back on.  Also this machine is being used by multiple people in a meeting environment and a number of people may take control to show their piece and it is not practical for users to log off and back on for each presenter.  I hope this makes sense.

Thanks

Daniel
0
 
LVL 19

Accepted Solution

by:
Andrew Davis earned 2000 total points
ID: 38765777
save the code below to a file called {whatever}.vbs on the desktop

ServerShare = "\\Server\data"
DriveLetter = "Y:"
NetDomain = "Domain.local\"
UserName = NetDomain & InputBox("Username:")
Password = InputBox("Password:")

Set NetworkObject = CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")

If FSO.DriveExists(DriveLetter) Then 
	NetworkObject.RemoveNetworkDrive DriveLetter, True , True
'	WScript.Quit
End if
NetworkObject.MapNetworkDrive DriveLetter, ServerShare, False, UserName, Password
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "%windir%\explorer " & DriveLetter & "\"

MsgBox("Click OK When you are finished!")
If FSO.DriveExists(Driveletter) Then 
	NetworkObject.RemoveNetworkDrive DriveLetter, true , True
	'WScript.Quit
End if

Set FileName = Nothing
Set Directory = Nothing
Set FSO = Nothing
Set ShellObject = Nothing
Set NetworkObject = Nothing

Open in new window


You will need to adjust the script at the top with your domain and what drive letter you want to use.
0
 

Author Closing Comment

by:dxwieland
ID: 38767235
This works perfect for what we are doing.  Thanks a Million!!

Daniel
0
 

Author Comment

by:dxwieland
ID: 38775506
Andrew,

Is there a way to mask the password on that VBS script you gave me?

Thanks

Daniel
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question