What does this line of script mean? [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have the following line of code in a batch(.bat) file that I have to run:
"c:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe" /p:desktop MfeArcGis10.UI.dll
When I run this batch file, the ESRIRegAsm.exe is executed but I get the following error:
Can someone explain what this batch script is doing. From what I understand it is executing the executable with two arguments, however I do not know what the first argument means. Also what does the given error mean? How would I fix it?

First, take a look at Calling esriRegasm manually (outside an ArcGIS-installation).
It looks like MfeArcGis10.UI.dll is a plugin / dynamic linked library (DLL). It is necessary to register components/classes of this DLL in Windows registry under HKEY_LOCAL_MACHINE for usage by ArcGIS. This registry key requires administrator privileges for write access.
So you need to right click on this batch file and click in context menu on Run as Administrator, enter the password for the administrator account, and then the registration process should work.
Note: The batch file must be in same directory as file MfeArcGis10.UI.dll or ESRIRegAsm.exe will not be able to find the plugin file containing the information which must be added to Windows registry.
More useful pages How to register COM components containing also a link to ESRIRegAsm utility. The last page explains option /p:.

Related

Windows - start program in hidden mode [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 days ago.
Improve this question
I am trying to do a setup so that at startup a program is started in hidden mode (not shown in the taskbar, only in Task Manager).
So the solution recommended by many and which I want to use is to in the registry, inside the key
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
add a string subkey with the path of the exe file and the attribute /HideWindow
So I am using the good old Notepad as the test program and created a subkey with the value
"C:\Windows\notepad.exe" /HideWindow
But at startup, the argument is seen as a text file which Notepad attempts to open and fails,
and it throws the error message "Cannot find the /HideWindow.txt file"
I tried with - instead of / and it's the same error.
I also tried with all text in quotation marks, like: "C:\Windows\notepad.exe /HideWindow"
and in this case there is no error message, but the program is not started either.
So I was wondering if there is a way to make /HideWindow being interpreted correctly,
And hopefully for any program, not just for a particular one (such as Notepad)..?

W10 CMD forfiles [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Since I had a task where I have to copy recursively files of a nested directory for work, i discovered the forfiles-function in windows cmd.
It worked properly and now I wonder how does the function distinguish between a file and a directory?
If every file had a file extension like .jpg .png .xls or something like that, I could understand it, but some of my files came without extensions, but it still did its job.
As I'm used to linux, I tried to google the sourcecode, but windows applications aren't opensource, so if anybody can explain me, how does it work, it would be very interesting to know.
PS: why does this got downvoted? its a general question
The command will eventually call the Windows FindFirstFile/FindNextFile functions. Those return a WIN32_FIND_DATA structure which may contain a FILE_ATTRIBUTE_DIRECTORY flag. If that flag is not set, it's a file.
Internally there is quite a difference between a file and a directory, and it's no surprise that typical file/directory handling commands know about this. The fact that a file doesn't have an extension (or that a directory is called "directory.jpeg") does not cause any confusion within those commands.
If you check forfiles' "man page" (forfiles /?), you might see that the /C switch gives you access to the #isdir variable, which can tell you the difference: are you dealing with a directory (value:TRUE) or a file (value:FALSE)?

System cannot find the directory of current running process in “C:\Windows\Fonts” folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I have a file running from this directory:
C:\Windows\Fonts\com4.{208d2c60-3aea-1069-a2d7-08002b30309d}, When I want to open that directory it says System cannot find the specified path and when I want to delete the file inside that folder with PowerShell, it says Access Denied!
How can I delete the file and folder?
COM4 is a special reserved 'DOS Device' name. Files or Folders with these types of names can not be created or accessed by normal means. Also the appended string .{208d2c60-3aea-1069-a2d7-08002b30309d} is the Shell CLSID for My Network Places, It will cause the folder with this appended sting to appear as such in Windows Explorer to hide the contents.
It can be renamed to a normal name so it can be be accessed afterwards. But since it is located in the system folder C:\Windows\Fonts, Administrative rights are needed for doing so.
In an elevated Command Prompt (CMD.EXE) this command can be used to rename the folder
ren "\\.\C:\Windows\Fonts\com4.{208d2c60-3aea-1069-a2d7-08002b30309d}" "NewName"
But for the rename to be successful, any program(Most probably a malware as you mentioned) that is running from this folder must be terminated beforehand.
A malware can have other protections mechanisms to prevent you from doing any of the above actions or easily undo what you have done, So you should protect your system with an updated Antivirus product and keep it updated until it is detected and removed completely.

How to make a Logon script secure in windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have a logon batch script that runs a .reg file for all user when they log in. here's my script
#echo running
REGEDIT.EXE /S "C:\user_files\user.reg"
Now my concern is that the batch file itself is located in
C:\Windows\System32\GroupPolicy\User\Scripts
Every user has access to this directory. So anyone can change the batch and may cause security threat. Is there a way to make it more secure. or is can I do something similar with PowerShell scripting so there's no batch. If someone could point me to the right direction would be very helpful.
your script needs to be readable by your users, but you can take away their rights to modify it -- that's a typical file system feature that every Windows since NT has (aside from windows 9x, of course).
Hence, simply remove the write privileges from the user group in which your users are, and you're fine.

programs running on startup without being in startup folder [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
some program (sort of malware) is running on my windows 7 at startup, but my startup folder is empty (even after removing the hidden and system attrib of all the programs in the folder). But msconfig shows the script that was running.
This means that programs can run on startup without actually being in the startup folder.
Please help me by explaining, how these softwares do this, or any concept of startup that i am missing?
Thanks in advance.
From here:
Add a new startup application
Open your registry and find the key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run].
For each program you want to start automatically create a new string value using a descriptive name, and set the value of the string to the program executable.
For example, to automatically start Notepad, add a new entry of "Notepad"="c:\windows\notepad.exe".
Goto MSCONFIG and Remove the check mark for that particular App. then you are good go

Resources