Jump to content

Startup script to copy a file that doesn't have an extension


Recommended Posts

Posted

Trying to copy Google Chrome's master_preferences file because their GPO's have no way to suppress the first-run window ("skip_first_run_ui": true, "show_welcome_page": false,)

 

I've tried using XCOPY, COPY and ROBOCOPY, as well as using but they all just assume that the file is a folder because there's no extension. master~1 doesn't work either.

 

I guess I could copy master_preferences.txt, then delete master_preferences, then rename master_preferences.txt but I'd rather not do that if there's a 'proper' way to do it.

Posted (edited)

Well, mostly 'cause I didn't know that existed :p

But that isn't working either.

Untitled.png

 

Edit: Huh. Replace works, but Update doesn't.. I thought Update was supposed to be 'Create it if it doesn't exist, replace it if it does'?

Edited by Garacesh
  • 4 weeks later...
Posted
You are correct update should create it if does not exist - It might be a bit of a bug due to the lack of an extension? I can test this for you if you like on my test environment.
  • 4 months later...
Posted

AutoIT script, then compile and run the exe

 

#RequireAdmin
FileCopy("\\some\location\master_preferences", "C:\Program Files (x86)\Google\Chrome\Application\master_preferences", 1); copies any file with or without extensions and overwrites it.

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