RCU.bat file not opening on virtual machine - debugging

I have installed a Windows 2008 Server on my VM. I am trying to run a .bat file (on my VM). This .bat file is stored on my local Windows 7 PC, and I'm using shared folders to access it.
The .bat file does not work on my virtual machine. There is no error shown. The command prompt window pops up and then goes away..
However this file works fine on my PC. What could be the reason for the file to run on one system and not run on the other?
How can I run this .bat using the command prompt of my virtual machine? To check if any error log shows up? What could be done? Please advise.
Thanks,

Are you double-clicking on the .bat file through windows explorer? Open the command prompt, then cd to where you have the file and just run it.

cmd cannot use UNC paths as the current path. I'm guessing your shared folders use a network share in the guest machine. Map that share to a drive letter and try again.

Related

What does this error about a missing system 32 file mean?

Windows Script Host
Error: Cannot find script file
"C:\Windows\system32\Maintenance.vbs"
When I'm on my laptop, this error occurs every time I plug in the charger. What does it mean and how can I fix it?
I would run SFC /scannow in command prompt as an administrator.
This will verify that all key windows files are installed and working properly. .vbs scripts tent too be malicious however so if this doesn't find any problems with windows I would run and antivirus scan

Why does running a .sh script from Visual Studio open the file instead of running it?

I am attempting to run an .sh script (which itself is supposed to kick off a series of unit tests in flask) from within Visual Studio Code running in Windows 10 and for some reason no matter what I try it only opens the file for editing instead of actually running the file.
This is the exact command I am typing:
C:\Users\my.user\MyRepo>.\scripts\run-unit-tests.sh
Here are my notes:
This is a brand new installation of Windows 10 where I believe I have enabled WSL2
I am completely unfamiliar with doing development from within Windows (coming from a Ubuntu/Linux background)
My goal is to run this script from within the built in terminal in VS Code, however I have also tried running it from a cmd prompt and also from powershell and both of those also result in opening the file in VS Code.
Addendum: more notes:
I actually have two windows machines. one is my personal machine, the other provided by my work. For whatever reason this file works fine on my personal machine but does not on my work machine. Also the bash script is in a repo which was created by others at my company so i'm certain that this can be made to run without modifying the .sh file itself.
I figured out what was going on.
In windows there are default file associations. Mine was set up to run Visual Studio Code for the .sh file extension. Also, windows does not know how to handle .sh files by default. There were likely many potential fixes for this however the one that worked was for me to re-associate the .sh file extension to open with Git Bash which I happened to also have installed on this machine.
Thanks all who tried to help.

Is there a way to access a WSL folder from the Windows host or vice versa?

I've Windows 2010 home ed installed and on top i have installed Ubuntu extension support by Windows.
I've started wrting my project there but not sure
how to access directory in Ubuntu from my windows system (host)
any thoughts? Thanks in advance
I'd prefer to not use any external tool for it.
In Windows10 after the may 2019 update, the expected way to access WSL files from windows is via the mounted network drive.
You can access it at \\wsl$\<distro> via explorer, etc. You can even just launch explorer from wsl by running explorer.exe from your WSL shell.
See the dev blog post here for more info: https://devblogs.microsoft.com/commandline/whats-new-for-wsl-in-windows-10-version-1903/
To access the Windows10 filesystem you can just use the mounted filesystem at /mnt/<drive_letter> in WSL
figured out lately and as mentioned by #imbuedHope, from wsl command bash shell, you can open current directory by specifying . as follows:
explorer.exe . //notice the dot
then u could navigate using windows explorer to wherever u want.
In Windows 11 Home, the Linux/Ubuntu folder automatically shows up in Windows Explorer.
In Linux/Ubuntu, the Windows filesystem shows up under /mnt/<mountname>/c. [The "mountname" was a choice provided during the WSL2 installation.] I can access Windows "My Documents" folder through the path: /mnt/arun/c/Users/arun/Documents/.

Difference between File Explorer (Windows EXplorer) and Run Command

Is there any difference between File Explorer and Run command in Windows system while accessing the remote location path.
For EG: \\hostIP\folder1
I haven't used Windows for a long time (I'm just using Linux for everything) but from what I remember "Run" just opens File Explorer, so there shouldn't be any difference. But I may be wrong.

exe command not recognised in win32 folder

I have placed a mycmd.exe file in system32 folder under windows directory.
Strange thing is that this is accessible from command prompt but when i access this file as a shell command from my VB6 application it shows is "not recognized as an internal or external command"
I am running VB project as run as administrator and using win8 64bit.
Thanks for the anticipated help!!
The WOW64 filesystem redirector is probably taking your program's path and changing it.
See: File System Redirector
Can you show the exact code you're using to run the EXE? The error you're getting makes it clear that VB isn't finding the file. Have you tried appending the path to the specific file you're trying to execute?

Resources