Jump to content

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


Recommended Posts

Posted

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.properties" %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

Posted (edited)
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. Edited by Duke5A
Posted

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)

Posted
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.

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



×
×
  • Create New...