Jump to content

_FileWriteLog


Recommended Posts

Hi

I 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 path

Here 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 UNC

Any 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

  • Moderators

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 by big_daddy
Link to comment
Share on other sites

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

  • Moderators

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

Not sure why, it works both ways for me.
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...