Can't create file 'c:\WINDOWS\system32\null Windows 10

Advertisement

popashack
Joined:
Posts:
3
Location:
Florida

Can't create file 'c:\WINDOWS\system32\null Windows 10

Can't create file 'c:\WINDOWS\system32\null Windows 10
System Error. Code: 5.
Access is denied
I have everything working on a Windows 10 Pro machine, and this is a Windows 10 Home installation. I am running a script that ran on my other machine after creating a key and using all the same folder and txt file.

This occurs at the Key Request below is the script resulting
In scripting, you should use a -hostkey switch to configure the expected host key.
(Y)es, (N)o, C(a)ncel (9 s), (C)opy Key, (P)aste key: No
Can't create file 'C:\WINDOWS\system32\null'.
System Error.  Code: 5.
Access is denied
Authentication failed.
Unknown command '@copy'.
Unknown command '@copy'.
No session.
Everything seems to work on the GUI version, but it does not copy the file to my Windows box from the SFTP server.

Thanks.
Best Regards,

Carl

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Can't create file 'c:\WINDOWS\system32\null Windows 10

I guess that your immediate problem is that you have used /ini=null instead of /ini=nul.
But it also seems that you have several other problems.
See https://winscp.net/eng/docs/scripting#hostkey
If you need further help, please attach a full session log file.

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Guest

Re: Can't create file 'c:\WINDOWS\system32\null Windows 10

Martin,

I appreciate your response and will read through your suggestions. I have one machine working perfectly, and I copied the script on the new machine, I also got the hostkey, so I am really doubting this will help. The first machine worked without the hostkey.

The log file should be helpful and I will read through everything again.
/log=C:\path\to\winscp.log.

Reply with quote

popashack
Joined:
Posts:
3
Location:
Florida

Re: Can't create file 'c:\WINDOWS\system32\null Windows 10

Martin,

This product does work on Windows 10 Home, right? If so.

Here is the end of my log. You commented about a .ini file. I have not modified one, and have not seen one.

End of Log below
< 2022-03-21 11:59:49.984 Script: Authenticating...
. 2022-03-21 11:59:49.986 Host key matches configured key fingerprint
. 2022-03-21 11:59:49.989 Attempt to close connection due to fatal exception:
* 2022-03-21 11:59:49.989 Authentication failed.
* 2022-03-21 11:59:49.989 (EOSExtException) Can't create file 'C:\Windows\System32\null'.
* 2022-03-21 11:59:49.989 System Error.  Code: 5.
* 2022-03-21 11:59:49.990 Access is denied
. 2022-03-21 11:59:49.990 Closing connection.
< 2022-03-21 11:59:49.992 Script: Can't create file 'C:\Windows\System32\null'.
< 2022-03-21 11:59:49.992 System Error.  Code: 5.
 
< 2022-03-21 11:59:49.992 Access is denied
 
< 2022-03-21 11:59:49.992 Authentication failed.
Does this tell you anything?

Thanks.
Carl

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum