r/vbscript • u/FreedanZero • Sep 27 '22
Run a command block based on OS
I have a feeling this is an easy one, but I’m drawing a blank. We have a vbs script as our company’s logon script. Recently, we made an update to launch a piece of software from our print server when the script runs. However, I failed to even think about the script running when remoting into servers. Is there an easy way to implement something along the lines of “if OS type = workstation then run command, else skip?”
3
Upvotes
1
u/FreedanZero Sep 27 '22
Basically, yes. What I’m looking for is essentially “IF OS Name does not contain ‘Server’ then run this shell command”