Jump to content

How to execute upon Logon


Guest nate020605
 Share

Recommended Posts

Guest nate020605

i have this script to move a host fiel from a server to a local machine i need to have it run on aproximatley 2000 workstations upon user logon, the sript is i believe well commented and easy to understand anyways. My question is, being as i have never done this before, how can i make this execute either upon logon or startup of a workstation WITHOUT using group policies? i have looked at the "@LogonDomain" macro but i dont understand how to use them and i havnt found any good documetation on it despite my searches, i'm sure this is a siple fix but i'm n00b and have no expierence, oh and i dont want it fixed for me just some hints on what sytax to use and where to palce the script I need to learn for myself. Below is my Script, thanks for the time and help

CODE
; Map Dcomain Controler One (location of host file)

DriveMapAdd ("X:", "\\CVN68UCSDC1\Client\Apps\HostFile", 0)

; Find Size of Hosts File on Local Machine

$size = FileGetSize ("C:\WINNT\System32\Drivers\ETC\Hosts")

; Compare File Size of Host on Server with size of host file on local machine

if $size <> 565912 Then

; Copy File from Mapped Network Drive to the Local Machine

FileCopy ("X:\Hosts", "C:\WINNT\System32\Drivers\ETC", 1)

EndIf

; Delete Mapped Drive

DriveMapDel ("X:")

exit

Link to comment
Share on other sites

Seeing as you have Group Policies, you are obviously running windows

and i would hope that you have a decent naming convention.

you should put the .exe file into the Startup folder of the all Users profile on each machine. then it will run every time that machine is logged in for any user.

alternate ideas:

login script

request each user runs it (pffft.. good luck)

run around like a mad hatter and run it yourself.. (lol, i have done this to install software onto 200 + computers)

Link to comment
Share on other sites

Guest nate020605

we use a first name.lastnaem user naming convention and we name the workststions by the space they are located in. what then would be the best way to get the .exe to all the machines startup folder? and since there is two thousand workstations we are trying to steer clear of running around like a mad hatter.

If any one has a better suggestion for a way to get the file move out to the machines i'm more than happy for input, thanks

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...