?
Solved

What do 'REM' and '/persistent:no' mean in Windows Server 2003 .bat logon script files?

Posted on 2006-11-23
8
Medium Priority
?
3,129 Views
Last Modified: 2008-03-10
Hi there. I hope this is an easy one that some helpful person out there could help me clear up quickly :)

I'm editing someone else's Windows Server logon scripts, and I'd just like confirmation of 2 phrases recoocuring in the scripts. The first is 'REM'. My guess is that when this is put at the start of a line, it actually turns the line into a 'comment' as such, and the code on that line is ignored when the script is run. Am I right?

Secondly, what does the '/persistent:no' mean that is placed at the end of most lines in the scripts. Again I can hazzard a few guesses, but don't want to take chances.

Any help from anyone is greatly apprecaited :D

Bluemercury
0
Comment
Question by:bluemercury
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 16

Accepted Solution

by:
InteraX earned 668 total points
ID: 18003423
Hi bluemercury,

REM = Remark. Comment out a command so that it doesn't take effect.
Persistent:no = do not remember the mapping between log of and log on.

Good Luck,

Chris
0
 
LVL 3

Assisted Solution

by:Stekman99
Stekman99 earned 668 total points
ID: 18003430
REM is for REMARK and is just for information.

This is a fairly old KB but might give you the info you are looking for:
http://support.microsoft.com/kb/79809

Cheers,
Stefan
0
 
LVL 1

Author Comment

by:bluemercury
ID: 18003464
Thanks guys - that was an impressively quick response!!!

So Chris, just to check, when you say "do not remember the mapping between log of and log on" does this mean that any kind of drive letter mappings to network shares that may have been applied via a script are guaranteed to be forgotten by the system when the user the script applies to logs off? If 'persistent:no' wan't applied, would the system potentially remember things even if I changed elements in the script later?

Many thanks to both of you :)
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 664 total points
ID: 18003478
BTW you don't need persistent:no on all the individual entries more than likely.  I put this at the beginning of the script:

REM Turn off persistent drive mappings (don't keep them after reboot)
net use /persistent:no

Persistent drive mappings mean if the script never runs again it will still have the drive mappings on the users PC even after a reboot.  Problem with that is if you move anything around or users passwords change things get messy and you need to remove drive mappings in the login script with net use x: /delete  to remove the specific X: one or net use * /delete to delete all.

Anyway you already have answers to your actual questions above....

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 18003491
To answer your second Q if it hasn't been my post which crossed with yours.... by default yes a drive mapping will be remembered unless you add /persistent:no on Windows 2000/XP at least which is why I add a general "no" command to the beginning of the script to effect all mappings.

Steve
0
 
LVL 16

Expert Comment

by:InteraX
ID: 18003559
bluemercury,

I think dragon-it summed it all up for me. ;-)
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 18003595
Sorry, as is often the case around here, I started typing an answer, got called away and when submitted the other two had already got there.
0
 
LVL 1

Author Comment

by:bluemercury
ID: 18003652
You've all been really helpful guys. Just saw your link, Stekman99, for the Microsoft article as well, which is proving invaluable.

Thanks to all three of you - I will split the points 3 ways.

Now I've just got to decode this spralling script I've been represented with, and find out exactly what it is doing!!

Many thanks again - great help :)

Bluemercury
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 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