Jump to content


Kops

Run Elevated Command Prompt during OSD

Recommended Posts

I would like to add a step to my task sequence to copy a couple of files from the SCCM distribution point to the C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories folder. This should be a fairly easy task but this can only be done using an elevated (run as administrator) command prompt. The command looks something like...

 

copy "\\SCCM\Sources\Shortcuts\Internet Explorer.lnk" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories"

 

Is there an easy way to do this that I'm missing? I'm open to other ideas. I've even tried mounting the .wim file using DISM and trying to add the files that way, but I can't seem to browse the folder structure even once the .WIM is mounted.

Share this post


Link to post
Share on other sites

Hey Garth,

 

Not sure I follow. Are you recommending making a Package/Program for this? I could do that...but I think that I would end up creating a program that runs a script to perform the same operations. Would you expect that to be successful where the 'run cmd line' task might fail? If you meant something else maybe you can elaborate for me?

 

I'll try to whip something up using packages/programs while I await some clarification..

 

Thanks for the input!

Share this post


Link to post
Share on other sites

Yes, I'm say you should use a Package/program for this.

 

Your command as it sits will fail 100% of the time if you try to copy files using CMD. The reason for the failure is the UNC, When you execute the CMD it executes as local system. This account will NOT have access to the UNC and therefore will fail.

 

This will NOT fail if you use a package/program, as long as the source files are within the package.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.