Jump to content

am12348

Member
  • Posts

    19
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Israel

About am12348

Profile Information

  • OS
    none specified

am12348's Achievements

0

Reputation

  1. I've tried: runas /user:Administrator taskmgr. However I'm required to type the administrator's password. I need that the batch will be run automatically without intervention. Namely I'm looking for a way to store the administrator's password in the command/batch. Thank you, Amos
  2. Hello to all, In the organization I'm working with, there are users, that don't have administrator's permissions. I was asked to write a batch that displays the task manager in any workstation. The command for displaying the task manager is relatively simple: taskmgr If the batch runs under an administrator user, the task manager is displayed. However if I try to run it under a non administrator user, a message concerning to permissions is displayed. My question is , if there is a way to impersonate the command in the batch, namely running the command as an administrator? Thank you in advance, Amos
  3. 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
  4. 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 ,
  5. 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
  6. Hello, Before I refer to what submix8c has said, I would like to thank you for everybody's useful posts. Now to the point . Maybe six separate topics for the same subject are too much. However , upon my experience in some forums(Not this one) , in many times nobody refers to a topic that is not either recent or in the first forum page. The topics I've posted relate to the same subject "Scheduling shutting down and restarting NT4 server", but each time, I've written different things. I've tried to read and implement what everybody has posted and when I've met problems , I've posted a new topic in order to get an answer as soon as possible. Due to company's security policy, I've sometimes asked the same question twice in order to be sure with what I'm doing. I hope that now, I'm quite clear and I'm sorry for the misunderstanding. Thank you, Amos
  7. Hello, Thanks to Allen2 for his help I've the two following questions: - Does psshutdown fdo the work on NT4? - Can I use this software freely in any NT4 server? Thank you
  8. Hello, First of all thank you for your useful posts, referinfg to my problem in at command. I've changed my batch file, that shuts dowwn and restarts NT4 server according to Jaclaz's post. I've added "pauses" to some places in the batch and configured the "at" command to run the batch interactively. run the batch interactively step by step. The pauses have helped me to find out what is wrong wuth the batch. I've fixed the problems and now, when the time configured in "at| command comes, the batch is actuvared and is working properly. Ther is still a one little problem. I use to lock the server when I don't use it and ublock it by ty[ing a password. When the server is locked, the batch file doesn't work properly, when the configured time comes. In my logs, I can see that the batch has been activated, but it haven't worked properly. Can be any problem in activation of scheduled batches, when the server is locked? What can I do to overcome this problrm? Thank you for your useful help, Amos
  9. Hello, As far as I know, there is not "Schedulrd Task" under Control Panel" Following to the replies in the forum, I've done the following: - I've written a batch file, which shuts down the NT4 server and restarts it - I've verified that the schedule service is active - I've define a new "at" activity in such way: at 07:00 /every:Su,M,T,W,TH,F c:\winnt\system32\cmd.exe /q /c c:\temp\restart.bat When I write "at": in the command prompt, I see a new id with the one I've defined Now, when the time comes,I hear a beep but the at does not take efffect I've written the same, but with the parameter interactive at 07:00 /interactive /every:Su,M,T,W,TH,F c:\winnt\system32\cmd.exe /q /c c:\temp\restart.bat When the time comes, the server displays a message about istallation error. The batch is not activated. When I write another activity for example "notepad" at 07:00 /interactive /every:Su,M,T,W,TH,F notepad The notepad window is displayed, when the time comes If I write simply "c:\temp\restart.bat", the batch works as expected - It shuts down the server and restarts it Does anyone have an idea what can I do, is there an alternative way, any function, to schedule the batch? Is there an alternative way, any function, to schedule the batch file? Thank you in advance, Amos
  10. Hello, Here there is the content of the batch I use: @ECHO OFF & cd/d %temp% & echo [version] > {out}.inf (set inf=InstallHinfSection DefaultInstall) echo signature=$chicago$ >> {out}.inf echo [defaultinstall] >> {out}.inf rundll32 setupapi,%inf% 1 %temp%\{out}.inf del {out}.inf If I activate the batch without "at" , it is working as expected. However if I put in in "at", when time comes, a beep is sound and the batch does not work I write the "at" as follows: at 07:00 /interactive /every:Su,M,T,W,TH,F c:\winnt\system32\cmd.exe /q /c c:\temp\restart.bat
  11. Hello, As far as I've checked, the "schedule" service is running.In the NT4 server, I've gone to the control panel and under "services" I've seen that "schedule" is active
  12. Hello, Thank to anyone that will help me to overcome this problem: I've write a batch file that shuts down and restarts the NT server. I've put it in the C: drive in the NT. When I activate the batch in the cmd screen, it shuts down and restarts the server as espected. I want to activate the batch at a specific time. Therefore I try to use the function "at": I write in the cmd screen: at 07:00 /every:Su,M,T,W,TH,F c:\temp\restart.bat When the time comes, the server sounds a "beep", but it seems that the batch is not activated When I write in the cmd screen at 07:00 /interactive /every:Su,M,T,W,TH,F c:\temp\restart.bat When the time comes, the server displays a message about istallation error. The batch is not activated. What is wrong with what I've written? Is there an alternative way, any function, to schedule the batch file? Thank you Amos
  13. Hello, As I've specified the previous topocs I've a problem in "at" comans - The associated command does not take effect when the schedule time cones, even though the schediler service has been starsed. I've heard , that in order that "at" will take effect , an additional service besides the scheduler task has to be started by an administrator. Does anyone know the name of that setvice? Thank you, Amos
  14. Hello, As I've written before, I've met a problem in "at" cpmmand in our NT4. The command does not take effect when the scheduled time comes.I've specified the full path, I've put the command in quotes. It didn't help. However, if I specify the "interactive" parameter, the "at" then stops at the scheduled time and waits the user to put something. ThereforeI want to try to use the "interactive" parameter to solve my problem, but a user has not to be near the server at that time. Is there an additional parameter besides the "interactive" parameter "number of seconds to wait" "so that the server executess the command in "at" automatically if no one gives any response? Thank you for your answers, Amos
  15. ]Hello, First of all thank you. Secondly, I've specified the scheduled command in a full path. However the situation is the same - the "at " command does not take effect. I've even put the full command in quotes. However, if I specify the "interactive" parameter, the "at" then stops at the scheduled time and waits, the user to put something. I want to use the "interactive" parameter to solve my problem. Therefore I would like to know, if there a way to put an additional parameter besides the "interactive", that tells the system, that if there is not any response from the user for a certain time, the command associated to the "at" is done. Thank you, Amos
×
×
  • Create New...