/build/static/layout/Breadcrumb_cap_w.png

batch file but requires an "Administrator" account privillege

I would like to install a batch file but requires an "Administrator" account privillege. Everytime I tried to install this batch file.. a dialog pop-up requiring me to enter my administrator password..... how can can I bypass this dialog.... please help for best solution.


0 Comments   [ + ] Show comments

Answers (2)

Posted by: SMal.tmcc 9 years ago
Red Belt
0

If you run the batch as a kscript you can put in the admin credentials or just let it run as system.

 


Comments:
  • I am already using kscript...where can I put my admin credentials? - jaimec 9 years ago
    • see above - SMal.tmcc 9 years ago
      • I am logged as a Standard User.... the script does not work.. I want to bypass the admin password dialog... can we enter it somewhere. Please help - jaimec 9 years ago
    • Enter the Admin credentials in the "Run As User" boxes - rockhead44 9 years ago
      • I tried but no way I can install... It shows that I am trying to run the script but nothing is happening after I click the snooze dialog. - jaimec 9 years ago
    • can you post your batch file? - SMal.tmcc 9 years ago
      • @echo off
        netsh wlan add filter permission=denyall networktype=adhoc
        netsh wlan add filter permission=denyall networktype=infrastructure
        netsh wlan set blockednetworks display=hide
        netsh wlan add filter permission=allow ssid=OTT networktype=infrastructure - jaimec 9 years ago
      • we can do this a couple of other ways

        You can also add psexec as a dependancy and run that way
        psexec -u user -p password batfile.bat

        or just create 4 "launch a program" line commands in the script and use that.
        Directory: $(KACE_SYS_DIR)
        File: Cmd.exe
        Parameters: /c netsh wlan add filter permission=denyall networktype=adhoc
        and create 3 more for the other 3 commands - SMal.tmcc 9 years ago
      • If you have UAC enabled that is why it is prompting. This is by design from MS to increase the security and keep hackers from using the same process to compromise machines (running bats as admin behind the users credentials)
        http://social.technet.microsoft.com/Forums/scriptcenter/en-US/310e57f9-2367-4293-9f97-53d0e077aacc/vb-script-to-run-a-batch-script-as-admin?forum=ITCG - SMal.tmcc 9 years ago
Posted by: jaimec 9 years ago
White Belt
0

Thank you very much for all the help....


Comments:
  • did you get it to work okay? - SMal.tmcc 9 years ago
    • I downloaded the psexec tools as my dependency... then run the batch file... works fine.. thank you once again... - jaimec 9 years ago
      • that is the easiest way to run it for what you are doing. PSExec runs it under the specified profile - SMal.tmcc 9 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