How can I bypass this message when starting the .exe with cmd? - cmd

i got following cmd command, i want to start an .exe installer with this, but when i execute it the message after it pops up.
START "DSM-Agent setup..." /WAIT /D %PATH% InstallClient.exe
The Message:
I already tried adding domains or something to the registry but nothing worked.
This is in an automation script, so the message is very deal breaking.
I hope someone can help me.
Additional Info:
The script should run on Windows Server OS
The exe is on another server

Are you running it from a network location?
This is the reason for the message.
The network share is not trusted by your computer, so it warns you.
You need to add the network server to your trusted servers:
In Internet Explorer:
Internet Options → Security tab
Local Intranet → Sites
Check Automatically detect intranet network
Advanced → Add this website to the zone:
Enter → file://path → OK
** You need to restart explorer.exe for the changes to take effect

Related

IIS Manager in Windows 10

How do you open IIS (Internet Information Services) Manager using Windows 10?
I have installed the developer preview of Windows 10 and can't seem to find IIS Manager? It is not in Control Panel > Administrative Tools.
When I browse to the
folder C:\Windows\System32\inetsrv
it is empty.
I did a full search of my hard drive to find inetmgr.exe and found three copies and none of them would open, when I tried to open them it says "This App cannot Run on your PC" To find a version of the App that works contact the publisher.
I know IIS works because I have ran local ASP.net apps through VisualStudio, but I can't seem to find any way to launch IIS Manager to do some configurations for a site.
Anyone know anything about this?
Thanks to #SLaks comment above I was able to turn on IIS and bring the manager back.
Press the Windows Key and type Windows Features, select the first entry Turn Windows Features On or Off.
Make sure the box next to IIS is checked.
If it is not checked, check it. This might take a few minutes, but this will install everything you need to use IIS.
When it is done, IIS should have returned to Control Panel > Administrative Tools
Under the windows feature list, make sure to check the IIS Management Console
You also need to check additional check boxes as shown below:
Actually you must make sure that the IIS Management Console feature is explicitly checked. On my win 10 pro I had to do it manually, checking the root only was not enough!
#user1664035 & #Attila Mika's suggestion worked. You have to navigate to Control Panel -> Programs And Features -> Turn Windows Features On or Off. And refer to the screenshot. You should check IIS Management console.
Run appwiz.cpl - brings up Programs and Features
Choose "Turn Windows Features On/Off"
Select the IIS Services you need
after turning IIS on (by going to Windows Features On/Off) type inetmgr in search bar or run
To install the IIS Management Console under Windows 10 using Powershell with RSAT installed:
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementConsole -All
Credit and thanks to Mikhail's comment above.
It most likely means that IIS Management Console was not installed, and modern Windows administrator/IT pro should be able to quickly check this by issuing this command:
Get-WindowsFeature *Web*
And if it is missing just quickly add this via the following command:
Add-WindowsFeature Web-Mgmt-Console
GUI options mentioned above are also valid (see answer from #Joe Wu) but PowerShell it is best way to do IT for IT Pro or let's put it as "if you have to do this slightly more often than once a year" :)
Press the Windows Key and type Windows Features, select the first entry Turn Windows Features On or Off.
Make sure the box next to IIS is checked. You good to go.
Launch Windows Features On/Off and select your IIS options for installation.
For custom site configuration, ensure IIS Management Console is marked for installation under Web Management Tools.
I arrived here because I was having the same issue.
If you are here and everything above didn't work, it's likely that you butchered your path somehow.
Go to System -> Advanced System Settings -> Advanced -> Environment Variables -> Machine or User and add the following entry to the end, or append to the existing, separating with a semi-colon:
C:\Windows\System32\inetsrv
After closing and opening your shell, you should now be able to access inetmgr from the command line.

Google Drive as Service or background operation

I have a server thats does automatic backups, now i need to sync that backup files to google drive, but i dont want to login every day into windows server so google drive make the sync.
¿Does anyone know a way to sync or script to upload in background without user interacction?
Well i figured out, so i am posting for everyone who needs to run google drive sync app without enter to windows:
create a sheduled task with action start program pointing to: C:\Program Files (x86)\Google\Drive\googledrivesync.exe
add argunment: /autostart
mark execute to run if the user has not logged in
i have also marked execute with higher privileges
the trigger is at system starts with a delay of 30 seconds, it is very important to make a delay!
uncheck the option thats stops the task if it runs for more than x days, this is because google sync is always running in background.
now i have to copy the backups files to google drive folder with and cmd script + sheduled task.
If you are running on a Windows Server 2003 you can try the following to run Drive as a Service:
Download and install Windows Server 2003 resource kit which can be found here
Open a command prompt and run the following:
C:\Program Files (x86)\Windows Resource Kits\Tools>instsrv GoogleDrive "c:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe"
Next is to change the user for witch the newly added service “GoogleDrive” runs under. Change this to Administrator.
Type the following command in the command prompt to open the services snap in console:
services.msc
Choose properties on GoogleDrive service.
Click on tab “Log On”
Click “This account”, and select Admimistrator. Set appropriate password.
Click Apply and OK
Next is to setup some registry settings for the service. Open the registry editor by typing the following command into the command prompt:
regedit
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\GoogleDrive
Create a new key “Parameters”
Add a new string value “Application”, (type REG_SZ). Set the value to the path to C:\Program Files (x86)\Google\Drive\googledrivesync.exe /autostart.
Close Registry Editor
Go back to Services, and start the GoogleDrive service
This was adapted from an article about running Dropbox as a service which can be found here.
Essentially the process is to create a Windows service using the 'srvany.exe' which is a Windows service wrapper that will run any program as a service.

BGInfo error occurred opening the Default Desktop registry key

Running the very nice BGInfo tool to uniquely identify various computers. However, in trying to run on Windows 2008 Server R2, I am getting following error:
"An error occured opening the Default Desktop registry key. Please ensure the current user has rights to change the Logon Desktop settings: Access is denied."
The program is started via a shortcut placed in "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup", and that shortcut is specifying a .BGI configuration file (versus reading settings from the Registry). Thoughts on why the error happens for user other than the Administrator?
On a more in-depth level, I am curious if anyone knows why BGInfo must open the "default desktop registry key" and what it is updating in the "logon desktop settings" (phrase in quotes taken from the original error message)?
BGInfo needs to update the registry to set a default login desktop for all RDP users.
You need to run BGInfo with elevated privileges initially. That can be done as described by creed929 or by right-clicking on bginfo.exe and running as administrator. Once the settings are saved, subsequent user logins will not need the elevated privilege to see the BGInfo background.
From an administrator account. I was able to right click on bginfo.exe. Go to Compatibility tab and check the Run this program as an administrator. This seemed to then allow me to apply the settings without the Default Desktop registry key error.

Windows 2008 Remote Desktop will not copy+paste

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/

Can't add new Redirected Port in Windows 7 after installing RedMon

My operating system is Windows 7 32bit. I installed RedMon1.7, Ghostscript 8.71 and GSview 4.9; installations were successful.
I went to Add New Local Printer in Windows Devices and Printers, clicked on Create A New Port, and selected Redirected Port from the Type of Port list. Clicked Next and in the Add New Port window I named RPT1: and clicked OK but it says Specified port cannot be added. Operation could not be completed (error 0x00000001)
I tried giving different names to the port, RPT2:, RPT4:, VPport: etc but all gave same result. Disabled Windows Firewall and tried but it continues to give same error, Disabled the Antivirus (Avira) but no change.
What can be preventing windows 7 from adding redirected port?
BTW I was following instructions in this tutorial in order to create a postscript printer.
http://www.stat.tamu.edu/~henrik/GSPSprinter/GSPSprinter.html
Appreciate any ideas or suggestions. Thanks
Run cmd.exe as Administrator and then run:
rundll32 printui.dll,PrintUIEntry /il
from the elevated cmd.
Go to your Start Menu,
Type Print,
Right-Click "Print Management",
Select "Run as administrator",
In Print Management; Expand "Print Servers" and Select "Ports".
Right-Click in the "Ports" pane (on the right hand side) and Select "Add Port...".
I'd also recommend configuring a Port from Print Management, as opposed to trying to do it in a Printers Properties. ;)
Adam Reed describes a workaround in his blog:
http://borntoidentify.blogspot.com/2010/09/configuring-virtual-printer-using.html
Not very comfortable, but works for me ...
EDIT: This link appears broken, but here's the content:
https://web.archive.org/web/20120628120209/http://borntoidentify.blogspot.com/2010/09/configuring-virtual-printer-using.html
The gist is that under Win7, you need to run explorer with elevated rights. This can be done using another browser, or, as mentioned in the comments on the original post:
Open a CMD window by right clicking and running as administrator
Kill the process explorer.exe from the task manager
Run explorer.exe from the command prompt window, now as an administrator.
Be very careful when running explorer as an administrator.
You need to enable Admin mode OR log with the Admin account!
This is cause by the new Vista/Win 7 security system.
Try reseting the firewall (Windows 7)
(be warned tho, the firewall will reset to the default setting)
*go to Control Panel
*go to Windows Firewall
*on the left choice pick "Restore Defaults"
It works for me, i hope it works for you.
F3lix's rundll32 method works but after you've created the port you most probably would need to configure its settings. Elsewhere in the net there are instructions to open Port management as Administrator, but in Windows 7 Home that seems to be very much impossible. One can only view the virtual port settings. The only workaround I found is to edit registry directly with the Registry editor at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Redirected Port\Ports\RPT1:
(Replace your port name in the end.)
It seams to be tricky. In my case it only works, after creating an new User account with the name "admin" / group " Administratoren" (de).
Before with my real Nickname User "Nick.." / group "Administratoren" (de) it dosent work´.
Takes several hours to discover ...
Accepted solution did not work for me...I found an other command line that worked well (I'm on windows 10):
%systemroot%\system32\printmanagement.msc
It opens the print management in administrator mode, and I was able to create the port with no problems.

Resources