can't run script


  1. Posts : 38
    Windows 7 64 bit
       #1

    can't run script


    Having a problem run this script

    at 1am /every:Friday c:\windows\shutdown.exe /l

    when I run it a black screen pop up and then disappears so I know the script is running but nothing is happen. I have ran it from the command line and it say access denial but I am in the local administrator group. I even put the domain users in the administrator group and still access denial. I have also turn off the UAC. Any ideals guys.
      My Computer


  2. Posts : 1,614
    Windows 7 Pro & Vista Home Premium
       #2

    What kind of script is this?

    -l = logoff user.

    What is the top line of your script?

    At the command prompt:

    /t xxx Set the time-out period before shutdown to xxx seconds.
    The valid range is 0-315360000 (10 years), with a default of 30.
    If the timeout period is greater than 0, the /f parameter is
    implied.

    I'll leave the math up to you.

    Or maybe there's a way to do it in Task Schedular.......

    Forget the above you can do it in task Scheduler by creating a new task, if you have the script correct.
      My Computer


  3. Posts : 38
    Windows 7 64 bit
    Thread Starter
       #3

    it create it in the task scheduler and tell window to shutdown

    at(task scheduler) 1am (time 1:00am) /every:Friday(date every friday) c:\windows\shutdown.exe(shutdown window) /l(local users)

    But, the script is not the problem, because I tried other script that work in xp but they won't work in window 7. I would think it would be a rights problem. and I know I can do it from the task scheduler but I am lazy and don't want to do a 1000 or so computer individual.
      My Computer


  4. Posts : 1,614
    Windows 7 Pro & Vista Home Premium
       #4

    maybe you could try Sysinternals psshutdown.

    You can download the whole suite here:
    Sysinternals Suite November 3, 2009
      My Computer


  5. Posts : 38
    Windows 7 64 bit
    Thread Starter
       #5

    I am still getting access denial.
      My Computer


  6. Posts : 557
    Windows 7 x64 Ultimate SP1
       #6

    I'm not sure about your code, but try this code just to see if it works.

    It's just a 2 second shutdown delay.

    Create a new shortcut (right click desktop window and choose create shortcut) Browse to desktop and then when you choose next name it Shutdown. When finished right click the shortcut and type in target window C:\WINDOWS\system32\shutdown.exe -s -f -t 02 -c "Shutdown 2 seconds!!" Clic the shortcut so we can see at least if machine responds to command.
      My Computer


  7. Posts : 38
    Windows 7 64 bit
    Thread Starter
       #7

    I figure it out. You have to turn the UAC all the way off and restart your computer.
      My Computer


  8. Posts : 557
    Windows 7 x64 Ultimate SP1
       #8

    I don't
      My Computer


  9. Posts : 38
    Windows 7 64 bit
    Thread Starter
       #9

    probably because your computer is not join to a domain.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
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 10:49.
Find Us