Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Using script/FSO to write files with authentication

Reply
 
Old 08-31-2009   #1 (permalink)
TDM


 
 

Using script/FSO to write files with authentication


Hello All,

I have a somewhat odd problem. I have a script that I use to query our
company LDAP server and additional databases. I then take this data
and create html web pages on a file share. Not rocket science by any
means, but the problem is that I have moved my system to a new
Domain(Domain B) and the file share that I write the web pages to is in another
Domain(Domain A). When I use the OpenTextFile method, I get an error :

"There are currently no logon servers available to service the logon request"

When you think about it, this is likely what should happen. But I need
a way around this. I will need to leave my system in Domain B and still
write to files in Domain A. I tried mapping the share that the script writes
to, and I can read/write to the share no problem. But I run the script,
and it still fails.

I tried useing "runas" to run the script as a user with credentials in
Domain A but no matter what I try, I get a "Logon Failure: Unknown
user name or bad password", and to make matters worse, "runas"
seems to only like .exe files. When I try to run the script with
Domain B cedentials, I get the error "xxxxx.vbs is not a valid Win32
application".

Does anyone know how I can get around this issue ? Will ADODB.Stream
provide the answer ? Is there any way to "authenticate" the FileSystemObject
so that it can write to the share in Domain A from Domain B ?

Thanks in advance for any help.



My System SpecsSystem Spec
Old 09-01-2009   #2 (permalink)
TDM


 
 

Re: Using script/FSO to write files with authentication

Ever feel dumber than a Stump ? Well I should over this post.
The solution was right before my eyes. Instead of using the UNC
in my script to get to the share, I used the mapped drive instead.
Boy do I feel stupid.

TDM


"TDM" <rpuffd@xxxxxx> wrote in message
news:%234IHw2oKKHA.3632@xxxxxx
Quote:

>
> Hello All,
>
> I have a somewhat odd problem. I have a script that I use to query our
> company LDAP server and additional databases. I then take this data
> and create html web pages on a file share. Not rocket science by any
> means, but the problem is that I have moved my system to a new
> Domain(Domain B) and the file share that I write the web pages to is in
> another
> Domain(Domain A). When I use the OpenTextFile method, I get an error :
>
> "There are currently no logon servers available to service the logon request"
>
> When you think about it, this is likely what should happen. But I need
> a way around this. I will need to leave my system in Domain B and still
> write to files in Domain A. I tried mapping the share that the script writes
> to, and I can read/write to the share no problem. But I run the script,
> and it still fails.
>
> I tried useing "runas" to run the script as a user with credentials in
> Domain A but no matter what I try, I get a "Logon Failure: Unknown
> user name or bad password", and to make matters worse, "runas"
> seems to only like .exe files. When I try to run the script with
> Domain B cedentials, I get the error "xxxxx.vbs is not a valid Win32
> application".
>
> Does anyone know how I can get around this issue ? Will ADODB.Stream
> provide the answer ? Is there any way to "authenticate" the FileSystemObject
> so that it can write to the share in Domain A from Domain B ?
>
> Thanks in advance for any help.
>

My System SpecsSystem Spec
Old 09-01-2009   #3 (permalink)
Pegasus [MVP]


 
 

Re: Using script/FSO to write files with authentication


"TDM" <rpuffd@xxxxxx> wrote in message
news:%23NpdIhyKKHA.1252@xxxxxx
Quote:

> Ever feel dumber than a Stump ? Well I should over this post.
> The solution was right before my eyes. Instead of using the UNC
> in my script to get to the share, I used the mapped drive instead.
> Boy do I feel stupid.
>
> TDM
If you had posted your script then someone would most likely have pointed
out the error.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Script to test authentication on Windows local accounts? PowerShell
How to write a script/macro VB Script
How to write a script to process it as a task? PowerShell
Group Policy - I need to write a script to run on shutdown Vista security
'Write-object' is not recognized as a cmdlet, function, operable program, or script file PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46