FileSave dialog comes up with Default User settings when .exe is launched from a service using CreateProcess()
-
Hi, I have an exe being launching from a service using CreateProcess() call. As you know that the service is run in SYSTEM' (Default User') context and not in logged user' context. In my .exe, I have File Save option. When the FIle Save dialog comes up, it shows the desktop of the Default User and not of the user who has logged in. I want the File Save dialog to come up with the logged on User' profile (Desktop, My Documents, History, etc). Has anybody faced this problem earlier? Please let me know if you have faced this problem before and if you have solved the defect or if you have a workaround for this. Thanks. Praveen
-
Hi, I have an exe being launching from a service using CreateProcess() call. As you know that the service is run in SYSTEM' (Default User') context and not in logged user' context. In my .exe, I have File Save option. When the FIle Save dialog comes up, it shows the desktop of the Default User and not of the user who has logged in. I want the File Save dialog to come up with the logged on User' profile (Desktop, My Documents, History, etc). Has anybody faced this problem earlier? Please let me know if you have faced this problem before and if you have solved the defect or if you have a workaround for this. Thanks. Praveen
Use CreateProcessAsUser Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
Use CreateProcessAsUser Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
thanks for the quick reply. But the problem here is that I do not have know who has logged in and what is his password. For CreateProcessWithLogonW, we need the username and the password. I thought of using CreateProcessAsUser. But there also I do not know how to get the token that represents the user. If you could help me in giving some piece of code, I would be greatful. Thanks again! Praveen