shornw Posted June 6, 2006 Share Posted June 6, 2006 HiI am having a problem writing a logfile in a remote shared folder. It works fine if I write it to a local drive, also works if I map the drive and then write the log but I dont want to have to do that because its going in a logon script for over 1500 users so what i want I want to do is write it to a UNC pathHere is the problem bit of the script:$md = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" , "personal")if $vmd ="L:\My Docments" then exit#include <file.au3>_FileWriteLog("Y:\users.txt" , @UserName)It really is a simple matter but I cant find anything in the help files to say that you cant write to a UNCAny ideas guys?????Thanks [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 6, 2006 Moderators Share Posted June 6, 2006 (edited) There shouldn't be any problem writing to a remote share like so "\\server\share\". Give an example of what you were trying but failed. This works for me: #include <File.au3> $sLogPath = "\\patch\install\logs\test.log" _FileWriteLog($sLogPath, "Test") Edited June 6, 2006 by big_daddy Link to comment Share on other sites More sharing options...
shornw Posted June 6, 2006 Author Share Posted June 6, 2006 Hi Big Daddy Thanks for this...it seems to work fine. I meant to copy the problem but instead pasted without editing.....sorry DOH!!! the problem line was: #include <file.au3> _FileWriteLog("\\MyServer\Myshare\logfile.log" , @Username) It will write locally or to a mapped drive but not to a UNC. Your pathline works fine but any idea why this doesnt?? Thanks again for looking and your time [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 6, 2006 Moderators Share Posted June 6, 2006 Hi Big DaddyThanks for this...it seems to work fine.I meant to copy the problem but instead pasted without editing.....sorry DOH!!!the problem line was:#include <file.au3>_FileWriteLog("\\MyServer\Myshare\logfile.log" , @Username)It will write locally or to a mapped drive but not to a UNC. Your pathline works fine but any idea why this doesnt??Thanks again for looking and your timeNot sure why, it works both ways for me. 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