Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


script permission error 800A0046

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2508
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script permission error 800A0046
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 script permission error 800A0046 - 3/29/2005 9:21:37 AM   
  kracksmith

 

Posts: 198
Score: 0
Joined: 2/24/2005
From:
Status: offline
My two rem'd out groups works perfectly. but when I add a 3rd group it gives me a permission error with error code #800A0046

What is causing this:

Option Explicit
Dim network, fso
Set network = CreateObject("WScript.Network")
Set fso = CreateObject("Scripting.FileSystemObject")
'Const contract_group = "contrdb"
'Const design_group = "designdb"
Const datacad_group = "datacad"

'If isMemberOf(contract_group) Then
'WScript.Echo "Contract database has been updated, Thank you"
'fso.CopyFile "\\Production\N_Drive\Public\Database Programs\ContrDB\ContrPGM.mde", "C:\Program Files\contrDB\"
'end if

'If isMemberOf(design_group) Then
'WScript.Echo "Design database has been updated, Thank you"
'fso.CopyFile "\\Production\N_Drive\Public\Database Programs\DesignDB\DESProg.mde", "C:\Program Files\designDB\"
'end If

If isMemberOf(datacad_group) Then
WScript.Echo "DataCAD updates has been pushed, Thank you"
fso.CopyFile "\\Production\J_Drive\Revision\Update\DCAD11\datacad11.06.00.exe", "C:\Program Files\DataCAD"
end If

Function isMemberOf(ByVal group)
Dim user, found, temp
found = False
Set user = GetObject("WinNT://" & CreateObject("WScript.Network").UserDomain & "/" & CreateObject("WScript.Network").UserName & ",user")
For Each temp In user.Groups
If UCase(temp.Name) = UCase(group) Then
found = True
Exit For
End If
Next
isMemberOf = found
End Function
 
 
Post #: 1
 
 Re: script permission error 800A0046 - 3/29/2005 9:37:32 AM   
  alienprotein

 

Posts: 44
Score: 0
Joined: 2/23/2005
From: USA
Status: offline
If the VBS returns a "Permission Denied" error (error code 800a0046) while saving a job, but the job contents are saved correctly, it is due to misconfigured permissions


Error: 0x80041003 refers to access denied, which suggests that you don't have the rights to access a specified folder you are attempting to write to.

Here is a thread I found that might help you with this issue.
http://www.experts-exchange.com/Security/Win_Security/Q_20989261.html

Here is the MSDN information on WMI Error Constants
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_error_constants.asp

(in reply to kracksmith)
 
 
Post #: 2
 
 Re: script permission error 800A0046 - 3/29/2005 10:49:06 AM   
  kracksmith

 

Posts: 198
Score: 0
Joined: 2/24/2005
From:
Status: offline
Thanks for the quick reply.

Hmmm, but how come my 2 other groups works?

I tried a bunch of different ways. I even tried putting "datacad11.06.00.exe" into this path ""\\Production\N_Drive\Public\Database Programs\ContrDB" instead of "\\Production\N_Drive\Public\Database Programs\DesignDB"

Local users have admin rights. Even though it says it's a permission error it doesn't feel like it. All shared folders can be accessed by a domain users with modifying rules.

I'd tried do a research but to no solution so far.

but isn't this kinda wierd my other 2 groups is fine? I set up the 3rd group (datacad) exactly the same.


error code is permission denied, code 800A0046, Line 21, Char 1

(in reply to kracksmith)
 
 
Post #: 3
 
 Re: script permission error 800A0046 - 3/29/2005 11:29:22 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
Assuming users have the appropriate permissions, replace

fso.CopyFile "\\Production\J_Drive\Revision\Update\DCAD11\datacad11.06.00.exe", "C:\Program Files\DataCAD"

with:

fso.CopyFile "\\Production\J_Drive\Revision\Update\DCAD11\datacad11.06.00.exe", "C:\Program Files\DataCAD\"

The trailing "\" was missing.

(in reply to kracksmith)
 
 
Post #: 4
 
 Re: script permission error 800A0046 - 3/30/2005 4:19:29 AM   
  kracksmith

 

Posts: 198
Score: 0
Joined: 2/24/2005
From:
Status: offline
Token man, you are just the BOMB!

I can't believe I missed the tail, no I can believe.

If you are ever in Southern California let me know, lunch is on me.



Kracksmith

(in reply to kracksmith)
 
 
Post #: 5
 
 Re: script permission error 800A0046 - 3/30/2005 5:49:18 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
heh =) I'll remember that :D

and thanks :)

(in reply to kracksmith)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> script permission error 800A0046 Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts