After modifying my "hosts" file I have appended the location for "testunc" to "127.0.0.1". When I type in the path "\testunc\share" into "Run" (I have a shared folder on my C:\ drive called "share") I receive an authentication prompt. I am asked for the credentials to the "Guest" account on my local machine. Though the "Guest" account does not have a password, it always fails.
I am coding an application locally for use on a standalone network. I need to simulate the UNC path locally so that I can see if the application will work on the actual network.
\127.0.0.1\share works great, \localhost\share yields the following alert: "You were not connected because a duplicate name exists on the network."
Edit & Answer
Since I only have 9 rep at the moment I can't self answer for 6 more hours. I will self answer later on. Answer is as follows:
Ok, figured it out. I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.
Self answering this one. Answer is also included in original question text.
I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.
Related
We just virtualized a Windows server in Azure and everything in working fine on Client side, but we are not being able to solve the indexing search problem.
When you have a local drive, Windows can index the path and searches works fine using Windows menu/search box in task bar. But for shared drives it seems to fail.
In Windows Explorer the search pretends to work, but it takes forever to find a file or folder. And sometimes it just won't move anywhere. So it is not an option for users since them are used to search using menu bar.
We have tried to change drive properties in Right button to Shared Driver > "Allow files on this drive to have contents indexed in addition to file properties, but it was already enabled.
When we try to disable it, it prompts an error saying that the user doesn't have permission to do it, but it does anyway. And when we try to re-enable, the message prompts again, but it is enabled with no problem at all. But once again, nothing changes and Initial Menu Search just won't work.
Does anyone knows if there is a solution for that?
For me it seems to be an server setup since I see that permission error, but, as far as I know, if the shared driver is already mounted, I can't see a reason why Windows can't index it.
Ps.1: In the shared drive security tab, the System has full permissions.
Ps.2: If there is a solution for this, is that possible to solve it on the Windows server Side so we won't need to access client by client to change it manually?
enter image description here
Please check the following setting and see.
1.First thing is to check network location is being indexed. open File Explorer right-click on the mapped network drive that you need to index, then select the Properties and Make sure that, the Allow Files on this Drive to Have Contents Indexed checkbox is selected.
You have already done this step
2.try to check the search options for network drive in file explorer, go to view tab>>click on Options Icon and choose the change folder and search option menu it will open the folder options dialog box and select search tab and make sure first option is not selected
3.check server side Indexing
4.we need to make sure search service needs to be running.
Open services.msc check for the wndows search service and try to restart the service.
5.Go to Settings on the Windows 10 desktop, then click on Search, followed by Searching Windows scroll down and try to run the indexer troubleshooter
Reference https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/fix-problems-in-windows-search
How do I edit Group Policy Object "Prevent installation of removable devices" (https://technet.microsoft.com/en-us/library/cc753539(v=ws.10).aspx) in CMD?
I have a server (Windows Server 2008 R2) that is locked out as I am unable to use keyboard or mouse to as input devices when the windows login requires me to press ctrl+alt+delete. This Policy is the one causing this locked out situation as the old keyboard and mouse which I am trying to solve.
Current situation only allows me to use CMD to make changes to the system when I boot up with a bootable CD.
My server doesn't have PS2 port for the old type keyboard. Any other solution that can help me solve this locked out situation is also welcome :)
"Prevent installation of removable devices" is part of "Administrative Templates" and therefore corresponds to a Registry key.
To find out that registry key, I searched for "Prevent installation of removable devices" within C:\Windows\PolicyDefinitions\en-US\, found <string id="DeviceInstall_Removable_Deny">Prevent installation of removable devices</string> in C:\Windows\PolicyDefinitions\en-US\DeviceInstallation.adml. Then I searched for DeviceInstall_Removable_Deny in C:\Windows\PolicyDefinitions\ and found it in C:\Windows\PolicyDefinitions\DeviceInstallation.admx. The registry key is:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions
valueName: DenyRemovableDevices
enabled Value: decimal 1
disabled Value: decimal 0
If you change that value, it will be overridden when the group policy is applied the next time -- most likely at boot time.
According to http://learnthat.com/prevent-group-policy-from-applying-to-your-computer/ you can avoid this by denying write permissions to that specific registry key. (Note, I did not test this!)
To change the registry offline, you can boot from a windows install CD, press Shift+F10 simultaneously to open cmd, type regedit, select HKEY_LOCAL_MACHINE key, click Menu File -> Load Hive..., navigate to your installations \Windows\System32\Config\ folder and select the file named SOFTWARE.
Chose any key name, that doesn't already exist (e.g. Offline_Software) and then change the registry under that key. (e.g. HKEY_LOCAL_MACHINE\Offline_Software\Policies\Microsoft\Windows\DeviceInstall\Restrictions)
When you're done, select your loaded Hive (e.g. HKEY_LOCAL_MACHINE\Offline_Software) and click File -> Unload Hive...
To shutdown properly, just close all windows, including the setup window.
I have just set up a Guest Windows 2008 R2 Standard Edition 64bit (VirtualBox on Windows 7 64 bit host) for some testing.
I have found that while "inside" the remote desktop environment (i.e. I remote onto the guest ip from the host) that copy and paste does not work. When I say "does not work" let me be explicit.
Assume I am logged onto the Win2008 machine via RDC
Nothing is in the copy/paste buffer. I can mouse click some text and then rclick copy. I can then right click and click "paste" but nothing happens. I can see the "choice" is enabled to paste bu nothing happens. The caret stays put.
CTRL+C / CTRL-V / CTRL-X does not work in RDC land
I am not talking about going in-between copy/paste RDC land/host land.
HERE is the double whammy: when I do the above it then "infects" my host pc so that copy paste is unavailable there too. if PRT SCR doesn't work any more.
I have tried:
restarting the guest os and host os
in group policy editor I have disabled "do not allow clip board redirection" ( I can't give you the full path to this copy/paste just broke again)
I have made sure that in RDC "options" for local resources include clipboard.
NB: if I don't touch RDC at all and log into the guest OS via the console copy paste works perfectly
Kill the rdpclip.exe process using the Task Manager. Then, create a new process named rdpclip.exe. This will solve your problem.
Follow these steps in Remote Machine.
Stop the rdpclip process
Open Task Manager.
Go to process tab and find rdpclip
Choose rdpclip and End that task.
Start rdpclip.exe
Go to start menu and open Run command
Open rdpclip.exe and click Ok button.
Copy paste should work now.
it appears this is a flaw with VirtualBox
these posts covers it
https://forums.virtualbox.org/viewtopic.php?f=6&t=44498 (read the last post)
https://github.com/FreeRDP/FreeRDP/issues/230
(In VirtualBox) SETTINGS->GENERAL->[Advanced]->Shared Clipboard {disabled}
There are multiple things to check.
Restarting rdpclip.exe is a worthy try if the copy/paste fails sporadically, meaning we might on a process in a previous session.
On the client side, we check the RDP Options. Click on the Show Options button in the bottom, pick the third tab Local Resources. Make sure Clipboard is checked.
On the remote server side, we want to check Remote Desktop Session Host Configuration (Win Server 2008+).
Double click the connection to open its Properties window.
In the tab named Client Settings, Make sure Clipboard is not disabled.
We need to log off from the remote desktop.
Workaround
Use an online shared text box like this one:
https://pastebin.com/
I have a VB6 application which links to several POS terminals from a Windows 7 32-bit machine. The POS terminals are mapped to the Windows 7 machine and I can access the POS terminals from the Windows 7 machine from Explorer or via the cmdline/shell.
The application has been updated to ADO 2.8 and all other controls and components I no longer had source code for have been re-written. After a few annoying hiccups, I got the application to recompile on the Windows 7 computer without errors.
Now come the problems. The VB6 application cannot see or navigate to any mapped drives! I have tried twiddling UAC settings; I have set the app to run in Windows XP SP3 mode; I have tried running as Administrator. None of these things (and many permutations of these) work.
Any suggestions on how to make this work?
Adding this registry setting solved the problem for me: http://technet.microsoft.com/en-us/library/ee844140%28v=ws.10%29.aspx.
To work around this problem, configure the EnableLinkedConnections
registry value. This value enables Windows Vista and Windows 7 to
share network connections between the filtered access token and the
full administrator access token for a member of the Administrators
group. After you configure this registry value, LSA checks whether
there is another access token that is associated with the current user
session if a network resource is mapped to an access token. If LSA
determines that there is a linked access token, it adds the network
share to the linked location. To configure the EnableLinkedConnections
registry value
Click Start, type regedit in the Start programs and files box, and
then press ENTER.
Locate and then right-click the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.
Point to New, and then click DWORD Value.
Type EnableLinkedConnections, and then press ENTER.
Right-click EnableLinkedConnections, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor, and then restart the computer.
I believe you are having trouble because casual drive mapping is per-user, and on a UAC system Administrators group users have two separate contexts (one for each token: SU & elevated).
There is such a thing as a system level drive mapping, which is one done under the System user (NT Authority\System). When you map a drive under this account, and map it persistently, all users can see and use the mapping (subject to the usual access rights for files there).
The normal way you do this is via Domain-level GPOs (Group Policy Objects), which means bribing your local box jockeys if in a corporate managed LAN environment.
One way to do this in a Workgroup machine is to map the letter as System via the AT command, from an elevated command prompt:
at 8:53 am "net use m: \\MediaShare\MyLibrary
ThePW /user:MediaShare\TheUser /persistent:yes > nul"
There the remote server is MediaShare, user TheUser, password ThePW, and 8:53 AM is a minute or two in the future to avoid accidentally scheduling this for tomorrow.
But this fails on Vista and later due to Session 0 Isolation!
So... use the 3rd alternative at Run CMD.exe as Local System Account which is the same thing mentioned by ForcePush's reply to How to map a network drive to be used by a service.
I believe that's what you are after here.
don't know if you ever figured this one out but for me it was the ChDir command (even with the registry fix above).
I had in my code
ChDir "P:\Temp\VidCap\Cam1\" 'I almost never use ChDir
Open "list.txt" For Output As #1
and all the VB6 inbuilt file commands looked straight though any operations, no errors, no nothing. I solved it by explicitly having the path, (in my code it was in a string but you could have it explicitly):
dd = "P:\Temp\VidCap\Cam1\"
Open dd & "list.txt" For Output As #1
works as expected.
hope this helps
H
Try this:
Open command prompt as administrator, and type this in:
net use Z: \\IP Address\share /user:you passwd /persistent:Yes
Change "IP Address", the "share" name, and your username and password as needed.
The author of this is howtogeek (source).
I had same problem. VB6 kept crashing when trying to access USB and mapped drives using the Commondialog method, even though the drives and files were all accessible OK via Explorer. Problem is the drives were not set as shared.
Solved by selecting the connected USB drive in explorer and then right click to
select Properties.
Select Sharing Tab
Select Advanced Sharing
Set the sharing and user rights as needed. May need to have local admin rights.
I am researching ways to auto login to a windows server, so applications can be restarted on reboot if the server crashes. Do windows services load before or after a user logs in? Can a windows service be used to login to an account?
If not, is there any way to use some sort of login script to facilitate automatically loggin in?
For auto login. Here is one of them:
To use Registry Editor (Regedt32.exe) to turn on automatic logon, follow these steps:
Click Start, and then click Run.
In the Open box, type Regedt32.exe, and then press ENTER.
Locate the following subkey in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK.NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
On the Edit menu, click New, and then point to String Value.
Type DefaultPassword, and then press ENTER.
Double-click DefaultPassword.
In the Edit String dialog, type your password and then click OK.
NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press ENTER.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
Quit Registry Editor.
Click Start, click Shutdown, and then type a reason in the Comment text box.
Click OK to turn off your computer.
Restart your computer. You can now log on automatically.
Taken from: http://support.microsoft.com/kb/324737
Services run regardless of whether a user logs on. If you need an application to run all the time, have you considered converting it to a service? Auto-logon is a security risk.
Windows Services do load before user logins. A Windows service cannot be used to login to an account, but you can specify the account to run the service under. You can setup automatic login in the registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. AutoAdminLogon, DefaultUserName, DefaultPassword, DefaultDomainName, and ForceAutoLogon are the keys you will need to set. They are all strings.
P.S. This is more a Server Fault \ Super User question.
Services start before login.
And rather than using a service to log into an account, why not just set the account to auto log in?
http://www.expta.com/2008/03/how-to-enable-autologon-in-windows.html.
*edit*Beaten to it*
I have tested it on:
WIN10 updated Jan-2016
WIN7 updated Jan-2016
And it works!
I use this .REG file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultDomainName"="DOMAINNAME"
"DefaultUserName"="USERNAME"
"DefaultPassword"="PASSWORD"
Extracted from: http://www.sysadmit.com/2016/01/windows-configurar-autologin.html
Maybe systinternals/autologon.exe should be mentioned here.
It has a very simple gui and can also be used by command line only.
I guess it does the registry entry in the background.