Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: question about net use


09 Jan 2012   #1

Windows 7 Home Premium 32bit
 
 
question about net use

I have a batch file as the following:
---
@echo off
start /B net use t: /delete
start /B net use t: https://dav.z.com password /USER:myname@mymail.com /persistent:no
---
I set up a task on task schedule to run it. If I let it run after user log in, it works fine. If I let it run whether user log in or not, it completed but nothing happened even highest privilege is ticked.

My System SpecsSystem Spec
.

09 Jan 2012   #2

Win7Ultimate x64 + x32, Win7Pro x64, XP x32, Win 2003, Ubuntu and OpenIndiana
 
 

You can't get there from here.

Drive mappings are account and logon specific. When NET USE is run by the task scheduler and no user it logged on, the drive will be mapped for whatever account the task scheduler used to run the command. This will be a system account.

If you want to map drives on every logon, put the batch file in a login script, in the all users component of the startup folder, or in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
My System SpecsSystem Spec
09 Jan 2012   #3

Windows 7 Home Premium 32bit
 
 

Thank you for providing the information. The problem is that is about a server, most time no one logon.
My System SpecsSystem Spec
.


10 Jan 2012   #4

Win7Ultimate x64 + x32, Win7Pro x64, XP x32, Win 2003, Ubuntu and OpenIndiana
 
 

Can you say what you're trying to do? Are you running some unusual software that runs as a service but can't use UNC paths and needs to see a mapped drive...or?

There's probably some way to do what you want if you can spell out what you need.
My System SpecsSystem Spec
10 Jan 2012   #5

Windows 7 Home Premium 32bit
 
 

Just a normal backup desktop application. I would like to backup directly to a remote webdav server. A webdav server cannot become a UNC.
My System SpecsSystem Spec
10 Jan 2012   #6

Win7Ultimate x64 + x32, Win7Pro x64, XP x32, Win 2003, Ubuntu and OpenIndiana
 
 

How is the backup app started? Does somebody login and start it or does it get triggered by the task scheduler? If you're using the task scheduler, net use should (I think) work if you use a batch file that maps your drives and then launches the backup program. All bets are off if the backup program impersonates another user after it's started, however.
My System SpecsSystem Spec
10 Jan 2012   #7

Windows 7 Home Premium 32bit
 
 

Great idea! I'll try it.
My System SpecsSystem Spec
Reply

 question about net use




Thread Tools



Similar help and support threads for2: question about net use
Thread Forum
Solved Thermal Paste Question..(Noobish Question) PC Custom Builds and Overclocking
Answer Question, Ask Question. Chillout Room
Solved Logitech 5.1 surround question and soundcard question IDT and Realtek Sound & Audio
Question BSOD Help and Support
ram question General Discussion
Question about being a IT Chillout Room

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:34 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33