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
datactrl

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
Solidwave

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
datactrl

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
Solidwave

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
datactrl

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
Solidwave

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
datactrl

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
Thread Forum
Question about SSD's
I saw these comments on a site about SSD's , is the below comments true ? I was hoping to use the SSD as my primary drive , i don't store much . Thank you
Hardware & Devices
Thermal Paste Question..(Noobish Question)
Hey guys, I recently purchased Corsair H40 that came with pre applied thermal paste. Before I placed the H40 sink on my processor, I applied a thin layer on the on the processor with Cooler Master thermal paste. So essentially I mixed the H40 pre applied thermal paste with the Cooler Master thermal...
PC Custom Builds and Overclocking
WEI Question
Hey guys, I went into my system properties to get into something today, but when i did it prompted that i needed to re-rn the assesment. I did so and my graphics score went from a 7.4 down to a 6.9. Would this be caused from me running display fusion on my system to allow me to do certain...
Performance & Maintenance
RAM Question
I will probably be getting this motherboard Gigabyte GA-Z68A-D3H-B3 rev. 1.0 Socket 1155 ATX Motherboard Intel Z68 Express Intel Core i7 i5 i3 LGA1155 Processors, Dual DDR3 2133 SATA III SATA 6.0 Gb/s Gigabit LAN SLI CrossFireX USB3.0 HDMI DVI 7.1 Channels Audio-Best Computer Online Store Hous I...
Hardware & Devices
Answer Question, Ask Question.
First (hope you get the reference): In a world where a piano is a weapon, not a musical instrument, on what does Scott Joplin play "The Maple Leaf Rag"?
Chillout Room
Logitech 5.1 surround question and soundcard question IDT and Realtek
So my situation is unique lol i have a Dell inspiron n5010 laptop running Windows 7 ultimate 64 bit the soundcard for this is either IDT 92HD79B1, v.6.10.0.6267, A01 or A03 i dont know what the default one mine came with is. Documentation i hope that helps ^ and the attatchment i...
Sound & Audio

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 19:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App