Run as another user
With an encrypted command line.
Win 2000 & above
contains a command line utility to run a program under a different
user’s permissions AKA Runas.
But this useless command requires the user at the keyboard to
type the password of the ID in the command line.
Runas is a wrapper for the
I have created my own
wrapper that encodes the command line hiding the details.
TrumpGui.exe will take the command options & create the
encoded command line.
This string of characters
encodes the information above. The command line below will run the
The quotes are required!
Any text to the left of
the last quote is passed to the starting program for example.
Will open c:\test.txt in
notepad using the local administrators’ rights.
API runs the command as though it was typed from the command line.
This will create a console window. Which is useful if the
process you are creating writes to STDOUT.
Checking this box will hide the console window but it will be
seen on the screen flashing by.
The scripting language I
uses variables & macros with the characters “%$@” at the
start. So I needed a way to exclude them. You may find other uses
for this. The “ is
always excluded from the encode process.
Because of these exclusions, large command lines may fail to
encode, resulting in this error.
My main use of trump is to
run part of my logon script as a user with administration rights.
But it could be used in shortcuts as well.
The trump command has
little error checking. It
will check to make sure the encode command is correct & will
return an “Error in Encoded Text” if it is not.
It will also return the error of the CreateProcessWithLogonw
API as in “Error: 1326 Logon failure: unknown user name or bad
I have tested Trump in Win
XP, server 2003 r2, Vista 32 and 64, server 2008 64 & Win 7 32
At the moment Trump does
what I wrote it to do, so this is the version that I’m posting for
free and using myself. But
there is room for improvement such as a debug mode, greater use of
anti hacking code, options to change the encoding and loading the
encode command from a file. If
there is something that you would like to add, email me frank.fenti
at gmail. If there is
significant interest I’ll consider it.
don't claim that Trump is good for anything -- if you think it is,
great, but it's up to you to decide.
If Trump doesn't work: tough.
If you lose a million because Trump messes up, it's you
that's out the million, not me.
If you don't like this disclaimer: tough.
I reserve the right to do the absolute minimum provided by
law, up to and including nothing.
is basically the same disclaimer that comes with all software
packages, but mine is in plain English and theirs is in legalese.
didn't really want to include any disclaimer at all, but my lawyers
insisted. I tried to
ignore them but they threatened me with their attack shark at which
point I relented.