am12348 Posted March 17, 2013 Author Share Posted March 17, 2013 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 Link to comment Share on other sites More sharing options...
Tommy Posted March 18, 2013 Share Posted March 18, 2013 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? Link to comment Share on other sites More sharing options...
jaclaz Posted March 18, 2013 Share Posted March 18, 2013 My guess is that you are having issues somehow connected with this:http://techsupt.winbatch.com/ts/T000001035F9.htmlThe NT AT command can run when no-one is logged on within certain contraints: Hard code everything. No network connections allowed. 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-Workstationhttp://www.rohitab.com/discuss/topic/32164-autounlockpc/page__p__10052092#entry10052092works 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 Link to comment Share on other sites More sharing options...
am12348 Posted March 18, 2013 Author Share Posted March 18, 2013 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. Nomatter, 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 batchitself 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 checkif there is "an unlocking command" in NT4. This command will be activated close to the shutting down processtime as is specified in its "at" command. Again the shutting down batch is:(It is working in an unlocked state)@ECHO OFFset temp=c:\tempPUSHD %temp%set inf=InstallHinfSection DefaultInstall(echo [version]echo signature=$chicago$echo [defaultinstall])>{out}.infrundll32 setupapi,%inf% 1 %temp%\{out}.infdel {out}.infPOPDI hope that I've put all the necessary details of the problemThank you,Amos, Link to comment Share on other sites More sharing options...
jaclaz Posted March 19, 2013 Share Posted March 19, 2013 (edited) So this is what, the 6th or 7th separate thread you started about the same issue? Do you expect that members would search the board for all these threads to be current with your progresses? 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__1031398page__view__findpost__p__1031398Divide et impera:http://en.wikipedia.org/wiki/Divide_and_rulesimply doesn't work on a technical board, on the contrary :(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? What happened with those other programs/approaches that were suggested to you?What happens NOW, following the given suggestions in THIS thread?jaclaz Edited March 19, 2013 by jaclaz Link to comment Share on other sites More sharing options...
dencorso Posted March 19, 2013 Share Posted March 19, 2013 Link to comment Share on other sites More sharing options...
jaclaz Posted March 19, 2013 Share Posted March 19, 2013 Nice move so now the links I posted are invalid Correcting them. jaclaz Link to comment Share on other sites More sharing options...
dencorso Posted March 19, 2013 Share Posted March 19, 2013 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? Link to comment Share on other sites More sharing options...
allen2 Posted March 20, 2013 Share Posted March 20, 2013 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). Link to comment Share on other sites More sharing options...
jaclaz Posted March 20, 2013 Share Posted March 20, 2013 .... 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.htmRelying 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 Another day, another tool/approach (scheduled unlock) :http://www.softtreetech.com/24x7/archive/51.htmjaclaz Link to comment Share on other sites More sharing options...
allen2 Posted March 20, 2013 Share Posted March 20, 2013 (edited) .... 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.htmRelying 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 Another day, another tool/approach (scheduled unlock) :http://www.softtreetech.com/24x7/archive/51.htmjaclazWhy 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 March 20, 2013 by allen2 Link to comment Share on other sites More sharing options...
jaclaz Posted March 20, 2013 Share Posted March 20, 2013 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. 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) 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 ."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 , 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-usin 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 ! jaclaz Link to comment Share on other sites More sharing options...
am12348 Posted March 21, 2013 Author Share Posted March 21, 2013 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 Link to comment Share on other sites More sharing options...
allen2 Posted March 21, 2013 Share Posted March 21, 2013 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. Link to comment Share on other sites More sharing options...
jaclaz Posted March 21, 2013 Share Posted March 21, 2013 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. 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 :http://www.codeproject.com/Articles/16197/Remotely-Unlock-a-Windows-Workstationhttp://www.rohitab.com/discuss/topic/32164-autounlockpc/page__p__10052092#entry10052092http://www.softtreetech.com/24x7/archive/51.htmIf 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.htmlYou 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 .Please, also, consider how these are not necessarily true equations:Microsoft built-in fundctions/tools = Secure Third Party Tools = Security risks jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now