I'm using a windows API call to Create a Process in a simple account as an administrator using CreateProcessWithLogonW 

```
createprocesswithLogonW('admin',
                        nil,
                        'Pa$$w0rd',
                        LOGON_WITH_PROFILE,
                        'cmd.exe',
                        nil,
                        0,
                        nil,
                        nil,
                        Si,
                        Pi);

```

but sometimes it returns 

> 
> Error 5 Access denied
> 
> 
> 

, and when it does not , it does not run it as administrator even if that account is an administrator