|
-
Dec 31st, 2020, 07:05 AM
#1
shellexecute versus opening from explorer
Code:
If Not autorunning Then
ShellExecute 0, "Open", App.Path & "\autosend.exe", "", "", 0
windows 10 x64
when i run the above shellexcute, the file appears in the details section of task manager, but not in the background processes, i also tried using shell in place of shell execute
if i change the UAC virtualization to disabled in task manager , then the program will work
when i double click in explorer or from a startup shortcut (the norm) the process starts as a background process and is also in the details tab, all works correctly
i tried adding a manifest to the exe,
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="IsUserAdmin"
type="win32"/>
<description>Description of your application</description>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
this changed things, but not for the better, now when using shell the UAC virtualization, shows as disabled, but the process does not show in background processes
when started with shellexecute UAC virtulization shows as enabled and changing it now does nothing to make the process work
quite possibly the manifest is incorrect, i am not well practiced with manifests, there was no manifest prior to adding the above
in case it has any bearing the application has no user interface, just runs as a background process, i can restart the program, from a shortcut, but not programmically
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|