Sign in to follow this  
Followers 0
am12348

NT4 - Shuting down and restarting the server

45 posts in this topic

Hello,

The NT4 worksattion in the company is used to be locked when nobody is working on it. However, some scheduled

processes are not working properly when it is in this state(locked).

Since I want to enable those processes working, I would like to know, if it is possible to unlock the workstation

programtically by a batch file that will be activated by "at" command.

Thank you for your help,

Amos

0

Share this post


Link to post
Share on other sites

Personally, I don't think it's possible but I could be absolutely wrong. What kind of scheduled processes are needed to be run with the system unlocked? Is it something you can put the credentials into the program and it'll launch it at the appropriate time?

0

Share this post


Link to post
Share on other sites

My guess is that you are having issues somehow connected with this:

http://techsupt.winbatch.com/ts/T000001035F9.html

The NT AT command can run when no-one is logged on within certain contraints:

  1. Hard code everything.
  2. No network connections allowed.
  3. You cannot send keystrokes to anything UNLESS the AT command is set to be interactive AND there is a logged in user AND the workstation is not locked ... only then *maybe* you can send keystrokes..

Some remedies are suggested in the referenced page, but you need to provide more details on the specific issues you are having.

Maybe, just maybe, this approach:

http://www.codeproject.com/Articles/16197/Remotely-Unlock-a-Windows-Workstation

http://www.rohitab.com/discuss/topic/32164-autounlockpc/page__p__10052092#entry10052092

works on NT 4.00 also, but if a way to correct the behaviour of the single specific scheduled tasks is possible, it would be IMHO preferrable.

jaclaz

0

Share this post


Link to post
Share on other sites

Hello,

Following to the last post, the problem is as follows:

I've written a batch file that shuts down and restarts the NT4 server and I've posted it in my previous replies.

When the workstation, that is connected to the server, is in an unlocked state, the batch works properly. No

matter, it is activated directly or as a scheduled task("at").

However, when the workstation is locked the batch does not work properly when the "at" time comes.The batch

itself starts working, but the shutting down process is not done.

Since the daily shutting down and restarting process is important for the other processes, I would like to check

if there is "an unlocking command" in NT4. This command will be activated close to the shutting down process

time as is specified in its "at" command.

Again the shutting down batch is:(It is working in an unlocked state)

@ECHO OFF

set temp=c:\temp

PUSHD %temp%

set inf=InstallHinfSection DefaultInstall

(

echo [version]

echo signature=$chicago$

echo [defaultinstall]

)>{out}.inf

rundll32 setupapi,%inf% 1 %temp%\{out}.inf

del {out}.inf

POPD

I hope that I've put all the necessary details of the problem

Thank you,

Amos

,

0

Share this post


Link to post
Share on other sites

So this is what, the 6th or 7th separate thread you started about the same issue? :w00t:

Do you expect that members would search the board for all these threads to be current with your progresses? :unsure:

You already stated how that batch wasn't working, the most current threads being:

http://www.msfn.org/board/topic/161834-shutting-down-and-restart-nt4/

http://www.msfn.org/board/topic/162062-following-my-previous-posts-about-shutting-own-nt4/

Merged by dencorso into this same thread:

(you do see the difference between posting a link to something as opposed to referring to your "other thread", don't you?)

BTW; please read, attentively, this post in the latter:

http://www.msfn.org/board/topic/162062-following-my-previous-posts-about-shutting-own-nt4/page__view__findpost__p__1031398

page__view__findpost__p__1031398

Divide et impera:

http://en.wikipedia.org/wiki/Divide_and_rule

simply doesn't work on a technical board, on the contrary :whistle: :

borgmsfn.jpg

(image courtesy of PuntoMX )

You were already suggested to try using some other programs (listed) INSTEAD of that batch, after one and a half month you are still with that same batch? :realmad:

What happened with those other programs/approaches that were suggested to you?

What happens NOW, following the given suggestions in THIS thread?

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

:hello:

Nice move :whistle: so now the links I posted are invalid :w00t:

Correcting them. ;)

jaclaz

0

Share this post


Link to post
Share on other sites

Sorry about that. Nobody can make an omelette without breaking some eggs (or are they uggs?)... anyhow, the good thing is: these ones can be unbroken... ain't that great? :lol:

0

Share this post


Link to post
Share on other sites
Old psshutdown (Sysinternals version 1.0.1.0 and up to 2.34) worked for sure with NT4. Newer versions might or might not work but, as those will work for sure when used remotely: if you have another window (>NT4) computer around, you could use it to remotely shutdown the nt4 and on that other computer, you'll have scheduled tasks working properly instead of the lousy "at" (which was "enough" when there weren't anything beside it).
0

Share this post


Link to post
Share on other sites

.... you'll have scheduled tasks working properly instead of the lousy "at" (which was "enough" when there weren't anything beside it).

Just to utterly disagree: when it works, AT works alright. (and no it's not a truism)

And the Task Scheduler in NT 4.00 (besides the IE related issues) is far from "perfect":

http://www.piclist.com/techref/os/win/winnt/cron.htm

Relying on an "external" machine to run tasks (if they are "critical") represent a good way to invite Murphy's Law at dinner for a live demonstration :w00t:

Another day, another tool/approach (scheduled unlock) ;):

http://www.softtreetech.com/24x7/archive/51.htm

jaclaz

0

Share this post


Link to post
Share on other sites

.... you'll have scheduled tasks working properly instead of the lousy "at" (which was "enough" when there weren't anything beside it).

Just to utterly disagree: when it works, AT works alright. (and no it's not a truism)

And the Task Scheduler in NT 4.00 (besides the IE related issues) is far from "perfect":

http://www.piclist.com/techref/os/win/winnt/cron.htm

Relying on an "external" machine to run tasks (if they are "critical") represent a good way to invite Murphy's Law at dinner for a live demonstration :w00t:

Another day, another tool/approach (scheduled unlock) ;):

http://www.softtreetech.com/24x7/archive/51.htm

jaclaz

Why are you always trying to find the bad side to every solution someone other than you can provide ?

There is something called Job scheduler software and it seem quite interesting how software companies disagree with you as they decided to create a lot of professional applications to run critical tasks and those critical tasks are operated usually from one central server (sometimes more than one for redundancy).

In fact i think you just love to disagree with everyone (so of course you'll disagree with me on this point).

"At" service doesn't come with a logging facility (eventlogs or plain file like scheduled taks in 200/xp/2003) to allow debugging so i can't call something like this a mission critical tool to run tasks !

Edit : spelling mistakes

Edited by allen2
0

Share this post


Link to post
Share on other sites

Why are you always trying to find the bad side to every solution someone other than you can provide ?

Actually I was trying to defend poor, old AT.EXE that it seemed to me you were bad mouthing. :w00t:

Of course it is not the best thing that was ever invented, but as said, when it worked and within it's limits, it has been working alright.

That's all. :)

And SCHTASKS and Task Manager have as well more than one quirk, guess why exactly there are so many third-party providers for "Job scheduler software" ;), not only "centralized".

There is something called Job scheduler software and it seem quite interesting how software companies disagree with you as they decided to create a lot of professional applications to run critical tasks and those critical tasks are operated usually from one central server (sometimes more than one for redundancy).

Sure, and if the connection - for any reason - drops, the task won't be executed.

Rest assured that Murphy's Law will present itself there as soon as such a setup is implemented (and - by definition - if the task at hand is a local backup - the only case of a disk catching fire you would ever see will happen the sheer moment the task was not executed, for *any* reason) :ph34r:

