Skip to content

Trying to deploy a single commandline

Featured Replies

So I got a program running on 150 computers. now, this program contains a certain file in the windows user folder that I want to remove.

So I tried creating a package with no program folder, and just this commandline: del "C:\Users\%USERNAME%\AppData\Roaming\program\programcfg"

the commandline works, but as it work with the 'actively logged in user', I selected it to only run when user is logged in.
I then deployed it, but nothing happens though on the computers.. and I get this 'unknown' description

User: Not applicable
Description: No messages have been recieved
Message ID: 0
Status type: Uknown

 

 

I have 'NOT' attempted to create an application, my main problem is, this file is automatically generated just seconds after I delete it.
Which is on purpose, so I don't know how I would place a detection type on that.. since it leaves no traces of having been run other than
replacing a 'created date' on a file.

Is the problem because I use %USERNAME% ?? that seems to work though if I just manually run a script from the distribution point, so why not through config mgr?
Basicly, I just want to run this line on each computer 1 time: del "C:\Users\%USERNAME%\AppData\Roaming\program\programcfg"

I would personally use group policy preferences for individual file/folder deletions rather than SCCM. I don't think the %USERNAME% variable is going to help you?

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.