http://technet.microsoft.com/en-us/magazine/2007.06.utilityspotlight.aspx
EDIT: If you are giving the customer a single file to run, why not create a self extracting RAR with WinRAR and set the "Require Administrator" flag in SFX options? This absolves you of your limit of only 1 file, you can have all the resources you need.
Alternatively make your SFX using your favourite SFX tool and use the elevate tools above.
PSEXEC.EXE FTW on this one
link to psexec page on sysinternals site
The -h will allow you to use Elevation if available
From Psexec /?
-h If the target system is Vista or higher, has the process run with the account's elevated token, if available.
what you do is open a Elevated command prompt as you're logged in use (that has local admin rights of course)
Run Psexec with this command line to open a CMD shell under this window as a different elevated user
psexec -h /user domain\username cmd
This should drop you to a new Prompt in the same window and you should have admin rights if both you and the other account have admin rights on that local system
If you take the -h off it will open up a new windows with user rights.
Runas doesn’t see to work for this. when I check for the Turst levels all I get with UAC on is
runas /showtrustlevels
The following trust levels are available on your system:
0x20000 (Basic User)
this no mater how I run it.
the Shell extension is built in to windows 7. You just have to hold the left shift key while you right click.
Left shift exposes a lot of things sysadmins will find useful
Best Answer
You can use the runas command. Check out
runas /?
or Microsoft runas for more info. Put this in your b1.bat file.Credit here
If that doesn't work you could map the drive in the b2.bat file. Add
net map z: \\server\share
. Then follow up withnet use z: /d