Sign in to follow this  
Followers 0
secman

DriveMapAdd

4 posts in this topic

I wonder if someone can help.

I am reasonably new to AutoIt but have managed to put together a small number of scripts mostly using the examples of those much more familir with AutoIt than me.

I have however come up against a problem. I have a small script that allows users to log onto their home folders using the DriveMapAdd function. This works fine when used with a local logon or a logon which is not subject to our Windows XP Policy. However, when a policy is implemented it will not map the drive even if run under admin priveledges.

Could someone please let me know what windows functions DriveMapAdd uses to map a drive? I have also been unable to use Run(.....NET USE..) etc possibly for the same reason. Our policy is fairly tight as we are locking down the student desktops within a school so we need to be able to identify which processes/functions are being called.

Thanks in advance.

Share this post


Link to post
Share on other sites



Are the students able to launch "runas"? Are you able to allow them to execute a single program (your script) which would run as a different user? In my time dealing with LUA access issues, this was my preferred solution. Grant the LUA group access to a specified file if it has the correct name/size/location and this program would see who is logged into the machine and do customizations based on that user

Share this post


Link to post
Share on other sites

If you're using Active Directory, and the students have their own log in names, then you can use AD to map the home drive automatically when they log on. No need for any scripting to do that either, it's in the Account tab if I remember correctly.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Are the students able to launch "runas"? Are you able to allow them to execute a single program (your script) which would run as a different user? In my time dealing with LUA access issues, this was my preferred solution. Grant the LUA group access to a specified file if it has the correct name/size/location and this program would see who is logged into the machine and do customizations based on that user

Varian,

Thanks for the reply.

I have tried the script with "RunAs" and still get the same result. It does appear that the policy we have to apply is blocking the drive mapping and we really want to identify which settings we have to change within the policy to allow DriveMapAdd to work. To do this we need to know how the function works and what calls it makes on Windows XP.

I will have a look at giving the local admin account access to the file and setting the runas to use that account.

Thanks again.

BrewMannNW,

If you're using Active Directory, and the students have their own log in names, then you can use AD to map the home drive automatically when they log on. No need for any scripting to do that either, it's in the Account tab if I remember correctly.

Thanks for your reply.

We are fully aware of the abilities of AD and use this function extensively, however, this is a special case because of the demands of the special software we are using we have had to apply a more relaxed policy to this machine with a special user ID. However when students wish to save work in their personal folders they need to be able to map a drive to their personal space.

As I said to Varian, I need to understand how the DriveMapAdd function actually works.

Thanks again

Secman

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0