That isn't going to work, because it only needs to be run when needed.   The
client is changing the way the store their online data.  Rather than have
folders for each department, The top level is sorted by project.  However
each department wants to control their data for that project.

Current script:
' newproj.vbs
' Written by Jim Majorowicz, MCP
' Whitsell Computer Services
' Version 1.0
' Date: 1/23/2009
' Written for Alliant Systems
' All Rights Reserved.

' This script uses a default folder structure template to create
' a folder structure for each new project.

' Revision History:
' 0.1 - 01/22/09 - Initial attempt and testing
' 0.2 - 01/23/09 - fixed tempname/template folder constant
'                  confusion. First working script.
' 1.0 - 01/23/09 - Incorporated advice from Ben Scott to assist in
troubleshooting
'                  and clean up user experience.  Thanks Ben.

' funny characters
Const sp = " "          ' space
Const bs = "\"          ' backslash
Const dq =""""          ' double-quote
cr = chr(13)            ' carriage return
lf = chr(10)            ' line feed

' other variables
Const title = "New Project Folder"
Const instructions = "Enter the project number and name of the folder set
you wish to create."
Const tempname = "00000 - Sample Project"
templatefolder = "99999 - Project Template"
XCopyCMD = "XCOPY"
XCopySWCH = "/E /H /I /K /O"

' folder containing everything
Const basepath = "P:\Projects"

'Set the program shell
Set WshShell = WScript.CreateObject("WScript.Shell")

' runs a command, waits for exit
Sub RunWait (cmd)
Const WshShellRunHidden = 0
Const WshShellRunWait = True
WshShell.Run cmd, WshShellRunHidden, WshShellRunWait End Sub

' ask user to input the name of the new folder
foldername = InputBox(instructions, title, tempname)

' prefix full paths
templatefolder = basepath & bs & templatefolder
foldername = basepath & bs & foldername

' build command
executeCMD = _
       XCopyCMD & sp & _
       dq & templatefolder & dq & sp & _
       dq & foldername & dq & sp & _
       XCopySWCH

' display, then execute
WScript.Echo "This will create a project folder called: " & foldername & cr
& lf & "Click Okay to create."
RunWait executeCMD

-----Original Message-----
From: Micheal Espinola Jr [mailto:[email protected]] 
Sent: Wednesday, January 28, 2009 10:13 PM
To: NT System Admin Issues
Subject: Re: Scripting question

I did something similar with a computer startup script via GPO.  It
worked very well.

--
ME2



On Thu, Jan 29, 2009 at 1:05 AM, Jim Majorowicz <[email protected]>
wrote:
> It creates a series of folders from a template.  (It's the one I was
working
> on last week.)  Some of the folders in the template have special
permission
> sets on them.  Not all of the users that will run the script actually have
> access rights to all the subfolders, so when the script runs it will stop
> when it runs into an ownership problem.  At the heart, it's basically just
> an XCOPY /E /H /I / K /O.  I neglected to test the damn thing as a member
of
> the sales group which has about enough rights to view but very limited
write
> permissions in the sub folders.
>
>
>
> Basically when the thing gets to the Engineering folder it stops.  Also,
it
> appears that there may be a problem with ownership.  Another group creates
> the top level folder then just stops.  I'd rather just  set it up so that
> whoever starts the app it runs as an administrator which doesn't have such
> limitations.
>
>
>
> From: Don Ely [mailto:[email protected]]
> Sent: Wednesday, January 28, 2009 6:56 PM
>
> To: NT System Admin Issues
> Subject: Re: Scripting question
>
>
>
> What does the script do?
>
> On Wed, Jan 28, 2009 at 6:52 PM, Jim Majorowicz <[email protected]>
> wrote:
>
> I've got a short script that only works if you're running it as a network
> admin.  Is there a way I can set up some sort of additional script or
> executable that will run the script with admin privileges?
>
>
>
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
>
>
>
>
>
>
>
>
>

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to