CodeConnect.Net Beta


   Explore    Entry   Register  Login  
windowsxp-general
access
windows-vista-mail
windows-vista-general
windowsupdate
windowsmedia-player
access-forms
windows-live-mail-desktop
windowsxp-help_and_support
access-queries
access-modulesdaovba
access-formscoding
windows-server-sbs
windows-server-general
access-reports
windows-vista-music_pictures_video
windowsce-platbuilder
windows-live-messenger
windows-terminal_services
windows-powershell
windows-server-active_directory
access-gettingstarted
windows-mediacenter
windowsxp-hardware
windowsxp-network_web
windows-64bit-general
windows-live-sync
windows-vista-hardware_devices
windows-inetexplorer-ie6_outlookexpress
windows-group_policy
windows-server-networking
windows-vista-installation_setup
windows-vista-networking_sharing
windowsxp-basics
access-tablesdbdesign
windowsxp-perform_maintain
windows-vista-performance_maintenance
windows-networking-wireless
windows-vista-file_management
windows-inetexplorer-ie6-browser
windows-server-dns
windows-server-update_services
windows-vista-security
windows-vista-administration_accounts_passwords
windows-vista-games
windows-file_system
windows-live-foldershare
windows-live-photogallery




Can Reply:  Yes Members Can Edit: No Online: Yes
Zone: > Microsoft News > microsoft.public.windows.vista.security Tags:
Item Type: Date Entered: 9/25/2009 3:25:34 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 48 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
"Timbo" <me@hom
NewsGroup User
Running a batch file9/25/2009 3:25:34 PM
Reply

0

Please, please can some one help me...

