I would think configmgr running as user would eliminate the SYSTEM issue. I ran from a console window psecex -s mybatch.bat and it installed. Looks like it is just a configmgr issue I guess. I think I will try a call or start in the batch to launch a separate process maybe.
Attached is the batch: ::script will install the WiFi profile for Windows 7 and 8 portable devices ::change path to where the script is running from pushd %~dp0 ::logging echo %USERNAME% >>"%TEMP%\jdata_profile.log" ::Verify file exists IF EXIST "jData.xml" ( ::add the profile with settings that we want netsh wlan add profile filename="jData.xml" user=all >>"%TEMP%\jdata_profile.log" ) ELSE ( ::log the file wasn't there and exit with error echo "Network profile not found for import" >>"%TEMP%\jdata_profile.log" exit /b 2 ) Jason Condo | Bennett Adelson<http://www.bennettadelson.com/> | Cleveland Region Principal Consultant - Systems Management & Operations From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Daniel Ratliff Sent: Thursday, June 5, 2014 2:58 PM To: mssms@lists.myitforum.com Subject: [mssms] RE: Error installing a wireless profile only through configmgr It doesn't. :) But it will help narrow down what the culprit is. If you can't run it as SYSTEM then the issue may not be ConfigMgr related, or not entirely anyway. Do all failures, even the user based ones have the same error? Another thing I noticed is youa re calling the .xml file directly, but since you are running in a batch file you may need %~dp0. Maybe try out this: Netsh wlan add profile filename="%~dp0myprofile.xml" user=all Daniel Ratliff From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Jason Condo Sent: Thursday, June 05, 2014 2:41 PM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> Subject: [mssms] RE: Error installing a wireless profile only through configmgr Will try that after this test machine finishes the OSD sweep. How does that address the fact that the interactive programs running as the user failed with the same error though? Jason Condo | Bennett Adelson<http://www.bennettadelson.com/> | Cleveland Region Principal Consultant - Systems Management & Operations From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Daniel Ratliff Sent: Thursday, June 5, 2014 2:29 PM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> Subject: [mssms] RE: Error installing a wireless profile only through configmgr Have you tried running it with psexec -s? See if you get the same error then you will know if its related to running as SYSTEM context. Daniel Ratliff From: listsad...@lists.myitforum.com<mailto:listsad...@lists.myitforum.com> [mailto:listsad...@lists.myitforum.com] On Behalf Of Jason Condo Sent: Thursday, June 05, 2014 2:24 PM To: mssms@lists.myitforum.com<mailto:mssms@lists.myitforum.com> Subject: [mssms] Error installing a wireless profile only through configmgr I'm really scratching my head on this one and hope maybe one of you can shed some light. Scenario: Installing a wireless profile via script for use in OSD or even after through a deployment. It executes the following command in batch file: Netsh wlan add profile filename="myprofile.xml" user=all If I execute this from a deployment, it fails stating the profile is corrupt (Profile Format Error 0×80420011 The Network Connection Profile Is Corrupted). However, before you say it is the profile file, if I then open a console window (as user or as admin) and run netsh or the batch directly from the ccmcache using the xml file from the ccmcache and it works. I have tried numerous different scenarios for program options trying to get it to work and all of them say the profile is corrupt. Things I have tried: * Program install during OSD task sequence, Program runs cmd /c mybatch.bat >>mylog.log as administrator, whether or not logged on, no interaction - logs that it runs as computer account - fails * Program install during OSD task sequence, Program runs mybatch.bat as administrator, whether or not logged on, no interaction - logs that it runs as computer account - fails * Execute Command during OSD task sequence, step executes Netsh wlan add profile filename="myprofile.xml" user=all from package - fails * * Program runs cmd /c mybatch.bat >>mylog.log as administrator, whether or not logged on, no interaction, available deployment to user - logs that it runs as computer account - fails * Program runs cmd /c mybatch.bat >>mylog.log as administrator, user logged on, with interaction, available deployment to user - logs that it runs as computer account - fails * Program runs cmd /c mybatch.bat >>mylog.log as user, only logged on, available deployment to user - logs that it runs as user account - fails * * Program runs mybatch.bat as administrator, whether or not logged on, no interaction, available deployment to user - logs that it runs as computer account - fails * * Program runs Netsh wlan add profile filename="myprofile.xml" user=all as administrator, whether or not logged on, no interaction, available deployment to user - fails * Program runs Netsh wlan add profile filename="myprofile.xml" user=all as user, only logged on, available deployment to user - fails * * From Run, run cmd /c "C:\windows\ccmcache\<folder>\mybatch.bat" >>"%temp%\mylog.log" - non-admin user logged in - succeeds * From console window, run Netsh wlan add profile filename=" C:\windows\ccmcache\<folder>\myprofile.xml" user=all - non-admin user logged in - succeeds * From console window, run "C:\windows\ccmcache\<folder>\mybatch.bat" >>"%temp%\mylog.log" - non-admin user logged in - succeeds I am really baffled as to why, even running in the user context interactively, that is fails when ConfigMgr 2012 kicks it off. There are other ways this can be done through GPO or login scripts or even ConfigMgr Compliance Settings (which work fine for Win8 systems), but they only want this for new deployments coming from OSD and now this is a challenge for me to understand. Jason Condo | Bennett Adelson<http://www.bennettadelson.com/> | Cleveland Region Principal Consultant - Systems Management & Operations The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information.