Run an instal.bat file as administrator

B

bd

I am trying to load an instal.bat file for the MS game Hold'em Poker. I do
not have the run as administrator choice in the context menu. How could I
run this administrator? Windows 7 Ultimate 64bit.

thank you
 
G

Gene E. Bloch

I am trying to load an instal.bat file for the MS game Hold'em Poker. I do
not have the run as administrator choice in the context menu. How could I
run this administrator? Windows 7 Ultimate 64bit.

thank you
Type cmd in the search bar in the start menu. Cmd (actually cmd.exe)
will appear in the pane above that. Right click on that and choose Run
as administrator.

In the resulting command window, navigate to where the batch file is and
run it from the command line. I.e., type its name and press enter.

If you're unfamiliar with the command window:

To navigate in the command window, type cd "folder name". The quotes are
needed around any path name that contains blanks. You might be happier
starting with "cd \" (no quotes) which will get you to the root.

Then you can cd one layer at a time to get to the desired directory. Any
time you're confused, type cd by itself, which will display the current
folder.

One layer at a time:
to get to C:\a\b\c

do this:
cd \
cd a
cd b
cd c

If you're not on the correct drive (such as X:), first type x: followed
by Enter.
 
B

bd

Type cmd in the search bar in the start menu. Cmd (actually cmd.exe)
will appear in the pane above that. Right click on that and choose Run
as administrator.

In the resulting command window, navigate to where the batch file is
and run it from the command line. I.e., type its name and press enter.

If you're unfamiliar with the command window:

To navigate in the command window, type cd "folder name". The quotes
are needed around any path name that contains blanks. You might be
happier starting with "cd \" (no quotes) which will get you to the
root.

Then you can cd one layer at a time to get to the desired directory.
Any time you're confused, type cd by itself, which will display the
current folder.

One layer at a time:
to get to C:\a\b\c

do this:
cd \
cd a
cd b
cd c

If you're not on the correct drive (such as X:), first type x:
followed by Enter.
Thank you Gene, you unstumbled the bloch. That brought back the old DOS
days. I never even thought of that. What I am confused about is why the
run as administrator doesn't show in that particulat context menu.

Anyway, thank you for the help.
 
G

G. Morgan

bd said:
Thank you Gene, you unstumbled the bloch. That brought back the old DOS
days. I never even thought of that. What I am confused about is why the
run as administrator doesn't show in that particulat context menu.
Rename the file to .cmd and you should be able to create a shortcut with
elevated privileges.
 
B

bd

Rename the file to .cmd and you should be able to create a shortcut
with elevated privileges.
Thanks for the response. That also worked. What an education these
newsgroups provide. Good job to both responders.
 
G

Gene E. Bloch

Thank you Gene, you unstumbled the bloch. That brought back the old DOS
days. I never even thought of that. What I am confused about is why the
run as administrator doesn't show in that particulat context menu.
Thank for your comment - I got a good laugh from the unstumble :)

I was going to say you can't run a batch file in administrator mode, but
when I read G. Morgan's post I also learned something new.

Or maybe not. I just right clicked on a bat file I have lying around,
and I did get the choice to run it as Administrator.

So I set up a file in the Program Files (x86) folder, just to make it
tough, and I could run it both as a bat file and a cmd file, in normal
mode or in administrator mode. I had it create a file there, which
failed unless the programs were run as administrator.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top