Sign in to follow this  
Followers 0
aef03

@ScriptDir returns full UNC on Mapped Drive

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Deleted post

Edited by aef03

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