I am trying to run a batch file in vista as an administrator. I know I can
use the RUNAS command, but this prompts me for a password. (and what
password is a mystery to me as it's a non domain machine and there isn't a
user called administrator, but that's besides the point). What I am
looking to do is to replicate the behaviour of Right Clicking on the batch
file and clicking 'Run as administrator', then the security box comes up -
this is fine, that is EXACTLY what I want to happen. The user already has
adminitrator privilages and I understand that I'll never get around the
security box coming up - I don't mind this, but I can't seem to find a way
of replicating this.

Any ideas will be greatfully received.

Thanks

Tim


"Peter Foldes"
NewsGroup User
Re: Running a batch file9/25/2009 3:48:11 PM
Reply

0

Timbo

You are using OE to post here. Is that the machine in question or is it a Vista Home
which cannot accomplish what you are asking

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"Timbo" <me@home.com> wrote in message news:OUTluRfPKHA.1232@TK2MSFTNGP05.phx.gbl...
> Please, please can some one help me...
>
> I am trying to run a batch file in vista as an administrator. I know I can use
> the RUNAS command, but this prompts me for a password. (and what password is a
> mystery to me as it's a non domain machine and there isn't a user called
> administrator, but that's besides the point). What I am looking to do is to
> replicate the behaviour of Right Clicking on the batch file and clicking 'Run as
> administrator', then the security box comes up - this is fine, that is EXACTLY
> what I want to happen. The user already has adminitrator privilages and I
> understand that I'll never get around the security box coming up - I don't mind
> this, but I can't seem to find a way of replicating this.
>
> Any ideas will be greatfully received.
>
> Thanks
>
> Tim
>

Bruce Chambers
NewsGroup User
Re: Running a batch file9/25/2009 3:50:49 PM
Reply

0

Timbo wrote:
> Please, please can some one help me...
>
> I am trying to run a batch file in vista as an administrator. I know I can
> use the RUNAS command, but this prompts me for a password. (and what
> password is a mystery to me ....


It's the username/password for whatever account with local
administrative privileges that you wish to use to run the batch file.


>.... as it's a non domain machine....


Not relevant.


> and there isn't a
> user called administrator,

Of course, there is. However, by default in Vista, the Built-in
Administrator account is disabled.


> .... but that's besides the point). What I am
> looking to do is to replicate the behaviour of Right Clicking on the batch
> file and clicking 'Run as administrator', then the security box comes up -
> this is fine, that is EXACTLY what I want to happen. The user already has
> adminitrator privilages and I understand that I'll never get around the
> security box coming up - I don't mind this, but I can't seem to find a way
> of replicating this.
>

I believe (haven't had to do this for a long time, and don't have a
Vista machine handy to test it) that in order to use Runas.exe in the
batch file, you'd have to specify the user account, and then it will
prompt for a password as necessary.

RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
/user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
/smartcard [/user:<UserName>] program

RUNAS /trustlevel:<TrustLevel> program

/noprofile specifies that the user's profile should not be
loaded.
This causes the application to load more quickly, but
can cause some applications to malfunction.
/profile specifies that the user's profile should be loaded.
This is the default.
/env to use current environment instead of user's.
/netonly use if the credentials specified are for remote
access only.
/savecred to use credentials previously saved by the user.
This option is not available on Windows 7 Home or
Windows 7
Starter Editions
and will be ignored.
/smartcard use if the credentials are to be supplied from a
smartcard.
/user <UserName> should be in form USER@DOMAIN or
DOMAIN\USER
/showtrustlevels displays the trust levels that can be used as
arguments
to /trustlevel.
/trustlevel <Level> should be one of levels enumerated
in /showtrustlevels.
program command line for EXE. See below for examples

Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

NOTE: Enter user's password only when prompted.
NOTE: /profile is not compatible with /netonly.
NOTE: /savecred is not compatible with /smartcard.


--

Bruce Chambers

Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html

http://support.microsoft.com/default.aspx/kb/555375

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
"Dave-UK" <Here
NewsGroup User
Re: Running a batch file9/25/2009 4:03:25 PM
Reply

0


"Timbo" <me@home.com> wrote in message news:OUTluRfPKHA.1232@TK2MSFTNGP05.phx.gbl...
> Please, please can some one help me...
>
> I am trying to run a batch file in vista as an administrator. I know I can
> use the RUNAS command, but this prompts me for a password. (and what
> password is a mystery to me as it's a non domain machine and there isn't a
> user called administrator, but that's besides the point). What I am
> looking to do is to replicate the behaviour of Right Clicking on the batch
> file and clicking 'Run as administrator', then the security box comes up -
> this is fine, that is EXACTLY what I want to happen. The user already has
> adminitrator privilages and I understand that I'll never get around the
> security box coming up - I don't mind this, but I can't seem to find a way
> of replicating this.
>
> Any ideas will be greatfully received.
>
> Thanks
>
> Tim
>
>

Try creating a shortcut to the batch file.
Right-click the shortcut and select Properties.
On the Shortcut tab select Advanced.
Tick 'Run as Administrator' , Ok and Apply.
Run the shortcut.



"Bob" <bob@nowh
NewsGroup User
Re: Running a batch file9/25/2009 9:10:24 PM
Reply

0

http://www.msfn.org/board/lofiversion/index.php/t97318.html


"Timbo" <me@home.com> wrote in message
news:OUTluRfPKHA.1232@TK2MSFTNGP05.phx.gbl...
> Please, please can some one help me...
>
> I am trying to run a batch file in vista as an administrator. I know I
> can use the RUNAS command, but this prompts me for a password. (and what
> password is a mystery to me as it's a non domain machine and there isn't a
> user called administrator, but that's besides the point). What I am
> looking to do is to replicate the behaviour of Right Clicking on the batch
> file and clicking 'Run as administrator', then the security box comes up -
> this is fine, that is EXACTLY what I want to happen. The user already has
> adminitrator privilages and I understand that I'll never get around the
> security box coming up - I don't mind this, but I can't seem to find a way
> of replicating this.
>
> Any ideas will be greatfully received.
>
> Thanks
>
> Tim
>

5 Items, 1 Pages 1 |< << Go >> >|







Similar:

why does the report re-run when printed?

print ribbon in 2007

query help

how can i bottom align text inside a control box in access?

parameter input with no parameter set up

single space

how to automatically populate fields in the subform

parameter query / check box..

report based on specific dates

return the most recent update

return to menu after closing mailing labels

qr barcode format

separate different categories with a line?

sum totals in report footer

can grow moves lower fields

still looking for deleted macro

group summation not working

display report records in access 2007

multiple records in one report

field on a report

date limited report

=?utf-8?q?access_reports_without_an_access?= =?utf-8?q?_table_=e2=80=93_is_this_possible=3f?=

error when going to print preview in access 2003 report

sorting on data calculated during detailformat?

subreport page breaks

subreports in access 2007

duplicate records/numbers/values

is there a way to freeze the header row while in report view in access 2007?

print first character of 30 byte field on report

code to create graphs

chart axis labels

report columns

number of records in a group - access 2003

subreport madness

batching totals in groups of 25 - how?

bold in report or form

access report problem

access 2007 report shows multiple rows, query shows single row

report conversion issue from 2003 to 2007

only want a page header and page footer to appear on first page

currency alignment

stacked reports printing issue

2007 access reports on the web

report has 126 pages and take forever to run

report grouping

global property change

out of memory

want to add sum fields in different sections of a report

email a report using pdf

duplicate numbers - count only once

   
  Privacy | Contact Us
All Times Are GMT