bruce1453 Posted June 20, 2007 Share Posted June 20, 2007 I'm trying to create a Login client for our Windows users. I can get the compiled script to run in XP but am having trouble in Vista. Below is a snippet of code from the script. The trouble I am having is with the iniwrite and DriveMapAdd functions. The compiled program resides in the Program Files folder, when it is first run if the ini doesn't exist it is created, then the drive mapping commands occur. If I run the code below the ini never gets created, but the drive mappings are successful. If I try including "#RequireAdmin" at the beginning of the script the ini file does get created, but I have problems with the drive mappings. The mapped drives never show up under My Computer. In my main program I check the error codes of the mapping commands and it reports the drive was successfully mapped. I would prefer not to have to use #RequireAdmin in my program since it always prompts the user for permission to run. My only thought is that there is a problem with my program creating the ini file in the Program Files directory which is a protected folder in Vista. Any assistance you can provide is greatly appreciated. Thanks, Bruce #include <GUIConstants.au3> #include <inet.au3> #include <Array.au3> If FileExists("wiredlogin.ini") Then MsgBox(4096, "", "wiredlogin.ini exists.") Else MsgBox(4096,"", "wiredlogin.ini does not exist.") IniWrite("wiredlogin.ini", "USERID", "userid", "") IniWrite("wiredlogin.ini", "H Drive Mapped to", "drivemapped", "H:") IniWrite("wiredlogin.ini", "Launch on Startup", "launch", "yes") EndIf DriveMapAdd("y:", "\\servername\apps", 0, "loginname", "password") DriveMapAdd("x:", "\\servername\apps", 0, "loginname", "password") DriveMapAdd("z:", "\\servername\apps", 0, "loginname", "password") Link to comment Share on other sites More sharing options...
DW1 Posted June 20, 2007 Share Posted June 20, 2007 (edited) I thought AutoIt was not compatible with Vista hmmmm, must just be ... sorta.. compatible LOL Edited June 20, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
Toady Posted June 20, 2007 Share Posted June 20, 2007 http://www.autoitscript.com/forum/index.ph...mp;#entry349574 www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now