|27 Oct 2011||#1|
I am trying to run/create a batch script for the users on my domain to install a program that will download and update flash and java. I have the .exe stored on the network share and currently have most of the script written. The part where i need help is to have to .exe run as one of our network administrators. Below is the code I have, where/how do I tell it to run as domain.local\networkadmin plus the account's password.
copy \\toohey\CareCloud\CCFlash.exe C:\CCFlash
START C:\CCFlash\CCFlash.exe /silent S:\IT\CCFlashReports\reports.txt /repair
All help is appreciated.
EDIT: This script will run on XP Pro and Windows 7 Pro machines. 32 and 64 bit.
|My System Specs|
|27 Oct 2011||#2|
Take a look at the runas command, it should give you what you need
RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
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
/savecred to use credentials previously saved by the user.
This option is not available on Windows 7 Home or Windows 7
and will be ignored.
/smartcard use if the credentials are to be supplied from a
/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER
/showtrustlevels displays the trust levels that can be used as arguments
/trustlevel <Level> should be one of levels enumerated
program command line for EXE. See below for examples
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:email@example.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.
|My System Specs|
|Similar help and support threads|
How to run a batch file at logoff & some batch scripting help please
Hiya, I'd just like to run a simple batch file at logoff to backup some settings. I plan to use Robocopy, which is what i use to more thorough backups. Two questions: 1. How make it run by clicking Start > Shutdown? (i realise i could make a shutdown batch file and run it instead, but i'd...
|Backup and Restore|
IE9 prompts to run scripts or activex
Good morning, Im running Win7 64. IE9 patched up to date. I installed two programs that assist with World of Tanks data. I normally do not take a chance with something like these stand alone programs (Dokaninstall was one of them, the other I unstalled and dont have the download anymore). Since...
|Browsers & Mail|
Two Scripts: START then END Application
I'm running low on resources and am not wanting to upgrade, so it looks like a script to the rescue! Basically I work with Oracle 11g on my computer. Here are the 2 scripts that I'm looking to do. Please help. Thanks. Script 1: Start Oracle 11g START Service A START Service B START...
Windows Startup scripts.. exactly when?
I have a vbscript that starts a Virtual PC Machine - the script runs perfect when executed manually or from the command line. I've placed it in the all users startup, but when I reboot it does not run until I log in. Is this the expected behavior? How can I have it start when Windows starts up.....
message about scripts on bootup?
Hi this is probably not a windows 7 problem but has only arisen since I changed from Vista, when I switch on and log in , as soon as my desktop appears I get a message (attached) can't seem to get rid of it, maybe I'm missing something obvious here?:confused:
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
All times are GMT -5. The time now is 09:13.