1. Directory.GetCurrentDirectory 方法
Public Shared Function GetCurrentDirectory() As String
2.保存到注册表比较好,不容易被损坏,现在流行的趋势也是保存到注册表而不是保存到ini文件萨
Registry Functions
The following functions are used with the registry.
Function Description
RegCloseKey Releases a handle to the specified registry key.
RegConnectRegistry Establishes a connection to a predefined registry handle on another computer.
RegCreateKeyEx Creates the specified registry key.
RegDeleteKey Deletes a subkey.
RegDeleteValue Removes a named value from the specified registry key.
RegDisablePredefinedCache Disables the predefined registry handle table of HKEY_CURRENT_USER for the specified process.
RegEnumKeyEx Enumerates subkeys of the specified open registry key.
RegEnumValue Enumerates the values for the specified open registry key.
RegFlushKey Writes all the attributes of the specified open registry key into the registry.
RegGetKeySecurity Retrieves a copy of the security descriptor protecting the specified open registry key.
RegLoadKey Creates a subkey under HKEY_USERS or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey.
RegNotifyChangeKeyValue Notifies the caller about changes to the attributes or contents of a specified registry key.
RegOpenCurrentUser Retrieves a handle to the HKEY_CURRENT_USER key for the user the current thread is impersonating.
RegOpenKeyEx Opens the specified registry key.
RegOpenUserClassesRoot Retrieves a handle to the HKEY_CLASSES_ROOT key for the specified user.
RegOverridePredefKey Maps a predefined registry key to a specified registry key.
RegQueryInfoKey Retrieves information about the specified registry key.
RegQueryMultipleValues Retrieves the type and data for a list of value names associated with an open registry key.
RegQueryValueEx Retrieves the type and data for a specified value name associated with an open registry key.
RegReplaceKey Replaces the file backing a registry key and all its subkeys with another file.
RegRestoreKey Reads the registry information in a specified file and copies it over the specified key.
RegSaveKey Saves the specified key and all of its subkeys and values to a new file.
RegSetKeySecurity Sets the security of an open registry key.
RegSetValueEx Sets the data and type of a specified value under a registry key.
RegUnLoadKey Unloads the specified registry key and its subkeys from the registry.