?
Solved

Turn off offline files via registry setting

Posted on 2007-03-13
12
Medium Priority
?
27,345 Views
Last Modified: 2007-12-19
In windows xp pro, is there a registry setting that can be used to simply turn off offline files?

Thanks,

Bill
0
Comment
Question by:w_marquardt
  • 6
  • 5
12 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18709902
Try this...

Start->Run->cmd /k reg add hklm\software\microsoft\windows\currentversion\netcache /v enabled /t reg_dword /d 0

That will disable them...
0
 

Author Comment

by:w_marquardt
ID: 18710594
Almost there. It works.. Yea! but I need to be able to run it from a batch file so that I can include it in a series of other updates that I'm doing at the same time. It also needs to run silent as well. The prompt whether to add the value messes up the process.

For my own education, I've been using a tool to modify the registry in a Windows Batch type mode (Macro Scheduler). When I open a command line window and run the code you provided, it works. When I put it into a batch file, it doesn't. Looking at the code, it looks like it's writing a '0' into the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache,Enabled Dword.

While I can write directly into the registry with Macro Scheduler, when I write a '0' into it does change it correctly, but offline files are still enabled. Can you tell me what else is going on in the code so I can learn what I'm missing?

Thanks,

Bill
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 1400 total points
ID: 18710612
Add this in a batch...doesn't get any more silent then this... ;^)

@reg add hklm\software\microsoft\windows\currentversion\netcache /v enabled /t reg_dword /d 0 /f

And you are correct on what it does...the added /f is to 'force' the change...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:w_marquardt
ID: 18711166
Hmm... Still not working (now not at all).

When I put the code into the batch file and add a pause command just to see what it did, it does show that 'the operation completed successfully.' If I check the registry setting, the dword has changed to '0' but the check mark is still in the Enable offline files box (tools / folder options / offline files (tab)). If I log off and log back on, it's still on.

Any idea on why this isn't working as expected (or what I'm doing wrong with the code?)

Thanks,

Bill
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18711654
I have a good idea...you are running this with limited user permissions?

HKLM must be modified using an Admin account...
0
 

Author Comment

by:w_marquardt
ID: 18713165
Nope, I'm both local and domain admin on the machine.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18724500
Perhaps it's in HKCU as well?

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/92773.mspx?mfr=true details this setting further.  Could it be that it's also set in group policy?
0
 

Author Comment

by:w_marquardt
ID: 18732087
I've always seen it work at the local machine level and not per user. I'll check on the machine when I'm in next (tomorrow). It might just be a hinkey machine. I'm going to add the change to the registry in my script and hope for the best. Worst case, I turn it off by hand (annoying but some projects are only worth so much time). At least it's only a 100 computers and not a 1000 <g>.

I'll assign the points after I check on the HKCU and update the answer here for future reference.

Thanks,

Bill
0
 

Author Comment

by:w_marquardt
ID: 18732108
One more think. Do you think the value '0' should be an integer or a string? Maybe that's my problem?

Thanks,

Bill
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18733465
No, it's definitely a dword value on that one...
0
 

Author Comment

by:w_marquardt
ID: 19069488
Sirbounty,

Sorry about the long delay on this. This was one of many clients I work with and I got pulled off the project. I just got back to it and it works fine on every computer except my test computer. Go figure...

Thanks for all the help.

Regards,

Bill
0
 

Expert Comment

by:roseki
ID: 22952568
You could actually create a policy that would accomplish the same thing, but allow you to turn it on and off for specific groups.  We turn it on for Laptop users and off for Workstation users; based on machine groups.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Each password manager has its own problems in dealing with certain websites and their login methods. In Part 1, I review the Top 5 Password Managers that I've found to be the best. In Part 2 we'll look at which ones co-exist together and why it'…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question