Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

An Issue From Work


  • Please log in to reply
17 replies to this topic

#1 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 25 March 2007 - 08:20 AM

At work we use a proxy server to access the web. When working on a customer's computer we have to change the proxy settings and then remember to change them back when we're done working. We have 2 .reg files that we click on to set and unset the proxy.

I've puzzled out several solutions for this - but I'm unable to find one that will do it unattended. Any suggestions? Since we shut the computers down when working on them, I'd like it to be run automatically once on reboot and then have the program/.reg files deleted.

I can do this with the Run Once key in the registry, but cannot escape the prompts for permission and confirmation when it's done. Any ideas?
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:12:20 AM

Posted 26 March 2007 - 03:42 AM

perhaps some sort of self deleting batch file in the startup folder?

#3 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,574 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:03:20 AM

Posted 26 March 2007 - 02:55 PM

Usasma, would something with quiet or silent switches work? I never did this, but various MS articles show how administrators can install stuff on multiple computers by including such switches. Whether this idea applies to home-brew setup, I wouldn't know.

#4 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad

  • Topic Starter

  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 28 March 2007 - 06:43 AM

Thanks for the ideas! I'll research them and get back with my results (if I ever get time!) :thumbsup:
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#5 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad

  • Topic Starter

  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 31 March 2007 - 09:19 AM

Still can't get the first .reg to run from the .bat file. I think it's got something to do with the syntax because I noticed that something changes my "\" to"\\" in the paths. Any ideas?

Still trying tho'!
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#6 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:12:20 AM

Posted 31 March 2007 - 06:44 PM

Perhaps some sort of magic spell and/or hex?

#7 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,574 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:03:20 AM

Posted 01 April 2007 - 08:06 PM

A puzzle indeed. Perhaps the magic spell is related to what's used as REGEDIT.
I have a setup.bat file which calls setup.reg written in REGEDIT4. All entries written in the setup.reg file use \\. They end up in XP registry with single \. And it all works just fine.
Normally on XP Windows Registry Editor Version 5.00 is used, and both syntax written in the .reg file and the resulting keys use just single \.

#8 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:12:20 AM

Posted 02 April 2007 - 02:30 AM

Can you post your batch file?

#9 tos226

tos226

    BleepIN--BleepOUT


  • Members
  • 1,574 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:LocalHost
  • Local time:03:20 AM

Posted 02 April 2007 - 09:27 AM

I just looked on computers at work. No messages with this syntax inside a standard, old fashioned .bat file
regedit /s "C:\....\someUpdate.reg"

AA - are you talking to me?
Contents of setup.bat for an application that uses java runtime
"setup.jar
setup.reg"
and setup.reg has all paths with \\ (not just initial UNC type), but it's the only file I have and don't have it at work. Perhaps that syntax was needed for some specific way of parsing. I just don't know.

#10 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:12:20 AM

Posted 02 April 2007 - 10:16 AM

No, sorry tos226, I wasn't. But thanks anyhow!

#11 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:12:20 AM

Posted 02 April 2007 - 10:18 AM

I've noticed that, sometimes, changing the .bat extension to .cmd can clear up some problems. Of course that won't help if you're using, like, Windows 95 or something.

#12 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad

  • Topic Starter

  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 03 April 2007 - 07:22 AM

I'm running late today, I'll post the .bat file later on this evening. Thanks! :thumbsup:
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#13 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad

  • Topic Starter

  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 04 April 2007 - 06:19 AM

Sorry I'm late - long night! :thumbsup:

AutoProx.bat:
regedit /v ProxyOn.reg
xcopy ProxyOff.reg %ALLUSERSPROFILE%\*.*
regedit /s DelProxy.reg

ProxyOn.reg:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable"=dword:00000001
"ProxyServer"="xxx.xxx.xxx.xxx:xxxx"

DelProxy.reg:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"ProxyOff"="regedit.exe /s %ALLUSERSPROFILE%\\ProxyOff.reg"
"DelProxy"="del %ALLUSERSPROFILE%\\ProxyOff.reg"

ProxyOff.reg:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable"=dword:0000000
"ProxyServer"=""

My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#14 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad

  • Topic Starter

  • BSOD Kernel Dump Expert
  • 25,091 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:03:20 AM

Posted 15 May 2007 - 03:54 PM

Just FYI - for some reason the xcopy command won't work. I suspect that it's trying to locate the ProxyOff.reg file in the "path" - but the file is actually on the thumb drive.

Any ideas on how to point it there?
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#15 JohnWho

JohnWho

    Who was running the store?


  • Members
  • 2,611 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Tampa Bay Area, Florida, USA
  • Local time:03:20 AM

Posted 15 May 2007 - 04:02 PM

did you ever run a "Path" command?

Example:

path=C:\;C:\dos


would set the path to the root directory of "C:" (C::\) and the dos directory on C: (C:\dos)


I know you think you understand what you thought I said,
but I'm not sure you realize that what you heard is not what I meant!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users