it.megocollector.com

  • Tips and Tricks
  • Linux
  • Scripts
    • AutoIT Scripts
    • INNO Scripts
  • WordPress
  • Misc
  • Software Packaging
  • Windows
  • Media

Automate Network Drive Map at Boot not login

September 8, 2007

Automate Network Drive Map at Boot not login

Although this is a nice writeup. It does not work. When I originally created this process, I tested several times with success. Somewhere over time, critical updates and service packs broke this process. I will leave this article as is as it may help in some other design.

Support
AutoIT v3 (Freeware) Download: http://www.autoitscript.com/autoit3/downloads.php

Purpose
Map a drive and pass appropriate credentials without compromising security. Use AutoIT, a script language, to compile into executable. Run the executable through a Scheduled Task.

Security
AutoIT offers some security, and it is better than most. Also note that there is a decompiler that does exist for many versions of AutoIT, however is quite rare and with little visibility. AutoIT also appears to operate in memory rather than writing to temp folder unencrypted like many other script compilers.

Testing
After a couple of hours of testing, the conclusion is that whatever account that accesses the Scheduled task, it should have administrator rights, either local or domain. I tested with local administrator account to launch the scheduled task, which will launch the executable with success. The test not only mapped the drive, but to copy a file to that mapped drive. The test included rebooting the workstation and checking the network drive for the copied file. The test was a success, so I removed that one line of code to copy the file.

Solution
Note: The solution assumes that AutoIT is installed. Install the latest version of AutoIT v3 by following the setup instructions.

The Script

  • Launch SciTE4AutoIT3 (Start -> All Programs -> AutoIT v3 -> SciTE Script Editor)
  • Type in the following lines in the script editor
; Map X drive to \\myserver2\stuff2 using the user "username" from "domainx" with password "userpassword"
DriveMapAdd("h:", "\\nasserver\share", 0, "domain\username", "password") 
  • Save file
  • Create an executable (Tools -> compile) Note: You should now have an EXE.

The Task

  • Create a Scheduled Task (Control Panel -> Scheduled Tasks)
  • Click on Add Scheduled Task and the Scheduled Task Wizard window will appear.
  • Click Next -> Browse? (to your EXE)
  • Select When my computer starts , Next
  • Use an account with either local or domain administrator rights (to execute your executable)
  • Next
  • Select Open advanced properties … , Finish

The Schedule

  • Go to Schedule Tab, Select Multiple Schedules
  • New, 2. Run at user logon, apply
  • Go to Settings Tab, uncheck all, apply
  • Done
Tagged: drive maploginnetworkscript

Post navigation

««Verizon LG VX8300 incomplete MP3 list
EPSON Print CD missing PICSDK.DLL»»

About

Welcome to my world! Here you may find bits and pieces of information that I have found useful or have stumbled upon myself. It is essentially my knowledge base. If anyone finds anything of interest or useful, that would be a plus.

Categories

  • Linux (278)
  • macOS (2)
  • Media (11)
  • Misc (38)
  • Raspberry Pi (3)
  • Scripts (183)
    • AutoIT Scripts (19)
    • INNO Scripts (9)
  • Software Packaging (19)
  • Tips and Tricks (415)
  • Windows (19)
  • Wordpress (44)

Popular

  • i8042prt Event ID 7026 The following boot-start or system-start driver(s) failed to load (114,643)
  • Adobe Reader 9 or Adobe Acrobat 9 can not view PDF files in a Web Browser error and fix (78,133)
  • EPSON Scan jpeg plug-in unable to write to file error and fix (53,984)
  • #1045 – Access denied for user ‘root’@’localhost’ (using password: NO) fix (49,123)
  • Convert mAh to mWh and mWh to mAh for Notebook Laptop Batteries (48,277)
  • Install JDK (Java Development Kit) on a RedHat Linux System (46,129)
  • How to share a folder without password in Windows 10 home network (42,726)
  • Create a 7zip Self Extractor (7zS.sfx or 7z.sfx) (41,575)
  • eHome Infrared Receiver not recognized by Windows XP (31,641)
  • Microsoft Word Accept and Reject Change Options Greyed Out (28,158)
  • Access Red Hat Enterprise Linux 5 with XManager Remote Control (27,319)
  • Setup JBoss on Red Hat Enterprise Linux 5 (RHEL5) Server (23,724)
  • PHP 5.3.2 with IIS6 and FastCGI Installation Guide – Updated (21,983)
  • Unlock the McAfee VirusScan Enterprise 8.5i User Interface (21,458)
  • Internet Explorer 7 Gold RunOnce Removal (20,815)
  • Windows XP SESSION3_INITIALIZATION_FAILED stop error with 0x0000006F fix (19,701)
  • How to automate Selenium scripts (19,272)
  • atibtmon.exe Runtime Error! [Resolved] (19,191)
  • SVCHOST.EXE Application Error 0XC00000FD 0X76A9F4F9 100% CPU Resolved! (19,139)
  • How to enable and configure Java JRE to work in Firefox in CentOS 5 and RHEL 5 Linux (18,057)
  • How to install the Intel 82845G Graphics driver on Microsoft Vista (16,957)
  • Remove WGA Notifications with AutoIT (16,282)
  • How to Setup IIS6 with the Tomcat 5 Connector – Step by Step Guide. (16,068)
  • Disable firewall on Red Hat Enterprise Linux (RHEL) Server (15,766)
  • Internet Explorer 8 Beta RunOnce Removal (15,021)
  • Use netstat in Linux to determine port conflicts (14,451)
  • Setup JBoss on Ubuntu 8.0.4 LTS Server Edition (14,404)
  • How to Sort Text Using Notepad++ (14,310)
  • EPSON Print CD missing PICSDK.DLL (13,773)
  • DOS Batch – Find and Replace all occurrences of a string with another string (13,313)
  • dnf Module yaml error: Unexpected key in data (13,280)
  • Connect to VNCServer on Red Hat Enterprise Linux (12,725)
  • Proxmox Backup Server (PBS) with iSCSI [Resolved] (12,555)
  • Proxmox Backup Server (PBS) with NFS [Resolved] (12,269)
  • Microsoft Office 2003 missing SKU011.CAB (12,239)
  • Autorun JBoss on Red Hat Enterprise Linux 5 (RHEL5) Server (12,110)
  • Factory reset the Linksys PAP2 Phone Adapter for Vonage (11,636)
  • Unlock Western Digital WD80EB Drives (10,612)
  • Create a Bootable Windows XP SP3 Integrated with Post-SP3 fixes CD (10,396)
  • RDP into CentOS 7 with XRDP (9,986)
  • Vsftpd FTP Server With Virtual Users (CentOS 7) (9,624)
  • Setup JBoss on Ubuntu 8.1.0 Server Edition (9,469)
  • Install and use ncsd for name service caching (9,060)
  • Innounp, Inno Setup Unpacker 0.23 (Build: 080318) supports INNO Setup 5.2.3 (8,928)
  • Foxit Reader: Invert All Colors of Text (8,906)
  • Add Root Certificates to a CentOS Linux Server (8,591)
  • Hot to enable a Symantec Antivirus LiveUpdate that is grayed out (8,537)
  • Create a service for JIRA on CentOS 5 or RHEL 5 (8,523)
  • Event ID 1091 Group Policy … failed to log RSOP. (8,293)
  • Install Tomcat 5.5.28 on RHEL5 / CentOS5 (8,093)
Copyright © 2006-2025 it.megocollector.com