+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Batch file to edit registry in Coding and Web Development; Hi there. I am currently trying to edit a login script batch file in order to change the decimal value ...
  1. #1
    Shrimpersfan's Avatar
    Join Date
    Feb 2008
    Location
    Peterborough
    Posts
    52
    Thank Post
    9
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Batch file to edit registry

    Hi there.


    I am currently trying to edit a login script batch file in order to change the decimal value of a registry key.


    This is the text for my batch file (actual server names have been replaced with ServerName):-

    net use p: /delete
    net use q: /delete
    net use t: /delete
    net use p: 'serverName'
    net use q: 'serverName'
    net use t: 'serverName'


    regedit /s \\128.54.12.17\netlogon\Del_disableditems.bat
    /**regedit.exe /s ScheduleContactManager.reg**/

    ftype MSPaper.Document="C:\Program Files\Common Files\Microsoft

    Shared\MODI\11.0\MSPVIEW.EXE"
    assoc .tif=MSPaper.Document
    ftype MSPaper.Document="C:\Program Files\Common Files\Microsoft

    Shared\MODI\11.0\MSPVIEW.EXE"
    assoc .tiff=MSPaper.Document

    This login script is currently used for when certain users log in, i added the part marked with /** **/.

    The .reg file is saved in the same folder as the .bat file, I have gone into AD and changed my logon script to this newly created one but it doesn't seem to edit the registry when i log back in.

    Any ideas would be very welcome.

    David

  2. #2
    DrPerceptron's Avatar
    Join Date
    Dec 2008
    Location
    In a house
    Posts
    849
    Thank Post
    32
    Thanked 120 Times in 102 Posts
    Rep Power
    37
    Does it import if you add it manually?

    you could try bolting a pause at the end and asking Group Policy to show logon script in process should tell you stuff.

    I think (not sure, was a while ago) that I had problems with importing stuff into the registry because group policy denied access to it for students, so I had to come up with an alternative solution - I added it to the mandatory profile.

  3. #3
    bio
    bio is offline
    bio's Avatar
    Join Date
    Apr 2008
    Location
    netherlands
    Posts
    520
    Thank Post
    16
    Thanked 130 Times in 102 Posts
    Rep Power
    37
    I think you should add the full path name before ScheduleContactManager.reg

    bio..

  4. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,235
    Thank Post
    2,775
    Thanked 937 Times in 877 Posts
    Rep Power
    343
    Quote Originally Posted by Shrimpersfan View Post
    Hi there.


    I am currently trying to edit a login script batch file in order to change the decimal value of a registry key.


    This is the text for my batch file (actual server names have been replaced with ServerName):-

    net use p: /delete
    net use q: /delete
    net use t: /delete
    net use p: 'serverName'
    net use q: 'serverName'
    net use t: 'serverName'


    regedit /s \\128.54.12.17\netlogon\Del_disableditems.bat
    /**regedit.exe /s ScheduleContactManager.reg**/
    Im not brilliant with bat scripts as have not really played around with them much but shouldn't the following line

    Del_disableditems.bat

    Be a .reg file extension ?

    Just at the start of the line is regedit ( I mean unless you are using the del_disableditems.bat to call the reg file or something ( not sure )

  5. #5
    Shrimpersfan's Avatar
    Join Date
    Feb 2008
    Location
    Peterborough
    Posts
    52
    Thank Post
    9
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ok so this morning i played around again and i seemed to have this fixed. However, i need to modify the registry within a citrix environment.

    I have tried this but without success, the registry changes on my local machine when i log in but not when i log in to a citrix session. Both my local login and citrix login are using the same login script.

SHARE:
+ Post New Thread

Similar Threads

  1. Getting a batch file to react to a registry key
    By Wheelgunr in forum Windows
    Replies: 5
    Last Post: 12th September 2008, 05:23 PM
  2. Batch file to remove registry key doesnt work
    By sidewinder in forum Windows
    Replies: 4
    Last Post: 7th December 2007, 04:48 PM
  3. PDF file edit
    By danIT in forum General Chat
    Replies: 2
    Last Post: 20th September 2006, 09:00 AM
  4. Edit registry remotely?
    By SYSMAN_MK in forum Windows
    Replies: 5
    Last Post: 3rd April 2006, 11:28 AM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 07:48 PM

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
  •