batch-file

How to Open only UserForm of an excel macro from batch file

与世无争的帅哥 提交于 2020-01-19 06:06:42
问题 I'm trying to open the UserForm1 of an excel macro through batch file. I'm able to open that but excel is also getting opened along with that. I want only UserForm1 to be opened not the excel. Below is my approach : I have written a macros to open the UserForm1 Sub open_form() UserForm1.Show End Sub In batch File: @echo off cd "c:\Test\" openFormTest.xlsm By the above approach, When I'm running the batch file both UserForm1 and excel are getting open, but I want to open only UserForm1. Kindly

How to Open only UserForm of an excel macro from batch file

泪湿孤枕 提交于 2020-01-19 06:06:06
问题 I'm trying to open the UserForm1 of an excel macro through batch file. I'm able to open that but excel is also getting opened along with that. I want only UserForm1 to be opened not the excel. Below is my approach : I have written a macros to open the UserForm1 Sub open_form() UserForm1.Show End Sub In batch File: @echo off cd "c:\Test\" openFormTest.xlsm By the above approach, When I'm running the batch file both UserForm1 and excel are getting open, but I want to open only UserForm1. Kindly

How do I retrieve the version of a file from a batch file on Windows Vista?

拟墨画扇 提交于 2020-01-19 05:25:28
问题 Binary files have a version embedded in them - easy to display in Windows Explorer. How can I retrieve that file version, from a batch file? 回答1: and three ways without external tools 1. WMIC WMIC DATAFILE WHERE name="C:\\install.exe" get Version /format:Textvaluelist Pay attention to the double slashes of file name. Ready to use script: @echo off :wmicVersion pathToBinary [variableToSaveTo] setlocal set "item=%~1" set "item=%item:\=\\%" for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE

How do I retrieve the version of a file from a batch file on Windows Vista?

岁酱吖の 提交于 2020-01-19 05:25:05
问题 Binary files have a version embedded in them - easy to display in Windows Explorer. How can I retrieve that file version, from a batch file? 回答1: and three ways without external tools 1. WMIC WMIC DATAFILE WHERE name="C:\\install.exe" get Version /format:Textvaluelist Pay attention to the double slashes of file name. Ready to use script: @echo off :wmicVersion pathToBinary [variableToSaveTo] setlocal set "item=%~1" set "item=%item:\=\\%" for /f "usebackq delims=" %%a in (`"WMIC DATAFILE WHERE

Batch file to delete folders older than 10 days in Windows 7

梦想的初衷 提交于 2020-01-19 04:46:34
问题 I want to create a batch file which should delete all subfolders of a folder which are older than 10 days, using Windows 7 Any help would be appreciated. 回答1: Adapted from this answer to a very similar question: FORFILES /S /D -10 /C "cmd /c IF @isdir == TRUE rd /S /Q @path" You should run this command from within your d:\study folder. It will delete all subfolders which are older than 10 days. The /S /Q after the rd makes it delete folders even if they are not empty, without prompting. I

CALL command vs. START with /WAIT option

↘锁芯ラ 提交于 2020-01-18 18:38:34
问题 How is the START command with a WAIT option START /wait notepad.exe START /wait notepad.exe ...any different from using a CALL command? CALL notepad.exe CALL notepad.exe Is there a situation where one may behave differently that the other dependending on what is being executed? 回答1: For exe files, I suppose the differences are nearly unimportant. But to start an exe you don't even need CALL . When starting another batch it's a big difference, as CALL will start it in the same window and the

CALL command vs. START with /WAIT option

本小妞迷上赌 提交于 2020-01-18 18:38:11
问题 How is the START command with a WAIT option START /wait notepad.exe START /wait notepad.exe ...any different from using a CALL command? CALL notepad.exe CALL notepad.exe Is there a situation where one may behave differently that the other dependending on what is being executed? 回答1: For exe files, I suppose the differences are nearly unimportant. But to start an exe you don't even need CALL . When starting another batch it's a big difference, as CALL will start it in the same window and the

CALL command vs. START with /WAIT option

泄露秘密 提交于 2020-01-18 18:38:06
问题 How is the START command with a WAIT option START /wait notepad.exe START /wait notepad.exe ...any different from using a CALL command? CALL notepad.exe CALL notepad.exe Is there a situation where one may behave differently that the other dependending on what is being executed? 回答1: For exe files, I suppose the differences are nearly unimportant. But to start an exe you don't even need CALL . When starting another batch it's a big difference, as CALL will start it in the same window and the

CALL command vs. START with /WAIT option

青春壹個敷衍的年華 提交于 2020-01-18 18:37:47
问题 How is the START command with a WAIT option START /wait notepad.exe START /wait notepad.exe ...any different from using a CALL command? CALL notepad.exe CALL notepad.exe Is there a situation where one may behave differently that the other dependending on what is being executed? 回答1: For exe files, I suppose the differences are nearly unimportant. But to start an exe you don't even need CALL . When starting another batch it's a big difference, as CALL will start it in the same window and the

How to set environment variables with spaces?

狂风中的少年 提交于 2020-01-18 02:08:09
问题 I need to set values to a environmental variable using a batch file. I wrote the script for this: @echo off set value="Hello world" setx -M srijani "%srijani%;%value%" It gives the error: ERROR: Invalid syntax. Default option is not allowed more than '2' time(s). Type "SETX /?" for usage. I googled and found that while using white spaces we need to write it inside a double quotes. set value="Hello world" But, that is not working too. Note: I am on Windows 7. 回答1: The error output by command