You are here

automatically running batch file as administrator

2 posts / 0 new
Last post
xbibleyosef
Offline
Last seen: 10 years 8 months ago
Joined: 2013-03-23 17:15
automatically running batch file as administrator

hello there,

I'm rolling together my own Portable Apps distro aimed at people interested in Christianity who live in a country where that might be illegal. My product is encrypted, so the purpose of the device is ambiguous without the password.

I discovered running a browser on a USB drive really sucks as the disk performance for shuffling temp file is poor. So I hit on an idea, I managed to make a RAM disk to run a portable version of Chrome on.

When clicking on the menu to run the batch file script, it won't work as it need Administration rights.

The batch file does this:-
check if PC is 32 or 64 bit
if driver not already there, install the correct driver for the RAM disk app (the only not 'properly portable' aspect of the product)
make a RAM disk called W: which is 350Mb
unzip a 7zip file with a pre-made up version of Chromium browser with some extensions already loaded onto W:.

When dismounting the USB drive the shutdown process, closes W: destroying the browser and any history or downloads.

If I use my main computer, its fine as run as administrator as ticked. I had to use a utility to convert the BAT into an EXE file, in order to then afterwards right click it and make it always run as administrator mode.

thing is, this is no good in a portable environment, I need a way to make sure this file runs as admin on any computer.

On any XP machine it works fine, but not on my other Win7 and Win8 machines.

any ideas anyone?

ZeroX4
Offline
Last seen: 9 years 9 months ago
Joined: 2013-01-10 21:33
you mean bat to exe converter

you mean bat to exe converter ? this one

http://fs179.www.ex.ua/show/45850288/45850288.png?1600

cause it have option on 1st screen

add administrator manifest

maybe that will help you

Log in or register to post comments