Jump to content

@ScriptDir returns full UNC on Mapped Drive


aef03
 Share

Recommended Posts

When I use @ScriptDir it returns the full UNC to the mapped drive I am running from.

@WorkingDir does the same, even though I'm pretty sure a working dir must have a drive letter.

I am running Windows 7 and the drive was already mapped when my program runs. It is running as a compiled EXE.

I discovered this because I have built a function to automatically map a network drive if the EXE is running directly from a UNC. I saw that it was mapping a drive even though I was already running from one.

Is this normal?

Is there a way around it?

Thanks,

D.

Edited by aef03
Link to comment
Share on other sites

Yes, ScriptDir returns the same as WorkingDir, however you can change the workingdir while the program is running, however not the scriptdir in the same way. By default, the workingdir is the same as the scriptdir because it has not been changed :x

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Link to comment
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
 Share

  • Recently Browsing   0 members

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