mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 17:32:27 +08:00 
			
		
		
		
	Get the environment variable correctly.
This commit is contained in:
		| @@ -160,7 +160,9 @@ void StartCmder(std::wstring path, bool is_single_mode) | |||||||
| 	} | 	} | ||||||
| 	else | 	else | ||||||
| 	{ | 	{ | ||||||
| 		SetEnvironmentVariable(L"CMDER_START", GetEnvironmentVariable(L"USER_PROFILE")); | 		static char buff[MAX_PATH]; | ||||||
|  | 		GetEnvironmentVariable(L"USER_PROFILE", buff, MAX_PATH); | ||||||
|  | 		SetEnvironmentVariable(L"CMDER_START", buff); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	STARTUPINFO si = { 0 }; | 	STARTUPINFO si = { 0 }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user