+ Post New Thread
Results 1 to 7 of 7
Windows 7 Thread, Startup Script to create folder in C:\windows is not working in Technical; I've created a group policy which calls a batch file. The group policy is set at : Computer Configuration -> ...
  1. #1
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30

    Startup Script to create folder in C:\windows is not working

    I've created a group policy which calls a batch file.

    The group policy is set at :
    Computer Configuration -> Policies -> Windows Settings -> Scripts -> Startup - then I have the script name set.

    The script should do the following:

    mkdir %SystemRoot%\Sun\Java\Deployment
    copy "\\fp2\SHApps\jre1.7.0_51\deployment.config" %SystemRoot%\Sun\Java\Deployment\ /Y
    copy "\\fp2\SHApps\jre1.7.0_51\deployment.propertie s" %SystemRoot%\Sun\Java\Deployment\ /Y
    copy "\\fp2\SHApps\jre1.7.0_51\exception.sites" %SystemRoot%\Sun\Java\Deployment\ /Y

    When I run Group Policy Results it appears that the Policy is applying but the folders and not being created and files not copied.

    If I run the batch file manually (As Administrator) the folders and files are created.

    I must be missing something simple but can't work out what it is...

    Any help appreciated.

    Cheers

  2. #2
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30
    "Domain Computer" have permission to read the source file by the way

  3. #3
    kennysarmy's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    1,286
    Thank Post
    80
    Thanked 45 Times in 31 Posts
    Rep Power
    30
    Going to try using:

    Computer Configuration
    └ Preferences
    └ Windows Settings
    └ Files

  4. #4
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    795
    Thank Post
    81
    Thanked 130 Times in 113 Posts
    Blog Entries
    8
    Rep Power
    31
    If it is not even creating the directory then I would think it has something to do with the system variable. Try using C:\Windows instead and see what happens.
    Last edited by Duke5A; 11th June 2014 at 06:58 PM.

  5. #5

    Join Date
    Aug 2008
    Location
    norwich
    Posts
    41
    Thank Post
    1
    Thanked 6 Times in 6 Posts
    Rep Power
    14
    Where is your startup script located? I take it your policy is pointing to the right location for it?

  6. #6

    Join Date
    Dec 2005
    Posts
    524
    Thank Post
    34
    Thanked 87 Times in 77 Posts
    Rep Power
    39
    Are you trying to run these startup scripts on Windows 7 or above?

    If you are then I don't think it will work as the startup script works with the local computer system account and probably does not have permissions to do what you require

    I've never fully got my head around why exactly it doesn't work (but I know when I was trying to get bginfo working on Windows 7 - this caused me lots of issues)

  7. #7
    free780's Avatar
    Join Date
    Sep 2012
    Posts
    919
    Thank Post
    41
    Thanked 69 Times in 66 Posts
    Rep Power
    18
    If you want the local system account to have access to the share where your Java files are. Give the system account permission to the share and NTFS permissions. GPP is the way to go with Java config files.

SHARE:
+ Post New Thread

Similar Threads

  1. Script To Delete Folder in Home Area
    By FN-GM in forum Scripts
    Replies: 4
    Last Post: 16th May 2013, 11:43 AM
  2. Replies: 18
    Last Post: 8th May 2013, 09:12 AM
  3. Script to Create folders in folders
    By ed0z16k in forum Windows 7
    Replies: 4
    Last Post: 12th October 2012, 03:38 PM
  4. VB Script to create folders
    By markesmith in forum Scripts
    Replies: 2
    Last Post: 26th April 2007, 03:03 PM
  5. mapping a drive to web folder in windows xp
    By russdev in forum Windows
    Replies: 1
    Last Post: 3rd October 2005, 08:31 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •