He uses pushd to map a drive to the current folder.

That should theoretically work. I’d would prefer using %~dp0 though as you
suggested.

 

-R

 

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Daniel Ratliff
Sent: Donnerstag, 5. Juni 2014 20:58
To: [email protected]
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: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Jason Condo
Sent: Thursday, June 05, 2014 2:41 PM
To: [email protected] <mailto:[email protected]> 
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 |  <http://www.bennettadelson.com/> Bennett Adelson | Cleveland
Region

Principal Consultant – Systems Management & Operations

 

From: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Daniel Ratliff
Sent: Thursday, June 5, 2014 2:29 PM
To: [email protected] <mailto:[email protected]> 
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: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Jason Condo
Sent: Thursday, June 05, 2014 2:24 PM
To: [email protected] <mailto:[email protected]> 
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 |  <http://www.bennettadelson.com/> Bennett Adelson | 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.

 




Reply via email to