Sign in to follow this  
Followers 0
kiboost

Script access to network share drive [solved]

2 posts in this topic

#1 ·  Posted (edited)

Hi,

I have some machines with network shared drives, and am writing a script that put shortcuts in a tray menu (and other things, but that's the part here)

Here is my script :

$Tray_mydir = TrayCreateItem("mydir")
TrayItemSetOnEvent(-1,"Tray_mydir")


Func Tray_mydir()
    ShellExecute("explorer", ***mydir***)
EndFunc

in function code, if I put mydir as an unc path \\myserver\dir it works, but if I put W:\mydir which is a network shared drive it doesn't work, it put me on mydocuments. It works as administrator only. Shared drivers are accessibles and mapped in explorer as users allways go there. The script (in task manager) execute itself with the same account name, but it doesn't access it. No problem for locals drives or unc path.

So how can I have this working with network shared drives letters ?

Thks

Kib

Edited by kiboost

Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

Share this post


Link to post
Share on other sites



Like too often, we spend time searching a solution, finnally we decide to ask, and a few minutes later, we find the solution !!

Run("explorer.exe"&$mydir)


Win7 pro x64. scripts compiled to x64. - Autoit v3.3.6.1 | Scite 1.79

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