Win32 error: The directory name is invalid.

KB ID:
1046
Product:
Veeam Backup & Replication
Version:
5.x, 6.x
Published:
Last Modified:
2013-04-29

Challenge

VSS fails with the following error:

Starting guest agent
Cannot upload guest agent's files to the administrative share [\\xx.xx.xx.xx\ADMIN$].
Cannot create an agent's configuration file. Target folder:
[\\xx.xx.xx.xx\ADMIN$\VeeamVssSupport].
Cannot get GetTempFileName in CLocalTempFileHolder::CLocalTempFileHolder
Win32 error:The directory name is invalid.
Code: 267
Freezing guest operating system
Veeam Guest Agent is not started
 
Even if a domain admin account is used and the "admin$" share is accessible from the Veeam Backup server, the VSS agent still cannot be installed in the guest OS. The following error occurs:

[timestamp] Error  Cannot install agent.
[timestamp] Error  Cannot upload guest agent's files to the administrative share  [\\xx.xx.xxx.x\ADMIN$].
[timestamp] Error  Cannot create an agent's configuration file. Target folder: [\\xx.xx.xxx.x\ADMIN$\VeeamVssSupport].
[timestamp] Error  Cannot get GetTempFileName in CLocalTempFileHolder::CLocalTempFileHolder
[timestamp] Error  Win32 error:The directory name is invalid.
[timestamp] Error   Code: 267 

Cause

The %TEMP% or %TMP% folder is not accessible on the server you need to back up.

Solution

To resolve the issue, follow the next steps:

  1. Log on to the server with VSS credentials and run the SET command.

  2. Find lines like the following ones:
    TEMP=C:\DOCUME~1\USER\LOCALS~1\Temp
    TMP=C:\DOCUME~1\USER\LOCALS~1\Temp

  3. Make sure the specified folder exists and that you can perform read/write operations on it. 

In addition to user variables, you need to check system variables as well:

  1. Open System Properties, go to the Advanced tab.

  2. Click the Environment Variables button.

  3. Find the System variables section and make sure the TEMP directory name indicated here is valid.

User-added image

Rate the quality of this KB article: 
4.1 out of 5 based on 7 ratings

Couldn't find what you were looking for?

Below you can submit an idea for a new knowledge base article.

Report a typo on this page:

Please select a spelling error or a typo on this page with your mouse and press CTRL + Enter to report this mistake to us. Thank you!

Spelling error in text:

Submit