No announcement yet.

Automatic Scripts

  • Filter
  • Time
  • Show
Clear All
new posts

  • Automatic Scripts

    Hi All,

    I need to run an exe file all the time in a win 2k3 server. I have added this exe to the startup file but the problem is that when no one is logged in the system then the scripts does not run. I dont have much idea on vb scripting. Can any one assist me in having this exe run all the time even when no one is logged in.

    Last edited by mayank; 10th July 2007, 08:45.

  • #2
    Re: Automatic Scripts

    Where you have added this exe file.
    in user login script, User Logon Script (in GPO) or in Computer Startup script.
    MCSE 2003,MCSA- Messaging 2003, VCP


    • #3
      Re: Automatic Scripts

      Originally posted by entadm View Post
      Where you have added this exe file.
      in user login script, User Logon Script (in GPO) or in Computer Startup script.
      i have it in the normal startup folder so when no one is logged in this file fails to execute.


      • #4
        Re: Automatic Scripts

        Keep in mind, there is always a possibility that a certain application just cannot perform before logon, Such applications often needs a userprofile (folder or registry) to store data, or it need to run interactively with the session.

        vbscript cannot do much more with the exe-file than you already can do.
        But you can try if it is possible to run the exe as Systemaccount during computer startup:
        '// path to the executable:
          strCmdL = "%windir%\system32\calc.exe"  '--> the next line adds extra quotes around the path.
          strCmdL = chr(34)&strCmdL&chr(34)&" "
        '// If you use switches then you can add them here:
        '// (if you don't use switches then delete the next line)
          strCmdL  = strCmdL& "/switch1 /switch2 /switch3"   '...ect.
        '// Start application (0 = hidden):
        CreateObject("Wscript.Shell").Run strCmdL, 0, False
        Save the file as RunAtStartUp.vbs on the server.
        Then use GPEDIT.MSC "Computerconfiguration / Windows Settings / Scripts / STARTUP" [browse] to add the vbscript.

        But if the application cannot run w/out a userprofile then try Windows TaskScheduler
        -> browse to your exe file
        -> Perfom this task: "When my computer starts"
        Runas a local administrator.

        If that does not work, then the last hope: run exe as a service (google).

        Last edited by Rems; 10th July 2007, 21:47.

        This posting is provided "AS IS" with no warranties, and confers no rights.


        ** Remember to give credit where credit's due **
        and leave Reputation Points for meaningful posts