Home

How to interact with OneDrive sync app from a background service

%3CLINGO-SUB%20id%3D%22lingo-sub-137961%22%20slang%3D%22en-US%22%3EHow%20to%20interact%20with%20OneDrive%20sync%20app%20from%20a%20background%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-137961%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22ipsType_normal%20ipsType_richText%20ipsContained%22%20style%3D%22box-sizing%3A%20border-box%3B%20display%3A%20table%3B%20table-layout%3A%20fixed%3B%20width%3A%20816.364px%3B%20word-wrap%3A%20break-word%3B%20overflow-wrap%3A%20break-word%3B%20line-height%3A%201.6%3B%20color%3A%20%23272a34%3B%20font-size%3A%2014px%3B%20margin-bottom%3A%2020px%3B%20overflow-x%3A%20auto%3B%20overflow-y%3A%20hidden%3B%20margin-top%3A%200px%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%22%20data-role%3D%22commentContent%22%20data-controller%3D%22core.front.core.lightboxedImages%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin-top%3A%200px%3B%22%3EWhen%20we%20run%20our%20exe%20from%20any%20service%20or%20through%20any%20background%20process%2C%20it%20won't%20interact%20with%20the%20applications%20running%20in%20the%20foreground%2C%20I%20mean%20launched%20when%20the%20user%20is%20logged%20in%20or%20in%20GUI%20mode.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3ELet's%20say%2C%20the%20onedrive%20sync%20app%20can't%20be%20detected%20from%20the%20exe%20we%20created%20and%20running%20it%20in%20background.%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23272a34%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%20display%3A%20inline%20!important%3B%20float%3A%20none%3B%22%3EI%20tried%20both%20options%20below.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23272a34%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%20display%3A%20inline%20!important%3B%20float%3A%20none%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20585px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F25762iB84D168302F64C08%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%221111.PNG.64aa7aa06749cc7d63143e050af6dbf6.PNG%22%20title%3D%221111.PNG.64aa7aa06749cc7d63143e050af6dbf6.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23272a34%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%20display%3A%20inline%20!important%3B%20float%3A%20none%3B%22%3EAny%20Idea%20how%20to%20interact%20with%20foreground%20processes.%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%20color%3A%20%23272a34%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%22%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-137961%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-137962%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20interact%20with%20OneDrive%20sync%20app%20from%20a%20background%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-137962%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22ipsType_normal%20ipsType_richText%20ipsContained%22%20style%3D%22box-sizing%3A%20border-box%3B%20display%3A%20table%3B%20table-layout%3A%20fixed%3B%20width%3A%20816.364px%3B%20word-wrap%3A%20break-word%3B%20overflow-wrap%3A%20break-word%3B%20line-height%3A%201.6%3B%20color%3A%20%23272a34%3B%20font-size%3A%2014px%3B%20margin-bottom%3A%2020px%3B%20overflow-x%3A%20auto%3B%20overflow-y%3A%20hidden%3B%20margin-top%3A%200px%3B%20font-family%3A%20'Open%20Sans'%2C%20sans-serif%3B%20font-style%3A%20normal%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20font-weight%3A%20normal%3B%20letter-spacing%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%22%20data-role%3D%22commentContent%22%20data-controller%3D%22core.front.core.lightboxedImages%22%3E%0A%3CP%20style%3D%22box-sizing%3A%20border-box%3B%20margin-top%3A%200px%3B%20margin-bottom%3A%200px%3B%22%3EPresent%20as%20a%20temporary%20solution%20I%20kept%20my%20exe%20in%20the%20windows%20startup.%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3EAs%20the%20startup%20won't%20work%20till%20the%20user%20is%20logged%20in%2C%20I%20have%20enabled%20AutoLogon.%3CBR%20style%3D%22box-sizing%3A%20border-box%3B%22%20%2F%3EBut%20AutoLogon%20is%20not%20acceptable%20with%20the%20security%20team%2C%20so%20I%20need%20to%20search%20for%20other%20solution.%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E
Highlighted
Uday Kiran Reddy
Occasional Contributor

When we run our exe from any service or through any background process, it won't interact with the applications running in the foreground, I mean launched when the user is logged in or in GUI mode.

 

Let's say, the onedrive sync app can't be detected from the exe we created and running it in background.

 

I tried both options below.

 

1111.PNG.64aa7aa06749cc7d63143e050af6dbf6.PNG

Any Idea how to interact with foreground processes.

1 Reply

Present as a temporary solution I kept my exe in the windows startup.
As the startup won't work till the user is logged in, I have enabled AutoLogon.
But AutoLogon is not acceptable with the security team, so I need to search for other solution.