At first Frederick William tried to follow a policy of neutrality in the Napoleonic Wars . At first Frederick William and his advisors attempted to pursue a policy of neutrality in the Napoleonic Wars .