- Create a Folder on your Desktop and name it anything you’d like. For this example we named ours CordovaTest.
- Press your Windows key, type in “cmd”, and hit enter to launch the command prompt. Type cd and drag the folder you created into the Command Prompt then hit enter.
- Run the following command using whatever you want your app folder to be called (we used “MyApp”), Bundle ID, and the name of your app.
cordova create FolderName BundleID AppName
- Change the directory to the folder you just created.
cd FolderName
-
Run the following command to add the Windows platform to your Cordova app folder.
cordova platform add windows --save
-
Run the following command to check that you have everything needed installed.
cordova requirements
-
Navigate to the app folder you created with Cordova.
-
Add the HTML5 folder that you generated and downloaded earlier to your app folder.
-
Delete the “www” folder that is contained in the app folder and rename your HTML5 folder “www”.
-
Open your renamed folder. Delete the files “sample-frame”, “sample-index” and “sample-inline”. Keep “sample-cordova-index”.
-
Rename the “sample-cordova-index” file to “index”.
-
Run the following command to update the Windows platform within your Cordova app folder.
cordova platform update windows --save
-
Run the following command to build your project to the Windows platform.
cordova build windows
-
Run the following command to launch your app.
cordova run windows
-
If you receive a message that you need a developer certificate or account, log into your Windows Developer account. Powershell will run to install a certificate in your app. Type “y” and press enter to continue.
-
If you are given a success message press enter to launch your app immediately.
- Your app is now installed on your computer and you can search in Windows for it by using the app name.