Create the files Using notepad on a desktop PC create the file "MyScript1.ps1" and put the following in it: # Store the date and time every startup $logFile = 'C:\MyStartupLog.txt' get-date >> $logFile Now using notepad create the file "MyStartup.bat" and put the following in it: powershell -command "C:\MyScript1.ps1" Move the files to the Windows […]
All posts by
Task Scheduler
Powershell commands View the current list of scheduled tasks schtasks.exe Help For a full list of supported parameters schtasks.exe /? Create a new scheduled task schtasks /Create /? schtasks /Create /SC ONSTART /TN MyTaskName /TR "some command to exectute or path to a batchfile" Run as Administrator: schtasks /Create /SC ONSTART /TN MyTaskName /TR "some […]
Startup tasks
Running scripts and tasks at boot This command file is invoked every time the system boots: "OEMCustomization.cmd"
Date & Time
Loading DateTime With A Time DateTime Now Setting DateTime Value
Date & Time
Loading DateTime With A Time DateTime now Edit DateTime value You can’t edit a DateTime because it’s immutable. Instead you just create a new one, e.g. Add or subtract time Setting DateTime Value Display DateTime Link to all format codes Comparing
Memory Leaks
C# apps are perfectly susceptible to memory leaks. They are different to old unmanaged C++ memory leaks, but they still happen and can be just as hard if not harder sometimes to find. Instead of memory leaking and becoming lost to the system, in C# you can have memory the garbage collector running in the […]
Working With Files-OS
Select Folder StorageFolder Folder1 = await StorageFolder.GetFolderFromPathAsync(“C:\\SomeFolder”); Accessing System Folders Not all folders are accesible by Universal Windows Apps. To make a folder accesible to a UWP app, you can use FolderPermissions command line tool. E.g., give UWP apps access to c:\test folder: FolderPermissions c:\test -e Note this will work only with native Win32 apis […]
Provisioning Packages
A Provisioning package allows you to apply settings over an existing standard Windows IoT install. For instance you can use one to add certificates, set update times etc. Resources https://developer.microsoft.com/en-us/windows/iot/docs/management All the items you can manage via a provisioning package https://msdn.microsoft.com/windows/hardware/commercialize/customize/mdm/configuration-service-provider-reference Creating a Provisioning Package “Windows Image Configuration and Designer” is included as part of […]
Windows IoT Core Pro
Features of Pro Provides the capability to control and schedule the windows update. This enables the policies related to Update such as Update/AllowAutoUpdate, Update/ScheduledInstallDay, Update/ScheduledInstallTime, Update/UpdateServiceUrl. Preinstall and servicing (updating) of store signed apps. Requirments of Pro You must be and OEM. If you are developer wishing, for instance, to preinstall apps for IoT you must […]
Connect
Resources https://technet.microsoft.com/en-us/library/f435edbe-1d50-4774-bae2-0dda33eaeb2f?f=255&MSPPError=-2147217396#bkmk_wlanConn Connect Using WiFi Profile netsh wlan connect name=MY_WIFI_PROFILE_NAME If the WiFi adapter is already connected to a WiFi network it will automatically disconnect first. If you have more than 1 WiFi adapter you must specify an interface name to use: netsh wlan connect name=MY_WIFI_PROFILE_NAME interface="Wireless LAN Adapter"