I am having 
`<Property Id="MsiDirectory">[SourceDir]\\</Property>` in Wix

In my custom action 

```
string msiDirectory = session["MsiDirectory"];
session.Log(" msiDirectory: {0}", msiDirectory);

msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                session.Log(" (2): {0}", msiDirectory);

                msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                session.Log(" (1): {0}", msiDirectory);

                msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                session.Log(" (4): {0}", msiDirectory);

```

The results are: 

> 
> msiDirectory:C:\temp\\ (2): C:\temp\ (1): C:\temp\ (4): [SourceDir
> 
> 
> 

Is there a way to remove the \ in C:\temp\, so that I end with C:\temp only?

---

Following the comments and suggestions, 

I changed 

```
<Property Id="MsiDirectory">[SourceDir]\\</Property> to 
<Property Id="MsiDirectory">[SourceDir]</Property>

string msiDirectory = session["MsiDirectory"];
    session.Log(" msiDirectory: {0}", msiDirectory);

    msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                    session.Log(" (2): {0}", msiDirectory);

                    msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                    session.Log(" (1): {0}", msiDirectory);

                    msiDirectory = msiDirectory.Remove(msiDirectory.Length - 1);
                    session.Log(" (4): {0}", msiDirectory);

```

> 
> msiDirectory:C:\temp\ (2): [SourceDir (1): [SourceDi (4): [SourceD
> 
> 
> 

```
session.Log(" msiDirectory: {0}", msiDirectory.TrimEnd('\\'));

```

gives c:\temp\

I just want to remove the last \ in C:\temp\