In fact i think you just love to disagree with everyone (so of course you'll disagree with me on this point).

Naaah, I may even agree with you specifically, just to show how you are wrong on this :angel .

"At" service doesn't come with a logging facility (eventlogs or plain file like scheduled taks in 200/xp/2003) to allow debugging so i can't call something like this a mission critical tool to run tasks !

Yep, as said, there never was a particular praise for the easy of use, feature list, flexibility or logging capabilities of AT.EXE :no: , but it's not like people using NT 3.51 or NT 4.00 before the advent of the Service Pack that adds Task Manager were setting alarm clocks pointed at (say) 2:00 AM to wake themselves and get to the PC to perform a task while offices were closed.

It was rudimental, it had all the quirks you can imagine and even one more, and (practical example):

http://support.microsoft.com/kb/138340/en-us

in the good ol' days you simply couldn't live without the NT Resource Kit, good batch scripting capabilities, and some fantasy, besides hard work, we had to write bytes by hand on a scrap of paper bit by bit....

Why, in my day....

http://reboot.pro/topic/1908-why-in-my-day/

.... and we LIKED it !

:lol:

jaclaz

0

Share this post


Link to post
Share on other sites

Hello Jaclaz,

Thank you for your usefull help and for your concern.

The topic I've posted recently, "Unlocking the workstation programatically" , is a new subject.

It has connection with the topic "Shutting down and restart...", but it is definitely a new one.

You've asked me to give more details about my need ad I had to mention the

scenario "Shutting down and restart...".

I read the posts you and other members write. However for security reasons I try to

avoid putting "external software" and try to rely on the "exixting tools" in the server, in

our case the function "at".

I've tried for example the function "psshutdown" that somebody suggested in a home

copmputer. It works and does the job properly, but if you put it under "at" - something

terminates with error.

I've come into a conclusion that using "shutting down and restart" under "at" command

when the station is locked (it doesn't matter which function is working my batch or psshutdown)

maybe won't work in the NT4 in the organization (only in the locking case).

Therefore I've tried to take a new approach: since both my batch and psshutdown are working

properly, when the station is in an unlocked state, I only have to unlock the workstation

a short time before the shutting down process takes effect .

From the above I'm looking for a function in NT4 that can be scheduled and unlock the

server.

Sorry for the misunderstanding,

Amos

0

Share this post


Link to post
Share on other sites

I've tried for example the function "psshutdown" that somebody suggested in a home

copmputer. It works and does the job properly, but if you put it under "at" - something

terminates with error.

Does the "schedule" service of your NT4 is running with something other than the system account (you'll this in services) ? In this case, psshutdown will only have the rights from the other user and if it isn't granted the admins rights, it might fail. In this case, you'll have to either add the rights or force psshutdown to use another login with -u and -p.

For recent psshutdown version to run in batch mode with any account , you need to add the undocumented "-accepteula" option that need to be set first.

0

Share this post


Link to post
Share on other sites

The topic I've posted recently, "Unlocking the workstation programatically" , is a new subject.

It has connection with the topic "Shutting down and restart...", but it is definitely a new one.

Actually, no, it's exactly the same, only you have found a condition in which the solution you managed to get working doesn't work.

I read the posts you and other members write. However for security reasons I try to

avoid putting "external software" and try to rely on the "exixting tools" in the server, in

our case the function "at".

Yes, but you cannot make lemon juice from cucumbers, i.e. you can squeeze cucumbers alright, but you will get cucumber juice (and NOT lemonade) as a result. :whistle:

There is NO such function in NT 4.00, maybe, just maybe, one of the third party tools/programs for which you were given a link, specifically for the task of unlocking a locked workstation, may :unsure: :

http://www.codeproject.com/Articles/16197/Remotely-Unlock-a-Windows-Workstation

http://www.rohitab.com/discuss/topic/32164-autounlockpc/page__p__10052092#entry10052092

http://www.softtreetech.com/24x7/archive/51.htm

If you are concerned about security, try using those same approaches and write your own tool.

I've tried for example the function "psshutdown" that somebody suggested in a home

copmputer. It works and does the job properly, but if you put it under "at" - something

terminates with error.

I've come into a conclusion that using "shutting down and restart" under "at" command

when the station is locked (it doesn't matter which function is working my batch or psshutdown)

maybe won't work in the NT4 in the organization (only in the locking case).

Therefore I've tried to take a new approach: since both my batch and psshutdown are working

properly, when the station is in an unlocked state, I only have to unlock the workstation

a short time before the shutting down process takes effect .

From the above I'm looking for a function in NT4 that can be scheduled and unlock the

server.

See above, there isn't one.

Sorry for the misunderstanding,

No need to be sorry, but you have to realize how when you have an issue you should really ask about the issue, and not about the way you think it should be solved, the risk is that of slipping on a chocolate covered banana:

http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/put-down-the-chocolate-covered-banana.html

You seemingly have not properly tested psshutdown, and in any case, if you really are concerned with third party software because of security issues, we are all losing our time :ph34r: .

Please, also, consider how these are not necessarily true equations:

  • Microsoft built-in fundctions/tools = Secure :w00t:
  • Third Party Tools = Security risks :no:

jaclaz

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.