Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: can't run script


17 Nov 2009   #1

Windows 7 64 bit
 
 
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 System SpecsSystem Spec
.

17 Nov 2009   #2

Windows 7 Pro & Vista Home Premium
 
 

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 System SpecsSystem Spec
17 Nov 2009   #3

Windows 7 64 bit
 
 

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 System SpecsSystem Spec
.


17 Nov 2009   #4

Windows 7 Pro & Vista Home Premium
 
 

maybe you could try Sysinternals psshutdown.

You can download the whole suite here:
Sysinternals Suite November 3, 2009
My System SpecsSystem Spec
18 Nov 2009   #5

Windows 7 64 bit
 
 

I am still getting access denial.
My System SpecsSystem Spec
18 Nov 2009   #6

Windows 7 x64 Ultimate SP1
 
 

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 System SpecsSystem Spec
23 Nov 2009   #7

Windows 7 64 bit
 
 

I figure it out. You have to turn the UAC all the way off and restart your computer.
My System SpecsSystem Spec
23 Nov 2009   #8

Windows 7 x64 Ultimate SP1
 
 

I don't
My System SpecsSystem Spec
30 Nov 2009   #9

Windows 7 64 bit
 
 

probably because your computer is not join to a domain.
My System SpecsSystem Spec
Reply

 can't run script




Thread Tools



Similar help and support threads for2: can't run script
Thread Forum
VB Script (seeming to be AI) General Discussion
I Need Help To Reorder The Context Menu Script In Script Form? Customization
Logon Script Network & Sharing
VBS script: Cannot find script engine General Discussion
In need of a script... Performance & Maintenance
script error when running a vbs script. Network & Sharing

Our Sites

Site Links

About Us

Find 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 05:15 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33