Solved

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

Posted on 2006-11-23
8
2,671 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 16

Accepted Solution

by:
InteraX earned 167 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 167 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
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 166 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now