Link to home
Start Free TrialLog in
Avatar of ddhanota
ddhanota

asked on

permission denied Microsoft VBScript runtime error '800a0046

Unable to execute a Wscript shell command to sort a file. Receive the message "permission denied Microsoft VBScript runtime error '800a0046" It worked in Windows 2000 server but not in 2003.
DIM sortLine, sortFile, server_shell, strTempFile
  set server_shell = server.CreateObject("Wscript.Shell")
  sortFile = DefPath & "XXXXrent" & replace(stmntDt,"/","") & ".txt"
   sortLine = "sort " & txtfile & " /O " & sortFile 
   strTempFile = "%comspec% /c " & sortLine
   server_shell.Run strTempFile, 0, True

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial