2

I am trying to use VBS shell.run to run nircmd program with a script argument. For example, this works:

objShell.Run """D:\App Run\NirCmd\nircmd.exe""script D:\testfolder\test.txt"

However if there are any spaces in the argument path it does not work and I have tried double quotes on the argument path with no luck. This does not work: (space in argument)

objShell.Run """D:\App Run\NirCmd\nircmd.exe""script D:\test folder\test.txt" 

I need the ability to have spaces in the argument path. thanks for any help

aphoria
  • 19,796
  • 7
  • 64
  • 73
user2601430
  • 49
  • 1
  • 6

1 Answers1

3

Try:

objShell.Run """D:\App Run\NirCmd\nircmd.exe"" script ""D:\test folder\test.txt"""
Ekkehard.Horner
  • 38,498
  • 2
  • 45
  • 96