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
The Coldest

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
reghakr

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
The Coldest

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
reghakr

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
The Coldest

Windows 7 64 bit
 
 

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

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
The Coldest

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
Zardoc

Windows 7 x64 Ultimate SP1
 
 

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

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
Thread Forum
Dos script help
Hi, Below is my folder path, D:/Sample I have .sql files in that folder and i need to get the file names based on modified/created date i pass. for ex : i need to get the file names created/modified on or after 10/01/2014(mm/dd/yyyy). Can any please give me some sample script to make this...
General Discussion
What is Macro / Script ?
I heard a lot about Macro and Scripts , something about automating task, file management, directory management, disk drive management etc. So how can any user use that to his efficiency, like file and directory management is one thing i could associate with the prospect of learning Macro or...
General Discussion
Logon Script
I like to create small websites, just doing fun stuff with HTML and such. I thought it'd be easier to share the htdocs folder(I'm using XAMPP - that's where are all HTML etc files are) and edit those files / create new files from any comp in my network. So... I wanted to run a script (net use...
Network & Sharing
In need of a script...
I am looking for a script which can delete cookies, Windows + browser cache automatically on a regular (scheduled) basis. Can this be done through Windows itself or would i have to implement a custom script or something? I am looking to replace CCleaner and similar software package(s). Just now...
Performance & Maintenance
ie8 script error
had a bit of trouble with ie8 tried reinstalling ie8 for msn and another or epeadia all the same problem loads of script errors I have done a reg scan and clean unticked the debugging in tools advanced anything else i can do thanks
Browsers & Mail
Need help testing my script
Hi. I didn't know where to put this thread. I felt this was the best place. I have spent all day on creating a .bat script that replaces explorer.exe with my modified explorer.exe (only change is the Start Orb .bmp file.) I would be very happy if someone could test it and see if it actually...
Customization


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 01:56.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App