+ Post New Thread
Results 1 to 10 of 10
How do you do....it? Thread, How can I stop a locally installed program running at start across whole network? in Technical; I have just moved our print control software, Papercut, from one server to another . My problem has come after ...
  1. #1
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,416
    Thank Post
    445
    Thanked 53 Times in 47 Posts
    Rep Power
    25

    How can I stop a locally installed program running at start across whole network?

    I have just moved our print control software, Papercut, from one server to another .
    My problem has come after what I thought would be the hard bit.
    I have a locally installed program that runs at start up which connects to the old server to give users their printing balance.
    My new install runs straight from a share so that is no problem.

    Can anyone suggest how i can disable this program from running across all my clients?

    Thanks

  2. IDG Tech News
  3. #2


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    4,900
    Thank Post
    172
    Thanked 654 Times in 566 Posts
    Rep Power
    206
    Code:
    if exist "c:\Documents and Settings\All Users\Start Menu\Programs\Startup\my shortcut.lnk" del "c:\Documents and Settings\All Users\Start Menu\Programs\Startup\my shortcut.lnk" /q
    startup script for a week or so should do it (if its vista /7 just add a 2nd line with appropriate file location)

  4. Thanks to sted from:

    reggiep (19th April 2011)

  5. #3
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,416
    Thank Post
    445
    Thanked 53 Times in 47 Posts
    Rep Power
    25
    Thanks Sted, Unfortunately it isn't in the startup folder

    I can see it when I run msconfig. I can disable it there but I don't want to have to run round every machine!!

  6. #4

    Hightower's Avatar
    Join Date
    Jun 2008
    Location
    Cloud 9
    Posts
    4,920
    Thank Post
    494
    Thanked 690 Times in 444 Posts
    Rep Power
    239
    Can you not do this using Group Policy Preferences on S2008?

  7. Thanks to Hightower from:

    reggiep (21st April 2011)

  8. #5

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,256
    Thank Post
    302
    Thanked 415 Times in 387 Posts
    Rep Power
    159
    Try this:

    Code:
    const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
    
    KeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\DONTKNOWWATTHISISCALLED" 
    
    Return = objReg.DeleteKey(HKEY_LOCAL_MACHINE, KeyPath)
    If (Return = 0) And (Err.Number = 0) Then    
        Wscript.Echo "Key Delete Complete!!!"
    Else
        Wscript.Echo "Key Delete Failed!!! Error = " & Err.Number
    End If
    Obviously can remove the echo's, and "YOU NEED" to change the path to whatever it's called :P Don't know what papercut is regged under.

    Might want to check it before deploying, but think it's right.

    Steve

  9. Thanks to Steve21 from:

    reggiep (20th April 2011)

  10. #6
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,416
    Thank Post
    445
    Thanked 53 Times in 47 Posts
    Rep Power
    25
    @Steve21
    I grabbed your vb script and edited it so it now looks like this...
    const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

    KeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Cur rentVersion\Run\PaperCut NG Client"

    Return = objReg.DeleteKey(HKEY_LOCAL_MACHINE, KeyPath)
    If (Return = 0) And (Err.Number = 0) Then
    Wscript.Echo "Key Delete Complete!!!"
    Else
    Wscript.Echo "Key Delete Failed!!! Error = " & Err.Number
    End If
    However I get an error = 0

    Do I need to put the papercut bit in extra quotes?

    Screenshot
    Last edited by reggiep; 21st April 2011 at 12:21 PM.

  11. #7

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,256
    Thank Post
    302
    Thanked 415 Times in 387 Posts
    Rep Power
    159
    One sec, realised I was dumb when I wrote a line of that. Lemme fix it.

    Steve

  12. #8

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,256
    Thank Post
    302
    Thanked 415 Times in 387 Posts
    Rep Power
    159
    Code:
    const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set objReg=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
    
    
    KeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" 
     
    Return = objReg.DeleteValue(HKEY_LOCAL_MACHINE, KeyPath, "PaperCut NG Client")
    If (Return = 0) And (Err.Number = 0) Then    
        Wscript.Echo "Key Delete Complete!!!"
    Else
        Wscript.Echo "Key Delete Failed!!! Error = " & Err.Number
    End If
    Try that, Was trying to delete the key rather than a value :P (Also check that name PaperCut NG Client is right, as when you posted it it added lots of random spaces)

    Shout if that works,

    Steve

  13. Thanks to Steve21 from:

    reggiep (21st April 2011)

  14. #9
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,416
    Thank Post
    445
    Thanked 53 Times in 47 Posts
    Rep Power
    25
    Thanks Steve, You are a wonder.
    That worked perfectly.

  15. #10

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,256
    Thank Post
    302
    Thanked 415 Times in 387 Posts
    Rep Power
    159
    Quote Originally Posted by reggiep View Post
    Thanks Steve, You are a wonder.
    That worked perfectly.
    Cool, no problems.

    Yeah I was being stupid, deleteKey deletes the "folder" aka if it was a PaperCut folder next to the Run folder :P

    Needed Value for the "string" as such.

    Any other problems, just gimme a shout or PM

    Steve

SHARE:
+ Post New Thread

Similar Threads

  1. Shared Start Menu based on what's installed!
    By deano in forum Windows 7
    Replies: 99
    Last Post: 19th October 2012, 12:14 PM
  2. Service start and stop
    By JPS in forum Scripts
    Replies: 3
    Last Post: 5th November 2010, 10:43 AM
  3. Replies: 2
    Last Post: 4th October 2009, 09:07 PM
  4. Create shortcut to a program that isn't installed on server
    By katem in forum How do you do....it?
    Replies: 10
    Last Post: 26th March 2007, 11:23 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •