Completed

Create a script

This project was successfully completed by Blackhatwarrior for $150 USD in 3 days.

Get free quotes for a project like this
Employer working
Completed by:
Skills Required
Project Budget
$30 - $250 USD
Completed In
3 days
Total Bids
7
Project Description

I need a script that will run on a windows computer. The script must;

Check if the logged in user has a Google Drive folder in their profile. Having this folder would indicate that the user has Google drive installed and has logged into the application.

Does

%USERPROFILE%\Google Drive

Folder exist, if yes proceed if no stop and close here.

Check if the folders exist

%USERPROFILE%\Google Drive\Documents
%USERPROFILE%\Google Drive\Desktop
%USERPROFILE%\Google Drive\Favorites
%USERPROFILE%\Google Drive\Videos
%USERPROFILE%\Google Drive\Pictures
%USERPROFILE%\Google Drive\Music

If they exist proceed if they do not exist create them all then proceed

copy all files from

%USERPROFILE%\Documents to %USERPROFILE%\Google Drive\Documents
%USERPROFILE%\Desktop to %USERPROFILE%\Google Drive\Desktop
%USERPROFILE%\Favorites to %USERPROFILE%\Google Drive\Favorites
%USERPROFILE%\Videos to %USERPROFILE%\Google Drive\Videos
%USERPROFILE%\Pictures to %USERPROFILE%\Google Drive\Pictures
%USERPROFILE%\Music to %USERPROFILE%\Google Drive\Music

Update the registry with new paths for the above locations.

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name Personal
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Documents

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name My Video
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Videos

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name My Pictures
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Pictures

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name My Music
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Music

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name Favorites
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Favorites

Hive HKEY_CURRENT_USER
Key path Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Value name Desktop
Value type REG_EXPAND_SZ
Value data %USERPROFILE%\Google Drive\Desktop

Rename the following folders

%USERPROFILE%\Documents to %USERPROFILE%\Old Documents
%USERPROFILE%\Desktop to %USERPROFILE%\Old Desktop
%USERPROFILE%\Favorites to %USERPROFILE%\Old Favorites
%USERPROFILE%\Videos to %USERPROFILE%\Old Videos
%USERPROFILE%\Pictures to %USERPROFILE%\Old Pictures
%USERPROFILE%\Music to %USERPROFILE%\Old Music

end

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online