Hello,
i wnat to copy some settings to the current logged user within an application package. The proofing should check if the file is store under %appdata% folder of the users.
I added this as check in Apllication but it failes
Technology Tips and News
Hello,
i wnat to copy some settings to the current logged user within an application package. The proofing should check if the file is store under %appdata% folder of the users.
I added this as check in Apllication but it failes
You can use a scrip insted. Something like this:
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = WScript.CreateObject("WScript.Shell")
If oFSO.FileExists(oShell.ExpandEnvironmentStrings("%AppData%\Roaming\Test\MyApp.txt"))
Then
WScript.StdOut.Write
"The application is installed"
WScript.Quit(0)
Else
WScript.Quit(0)
End If
Hello Jason, hello Torsten,
i am deploying the files for User "Install for user".
The path for detection is resolving corectly when i put into Run field of Windows:
I tested:
1. C:\Users\%username%\AppData\Roaming\XMind\workspace-cathy\.metadata\.plugins\org.eclipse.core.runtime\.settingss
2. %AppData%\Roaming\XMind\workspace-cathy\.metadata\.plugins\org.eclipse.core.runtime\.settings
As far as i understand, when i install (or in this case copy) a file with the "Install for user" option it should use the current logged users folders and not the system folders for installing for device.
BTW the copy job is working with this settings.
Hello Torsten,
the AppEnforce.log closed with the exit code 0. So I think its OK.
here is the AppEnforce.log
+++ Starting Install enforcement for App DT "Install" ApplicationDeliveryType - ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, Revision - 4, ContentPath - C:\Windows\ccmcache\p, Execution Context - User AppEnforce 06.12.2013
12:02:27 1556 (0x0614)
A user is logged on to the system. AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Performing detection of app deployment type Install(ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, revision 4) for user. AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
+++ Application not discovered. [AppDT Id: ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, Revision: 4] AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
App enforcement environment:
Context: User
Command line: "Install.cmd"
Allow user interaction: Yes
UI mode: 0
User token: not null
Session Id: 1
Content path: C:\Windows\ccmcache\p
Working directory: AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Prepared working directory: C:\Windows\ccmcache\p AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Prepared command line: "C:\Windows\ccmcache\p\Install.cmd" AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Executing Command line: "C:\Windows\ccmcache\p\Install.cmd" with user context AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Working directory C:\Windows\ccmcache\p AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Post install behavior is BasedOnExitCode AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Waiting for process 2388 to finish. Timeout = 15 minutes. AppEnforce 06.12.2013 12:02:27 1556 (0x0614)
Process 2388 terminated with exitcode: 0 AppEnforce 06.12.2013 12:02:28 1556 (0x0614)
Looking for exit code 0 in exit codes table... AppEnforce 06.12.2013 12:02:28 1556 (0x0614)
Matched exit code 0 to a Success entry in exit codes table. AppEnforce 06.12.2013 12:02:28 1556 (0x0614)
Performing detection of app deployment type Install(ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, revision 4) for user. AppEnforce 06.12.2013 12:02:28 1556 (0x0614)
+++ Application not discovered. [AppDT Id: ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, Revision: 4] AppEnforce 06.12.2013 12:02:28 1556 (0x0614)
++++++ App enforcement completed (0 seconds) for App DT "Install" [ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf], Revision: 4, User SID: S-1-5-21-1961321678-1726313733-410060929-897942] ++++++ AppEnforce 06.12.2013
12:02:28 1556 (0x0614)
and here the AppDiscovery.log
+++ Did not detect app deployment type Install(ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf, revision 4) for S-1-5-21-1961321678-1726313733-410060929-897942. AppDiscovery 06.12.2013 12:02:24 1556
(0x0614)
ActionType - Install will use Content Id: Content_8feb9ca3-fe79-49d7-af52-43395fee4d58 + Content Version: 1 for AppDT "Install" [ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf], Revision - 4 AppDiscovery 06.12.2013
12:02:26 1556 (0x0614)
ActionType - Install will use Content Id: Content_8feb9ca3-fe79-49d7-af52-43395fee4d58 + Content Version: 1 for AppDT "Install" [ScopeId_E61E93EC-58A1-4297-ACC0-9C9833A789BF/DeploymentType_6856ea9e-feee-4ea2-b5c8-066fed001bdf], Revision - 4 AppDiscovery 06.12.2013
12:02:26 1556 (0x0614)
AppEnforce and AppDiscovery are two different things. AppEnforce reflects the actual installation and has nothing to do with the detection rules.
So, assuming that your detection rule is correct and actually exists, it's possible that this is a timing issue. Discovery rules for detection of the app run immediately at the exit of the process launched by the deployment type. It's possible -- and happens on occasion with different installers -- that the process launched spawns other processes that are still running and performing their work when the initial process exits so that whatever is detected by the detection rules is not actually in place when the detection rule is evaluated during discovery but by the time you go check it is. The only way to address this is to wrap the processes being launched by the deployment type in a script and add a delay at the end to wait for the spawned processes to finish. Given that you are already using a script, you can simply add a delay to it and try again.
Without knowing anything about your script though or what it spawns, this is all a bit of guess work.