Glenn M
asked on
Script to authenticated the user, create folders, copy files and then launch executable.
Hey Experts,
I need a LOGIN Batch or VB Script to perform the following actions, in order:
1. Look in "C:\Users.Lights" DIR for a folder with the authenticated users's name on it.
2. IF there isn't a folder with it's %username% within "C:\Users.Lights", create one. IF it does exist, go to next step.
3. Look for a folder called "Lights" within "C:\Users.Lights\%username %" DIR,
4. IF there isn't is a folder called "Lights" is not found in "C:\Users.Lights\%username %" DIR, then copy the Lights folder from "C:\RDS.Setup" to "C:\Users.Lights\%username %".
5. Copy C:\RDS.Setup\PROD\*.exe C:\Users.Lights\%username% \Lights\ ** Overwrite existing EXE's **
6. Map network Drive " L:\ " to \\Server\Light$
7. Finally Launch Program located at: "C:\Users.Lights\%username %\Lights\L ights.exe"
7. END
I need a LOGIN Batch or VB Script to perform the following actions, in order:
1. Look in "C:\Users.Lights" DIR for a folder with the authenticated users's name on it.
2. IF there isn't a folder with it's %username% within "C:\Users.Lights", create one. IF it does exist, go to next step.
3. Look for a folder called "Lights" within "C:\Users.Lights\%username
4. IF there isn't is a folder called "Lights" is not found in "C:\Users.Lights\%username
5. Copy C:\RDS.Setup\PROD\*.exe C:\Users.Lights\%username%
6. Map network Drive " L:\ " to \\Server\Light$
7. Finally Launch Program located at: "C:\Users.Lights\%username
7. END
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window
....but I would LOVE is the COPY PROD EXE portion of the script to have a little intelligence. If the EXE files in PROD were newer than the C:\USERS.LIGHTS\%username$