net-use

Equivalent of net use (to list computer's connections) in powershell?

痴心易碎 提交于 2019-12-22 04:42:39
问题 According to windows help NET USE, when used without options, lists the computer's connections. I'd like to find a way in powershell to get a list of the Remote entries in net use's output. I know that as an extreme measure I can parse the result of the "net use" command itself, but I'd rather not rely on the text output of that command. Can anybody help me out? thank you Michele Status Local Remote Network ------------------------------------------------------------------------------- OK \

Vista UAC - Trouble Mapping Network Drives

冷暖自知 提交于 2019-12-18 04:12:50
问题 We have an application that programmatically maps network drives. On Vista with UAC on, we get some strange issues. Our application maps the drive non-elevated, so if the user browses explorer and double clicks to run an exe, it prompts for UAC. So when they approve it, it prompts for a username/password for the share... Strange since the credentials are saved. It turns out, an elevated process cannot access a mapped drive that was mapped from a non-elevated process. To see this issue in

If statement in batch and app not recognized anymore

给你一囗甜甜゛ 提交于 2019-12-12 03:36:56
问题 I try to access some Excel data stored on a server and copy these files to another server ; the destination path should be different with the name of the file. Here is my code : setlocal enabledelayedexpansion net use Z: \\10.0.0.1\Statistiques set path=Z:\ set year=%date:~10,4% set month=%date:~4,2% set day=%date:~7,2% echo %date% for /f "delims=" %%a in ('dir *.xlsx /b /a-d "%path%" ') do ( set "name=%%~na" set folder=Empty if "!name!"=="!name:Client1=!" ( set folder=Client1 ) if "!name!"==

How to execute “net use” command from Inno Setup installer on Windows 7?

与世无争的帅哥 提交于 2019-12-08 02:58:15
问题 I'm working on an Inno Setup installer, which calls net use to connect to a shared server. The installer can connect to the server, if it's running on Windows XP, but not on Windows 7. I think it's related to UAC as I type the same command, the server is connected on Windows 7, but the setup is running with admin privileges. I'm using the following net use command through Exec or ShellExec script functions: /c net use \\servername password /user:username Actually, here is a part of the script

How to execute “net use” command from Inno Setup installer on Windows 7?

瘦欲@ 提交于 2019-12-06 06:38:47
I'm working on an Inno Setup installer, which calls net use to connect to a shared server. The installer can connect to the server, if it's running on Windows XP, but not on Windows 7. I think it's related to UAC as I type the same command, the server is connected on Windows 7, but the setup is running with admin privileges. I'm using the following net use command through Exec or ShellExec script functions: /c net use \\servername password /user:username Actually, here is a part of the script showing the net use command call: [Code] var ErrorCode: Integer; cmdString: String; intvalue: Integer;

Mapping an Azure File Service CloudFileShare as a virtual directory on each instance of a cloud service

送分小仙女□ 提交于 2019-12-02 07:15:36
问题 I have an azure cloud service which I am attempting to upgrade for high availability and I have subscribed to the Microsoft Azure File Service preview which has been enabled in the preview portal. I have created a new storage account and can see the storage account now has a Files endpoint located at: https://<account-name>.file.core.windows.net/ Within my web role I have the following code which looks to see if a share called scorm is created and if not it creates it: public static void

CFEXECUTE assigning it to run with administrator rights

安稳与你 提交于 2019-12-01 15:51:53
I am trying to change a password with active directory using cfexecute . The only code on my page is this (username and the new password are filled in): <cfexecute name="c:\windows\system32\cmd.exe" arguments="NET USER username password /domain" outputfile="C:\Users\administrator\Desktop\test.txt" timeout="90"> </cfexecute> When I tried running this code through dreamweaver on my pc the tab in my browser just kept spinning even after 5 min... I closed the tab went to the server logged in and the text.txt was there empty. But I am unable to delete it because it says coldfusion.exe is using it??

CFEXECUTE assigning it to run with administrator rights

不想你离开。 提交于 2019-12-01 14:47:58
问题 I am trying to change a password with active directory using cfexecute . The only code on my page is this (username and the new password are filled in): <cfexecute name="c:\windows\system32\cmd.exe" arguments="NET USER username password /domain" outputfile="C:\Users\administrator\Desktop\test.txt" timeout="90"> </cfexecute> When I tried running this code through dreamweaver on my pc the tab in my browser just kept spinning even after 5 min... I closed the tab went to the server logged in and

Vista UAC - Trouble Mapping Network Drives

戏子无情 提交于 2019-11-29 04:19:34
We have an application that programmatically maps network drives. On Vista with UAC on, we get some strange issues. Our application maps the drive non-elevated, so if the user browses explorer and double clicks to run an exe, it prompts for UAC. So when they approve it, it prompts for a username/password for the share... Strange since the credentials are saved. It turns out, an elevated process cannot access a mapped drive that was mapped from a non-elevated process. To see this issue in action, do the following steps: Run cmd.exe with no UAC Run "net use w: \yourHostname\yourShare /user

Why “net use * /delete” does not work but waits for confirmation in my PowerShell script?

时间秒杀一切 提交于 2019-11-28 20:07:07
I have a script where I want to disconnect from the mapped drives before I create a new PSDrive. Otherwise I get this error: New-PSDrive : Multiple connections to a server or shared resource by the same user , using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again So I have this line: net use * /delete (Unfortunately I could not find a way to disconnect from a specific mapped drive just by providing the server name so far :( ) When PS comes to this line You have these remote connections: \\ServerName\SharedFolder