Hello and tnx for your answer!
I will give some more information.
The code is part of an addin (called DataStandard) for Autodesk Inventor (3D CAD software) and Vault (Datamanagement software). With this addin a dialog pops up when saving a file for the first time. See this Example.
This DataStandard exists of several XAML files for the dialogs and ps1 files for the logic.
In the XMLfile I have made a button for selecting a folder for saving the file. This button points to a simple ps1 file for showing the FolderDialog. This ps1 file has this code:
$FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
$FolderBrowser.RootFolder = “MyComputer”
$FolderBrowser.SelectedPath = “C:\VaultWerkmap\Lightronics”
$FolderBrowser.ShowNewFolderButton = “true”
$Prop[‘Folder’].Value = $FolderBrowser.SelectedPath.Replace(“C:\VaultWerkmap\Lightronics”,"")
Buteverytime I use this DataStandard dialog, the folder dialog starts at the same folder. I have tried with and without the Rootfolder and SelectedPath lines.